【发布时间】:2015-03-05 16:40:02
【问题描述】:
我真的在使用 alfresco-maven-plugin 并寻求帮助。用例是将 AMP 预先应用到露天并共享 WAR(版本 4.2.f),然后再部署到与在安全环境中运行 apply_amp.sh 的文件权限问题相关的系统。
我尝试了以下 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 的 truezip 版本,尝试明确列出 alfresco-mmt 版本 4.2.f 到 5.0.c(5.0.x 似乎预先捆绑,但对 maven 插件没有帮助)。
请问有什么指导吗?
编辑:对于 2 年前提出的这个问题,下面提供的答案与不正确的 maven 版本有关。检测到可能重复的TrueZip: NoClassDefFoundError (but for shutdown hook only?) 稍后询问,未提供答案/未解决问题;请注意,此问题被视为“已回答”并已解决。
【问题讨论】:
-
最新的 Alfresco Maven AMP 插件版本看起来是3.0.4,如果你尝试这样做会发生什么?
-
上面的场景不是创建一个 AMP(alfresco maven AMP 插件所做的),它采用已经构建的 AMP 并将它们应用到 Alfresco / Share WAR(这是如何alfresco 支持扩展)。
-
那为什么不直接运行 mmt 工具呢?
-
通过构建服务器 (Jenkins) 自动创建完全应用的 WAR。
-
那么您的 jenkins 作业是否将 mmt 工具作为构建作业的一部分运行?还是我错过了什么?