Skip to content

Commit

Permalink
build(sword): switch to Jakarta-enabled SWORD2 preview release IQSS#8305
Browse files Browse the repository at this point in the history
  • Loading branch information
poikilotherm committed Mar 24, 2022
1 parent bb699c2 commit c803f48
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/dataverse-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
<name>Local repository for hosting jars not available from network repositories.</name>
<url>file://${project.basedir}/local_lib</url>
</repository>
<!-- Uncomment when using snapshot releases from Maven Central
<!-- Uncomment when using snapshot releases from Maven Central -->
<repository>
<id>oss-sonatype</id>
<name>oss-sonatype</name>
Expand All @@ -312,7 +312,7 @@
<enabled>true</enabled>
</snapshots>
</repository>
-->
<!-- -->
</repositories>

</project>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<dependency>
<groupId>io.gdcc</groupId>
<artifactId>sword2-server</artifactId>
<version>1.2.1</version>
<version>2.0.0-SNAPSHOT</version>
</dependency>
<!-- Dependency to use sword2-server in our codebase -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ public DepositReceipt createNew(String collectionUri, Deposit deposit, AuthCrede
// curl --insecure --data-binary "@multipart.dat" -H 'Content-Type: multipart/related; boundary="===============0670350989=="' -H "MIME-Version: 1.0" https://sword:sword@localhost:8181/dvn/api/data-deposit/v1/swordv2/collection/dataverse/sword/hdl:1902.1/12345
// but...
// "Yeah, multipart is critically broken across all implementations" -- http://www.mail-archive.com/[email protected]/msg00327.html
throw new UnsupportedOperationException("Not yet implemented");
//
// OB 2022-03-24 -> sword2-server v2.0 library drops support for multipart/related.
throw new SwordError(UriRegistry.ERROR_BAD_REQUEST, "Multipart/related RFC2387 type posts are not supported. Please POST an Atom entry instead.");
} else {
throw new SwordError(UriRegistry.ERROR_BAD_REQUEST, "expected deposit types are isEntryOnly, isBinaryOnly, and isMultiPart");
}
Expand Down

0 comments on commit c803f48

Please sign in to comment.