Alfresco Maven SDK - fails if module version string ends with “-SNAPSHOT”

主宰稳场 提交于 2019-12-01 08:37:00
Mindthegab

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.

The error log says:

java.lang.NoClassDefFoundError

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 for truezip, truezip-driver and truezip-file. Then, re-run and it works.

You need to add TrueZIP Maven Plugin dependency and its drivers into your pom.xml file, e.g.

...
  <dependencies>
    <dependency>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>truezip-maven-plugin</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <groupId>de.schlichtherle.truezip</groupId>
      <artifactId>truezip-driver-file</artifactId>
      <version>7.7.9</version>
    </dependency>
    <dependency>
      <groupId>de.schlichtherle.truezip</groupId>
       <artifactId>truezip-kernel</artifactId>
      <version>7.7.9</version>
    </dependency>
    <dependency>
      <groupId>de.schlichtherle.truezip</groupId>
      <artifactId>truezip-driver-zip</artifactId>
      <version>7.7.9</version>
    </dependency>
  </dependencies>
...

For further debugging, try adding -X flag for your mvn command.

Krutik Jayswal

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:

web/=/

but not on:

/web/=/
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!