露天 Maven 插件; truezip 问题到前置 AMP WAR
alfresco-maven-plugin; truezip issues to pre-AMP a WAR
我真的在与 alfresco-maven-plugin 作斗争并寻求帮助。用例是将 AMP 预先应用到露天场所并共享 WAR(版本 4.2.f),然后再部署到与文件权限问题相关的系统 运行 [=29] =] 在安全的环境中。
我已经尝试了以下版本,1.1.1 和 2.0.0 版本,都有关联的父级 alfresco-sdk-parent 和没有(注意:没有父级是首选,因为我们有公司父级 POM分配等原因)
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<version>1.1.1</version>
<extensions>true</extensions>
<executions>
<execution>
<id>install-amps</id>
<goals>
<goal>install</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<ampLocation>${project.build.directory}/amps</ampLocation>
<warLocation>${project.build.directory}/${project.artifactId}-${project.version}-war</warLocation>
</configuration>
</plugin>
始终出现错误:
java.lang.NoClassDefFoundError: de/schlichtherle/truezip/fs/FsSyncExceptionBuilder
我添加了 truezip、truezip-file、truezip-driver-file、truezip-driver-zip、truezip-swing 作为依赖项和插件依赖项,尝试从 6.X 到7.8.1,尝试明确列出 alfresco-mmt 版本 4.2.f 到 5.0.c(5.0.x 似乎是预先捆绑的,但对 Maven 插件没有帮助).
有什么指导吗?
编辑:下面针对 2 年前提出的这个问题提供的答案与不正确的 maven 版本有关。 A possible duplicate TrueZip: NoClassDefFoundError (but for shutdown hook only?) was detected later asked and does not provide an answer/does 无法解决问题;请注意,此问题已被视为 'answered' 并已解决。
我所做的解决方法是:
截至 2015 年 3 月 9 日从此处签出 2.0.1-SNAPSHOT:
https://github.com/Alfresco/alfresco-sdk
使用maven 3.0.5,jdk7,更改plugins/alfresco-maven-plugin/pom.xml,从3.2版本更改为maven-plugin-plugin入口的这个版本,这样它实际上会编译新版本的alfresco-maven-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.0</version>
<!-- <version>3.2</version> <executions> <execution> <id>generated-helpmojo</id>
<goals> <goal>helpmojo</goal> </goals> </execution> </executions> -->
</plugin>
在我的项目中更新 alfresco-maven-plugin 的 2.0.1-SNAPSHOT,它按预期工作(不需要 alfresco-sdk parent pom)。
可以通过下载或复制 alfresco-mmt jar 并使用以下方法检查预应用 AMP 的新 WAR:
java -jar alfresco-mmt.jar list ${project}/target/${newalfresco}.war
解决问题之前的跟踪器:https://github.com/Alfresco/alfresco-sdk/issues/265, https://github.com/Alfresco/alfresco-sdk/issues/266
您使用的是不受支持的 Maven 版本(事实上,Alfresco SDK 2.0.0 需要 Maven 3.2.5 及更高版本,请参阅 http://docs.alfresco.com/sdk2.0/tasks/alfresco-sdk-install-maven.html)。
这解释了为什么您会看到这个问题,而这个问题在经过正确测试的配置中并不存在。
也会关闭相关的 https://github.com/Alfresco/alfresco-sdk/issues/265。
我真的在与 alfresco-maven-plugin 作斗争并寻求帮助。用例是将 AMP 预先应用到露天场所并共享 WAR(版本 4.2.f),然后再部署到与文件权限问题相关的系统 运行 [=29] =] 在安全的环境中。
我已经尝试了以下版本,1.1.1 和 2.0.0 版本,都有关联的父级 alfresco-sdk-parent 和没有(注意:没有父级是首选,因为我们有公司父级 POM分配等原因)
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<version>1.1.1</version>
<extensions>true</extensions>
<executions>
<execution>
<id>install-amps</id>
<goals>
<goal>install</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<ampLocation>${project.build.directory}/amps</ampLocation>
<warLocation>${project.build.directory}/${project.artifactId}-${project.version}-war</warLocation>
</configuration>
</plugin>
始终出现错误:
java.lang.NoClassDefFoundError: de/schlichtherle/truezip/fs/FsSyncExceptionBuilder
我添加了 truezip、truezip-file、truezip-driver-file、truezip-driver-zip、truezip-swing 作为依赖项和插件依赖项,尝试从 6.X 到7.8.1,尝试明确列出 alfresco-mmt 版本 4.2.f 到 5.0.c(5.0.x 似乎是预先捆绑的,但对 Maven 插件没有帮助).
有什么指导吗?
编辑:下面针对 2 年前提出的这个问题提供的答案与不正确的 maven 版本有关。 A possible duplicate TrueZip: NoClassDefFoundError (but for shutdown hook only?) was detected later asked and does not provide an answer/does 无法解决问题;请注意,此问题已被视为 'answered' 并已解决。
我所做的解决方法是:
截至 2015 年 3 月 9 日从此处签出 2.0.1-SNAPSHOT: https://github.com/Alfresco/alfresco-sdk
使用maven 3.0.5,jdk7,更改plugins/alfresco-maven-plugin/pom.xml,从3.2版本更改为maven-plugin-plugin入口的这个版本,这样它实际上会编译新版本的alfresco-maven-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.0</version>
<!-- <version>3.2</version> <executions> <execution> <id>generated-helpmojo</id>
<goals> <goal>helpmojo</goal> </goals> </execution> </executions> -->
</plugin>
在我的项目中更新 alfresco-maven-plugin 的 2.0.1-SNAPSHOT,它按预期工作(不需要 alfresco-sdk parent pom)。
可以通过下载或复制 alfresco-mmt jar 并使用以下方法检查预应用 AMP 的新 WAR:
java -jar alfresco-mmt.jar list ${project}/target/${newalfresco}.war
解决问题之前的跟踪器:https://github.com/Alfresco/alfresco-sdk/issues/265, https://github.com/Alfresco/alfresco-sdk/issues/266
您使用的是不受支持的 Maven 版本(事实上,Alfresco SDK 2.0.0 需要 Maven 3.2.5 及更高版本,请参阅 http://docs.alfresco.com/sdk2.0/tasks/alfresco-sdk-install-maven.html)。
这解释了为什么您会看到这个问题,而这个问题在经过正确测试的配置中并不存在。
也会关闭相关的 https://github.com/Alfresco/alfresco-sdk/issues/265。