Closed sprater closed 4 years ago
@sprater I have most of the work done, but I won't be able to work on this again for a few weeks. See https://github.com/jscancella/bagging/tree/bagit_profile if you want to help fix the remaining issues (just run ./gradlew check
@jscancella Sounds good. I first need to refactor my own code to use your library, in place of the older bagit-java library. Once I finish that, I'll look into this, and submit a PR.
Do you plan on tagging and pushing a release to maven central at some point?
It has been on my TODO list, currently I have it uploaded to jcenter. See https://bintray.com/jscancella/com.github.jscancella/bagging
This should be fixed in my latest merge. Please take a look and let me know if you find any problems. I will probably make another version and release it to jcenter soon.
@jscancella I pulled master after your PR was merged, and built bagging. The build failed a javadoc check and some SpotBugs checks, but all the tests passed. Is master the correct branch to be working from right now?
Yes it is the correct branch. It builds fine on all the CI servers, as well as on my PC. I need more information in order to figure out what is wrong with your build:
Go ahead and submit this information in a new issue if you are still having a problem.
SpotBugs task passes when running under Java 8 -- I had inadvertently attempted to build it using Java 11.
Still three javadoc errors when I run a "clean check" on Windows, using Java 8. see issue #33 .
bagit-java version: 5.2.0 Operating System CentOS (Linux) 7
A null pointer exception is thrown when I attempt to validate a bag against a BagIt 1.3.0 profile without a Manifests-Required block. Looking at the class BagitProfileDeserializer (https://github.com/jscancella/bagging/blob/master/src/main/java/com/github/jscancella/conformance/profile/BagitProfileDeserializer.java#L183), it looks like all the parse* methods will throw NPEs in their for loops if the parsed block does not exist in the profile.
As I read the latest BagIt profile spec 1.3.0 (https://bagit-profiles.github.io/bagit-profiles-specification/), none of the blocks that throw NPEs if missing are required to be in a profile.
Given
When
Then
Log output:
bagit-profile-sample-v1_0_json.txt