Spring 3.1.1.RELEASE与Apache Maven 3.0.3和Maven Shade插件1.6.
使用mvn shade插件将工件打包在uber-jar中,包括它的依赖项:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.MyApplication</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
Run Code Online (Sandbox Code Playgroud)
似乎打包很好,但在执行抱怨Spring NamespaceHandler问题:
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/util]
Offending resource: class path resource [spring/test-context.xml]
Run Code Online (Sandbox Code Playgroud)
这适用于util和p命名空间,但期望它不限于这些:
xmlns:util="http://www.springframework.org/schema/util"
xmlns:p="http://www.springframework.org/schema/p"
Run Code Online (Sandbox Code Playgroud)
如果我手写重写属性或列表(util),问题就会消失.
最近在1990年代签订了一份新合同(你记得,jar文件是通过电子邮件共享的,并且称为resourcebundle.jar之类的东西 - 不,我实际上并不是在开玩笑)我正在努力向后工作并找到groupId/artifactId /各种Oracle ADF/BPEL/BPM/SOA等库的版本标识符.
但是,由于浏览器看不到https://maven.oracle.com上的Oracle maven存储库(新奇的技术垃圾!),我无法尝试猜测各种与Oracle相关的jar的标识符.
有什么想法吗?谢谢你,安德鲁(又名Marty McFly)
[通过maven-release-plugin发布,在Atlassian Stash上托管的Git repos触发了Jenkins的构建管道.
有没有办法阻止释放触发新的管道运行?发生这种情况是因为已释放的pom文件已提交回Stash.鉴于刚刚发生了构建(进入发布工作),这完全是不必要的,因为从上一次构建发生的所有变化都是pom文件版本号.