Reputation: 2208
I've just fixed another weird bug. After adding spring-core to pom.xml I had "object scala not found" while building a project with maven. After googling for quite a long time about this error I was happy enough to try to build the project with Eclipse. And voila! It reported that spring-core jar was corrupted.
So, my question is: Why maven didn't report it? It could not only test jar files if they valid archives or not, but also check hash sums. And I believe it should check hash sums. Do I miss something?
BTW, It wasn't the only case, unfortunately I cannot remember details of several others.
UPDATE: It looks like checksumPolicy tag addresses this. But for some reason it doesn't work.
UPDATE 2: Here is test case which reproduces error I described originally:
cd "<maven_local_repo>\org\springframework\spring-core\3.1.3.RELEASE"
cp spring-core-3.1.3.RELEASE.jar spring-core-3.1.3.RELEASE.jar.old
#corrupt file manually
dd skip=100 if=spring-core-3.1.3.RELEASE.jar.old of=spring-core-3.1.3.RELEASE.jar
cd "<my_project_dir>"
mvn clean package
Upvotes: 0
Views: 363
Reputation: 111
Maven checks hash-sum.
When you run maven you can use command-line options.
Fail the build if checksums don't match:
-C,--strict-checksums
Warn if checksums don't match:
-c,--lax-checksums
Upvotes: 0
Reputation: 8278
Check out JBoss Tattletale.i believe it has what you are looking for:
You can integrate it in maven build as explained here.
Upvotes: 1