So I created an amp project, both repo and share, and every time I try to build or run the project it fails with:
java.lang.NoClassDefFoundError: de/schlichtherle/truezip/fs/FsSyncExceptionBuilder
at de.schlichtherle.truezip.fs.FsManager.sync(FsManager.java:99)
at de.schlichtherle.truezip.fs.FsSyncShutdownHook$Hook.run(FsSyncShutdownHook.java:93)
Caused by: java.lang.ClassNotFoundException: de.schlichtherle.truezip.fs.FsSyncExceptionBuilder
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 2 more
pom.xml
<project [...]>
<modelVersion>4.0.0</modelVersion>
<groupId>com.someco</groupId>
<artifactId>someco-repo</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>someco-repo AMP project</name>
<packaging>amp</packaging>
[...]
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-parent</artifactId>
<version>1.1.1</version> // same with 1.1.0
</parent>
Changing the module version from 1.0.0-SNAPSHOT
to 1.0.0
works, but then I cannot work with snapshots (or at least identify them as -SNAPSHOT
).
Any ideas?
This should actually work. So I wonder if there's something weird in your env. Any chance you can delete the local copy of that library (
~/.m2/repository/de/schlichterle/truezip
) and retry?I wonder if you have a corrupted version.
Sounds weird though that it works when you change the version...
I had the same error.
I had at one point run maven as root. I tried removing
~/.m2/repository/de/schlichterle/truezip
. This did not help.I then removed the target directory, which had some files in it owned by the root user. I don't fully understand why this fixed it, but it did.
After running maven again, the
~/.m2/repository/de/schlichterle/truezip
directory still does not exist, but apparently it is not needed as everything is working fine.When the mapping specified in
file-mapping.properties
is incorrect (not parsable by alfresco maven) then throws this error.I am not sure why it is not able to parse the mapping. But it throws error on:
but not on:
You need to add TrueZIP Maven Plugin dependency and its drivers into your
pom.xml
file, e.g.For further debugging, try adding
-X
flag for yourmvn
command.The error log says:
That means that there is a missing class on your code. You're using Alfresco, then, it means that you have missing dependencies. Jeff Pott's tutorials are a little deprecated now.
You need to add to your
pom.xml
file, dependencies fortruezip
,truezip-driver
andtruezip-file
. Then, re-run and it works.