【发布时间】:2014-10-10 17:55:49
【问题描述】:
我确定我的插件中没有 maven-source-plugin,但是在 release:perform 期间总是会构建一个 [project-name]-sources.jar。在构建生命周期的其他阶段似乎没有这样做。
不幸的是,这个 [project-name]-sources.jar 被上传到我们的存储库 (Nexus)。管理层希望所有源代码都保存在 SVN 中并远离存储库。
我该怎么做?这当然不是装配问题。我们尝试了不同的构建配置文件,但 [project-name]-sources.jar 仍然存在。我们只是不希望任何源代码在发布期间上传到存储库。
知道吗?
提前致谢。
以下是我们在标签中使用的所有内容:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<!-- Release Reference: http://maven.apache.org/maven-release/maven-release-plugin/index.html -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<tagBase>http://some.url.here</tagBase>
<checkModificationExcludes>
<checkModificationExclude>.classpath</checkModificationExclude>
<checkModificationExclude>.factorypath</checkModificationExclude>
<checkModificationExclude>.project</checkModificationExclude>
<checkModificationExclude>.rest-shell.log</checkModificationExclude>
<checkModificationExclude>.springBeans</checkModificationExclude>
<checkModificationExclude>.apt-generated/**</checkModificationExclude>
<checkModificationExclude>.settings/**</checkModificationExclude>
<checkModificationExclude>src\main\resources\rebel.xml</checkModificationExclude>
</checkModificationExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<archive>
<index>true</index>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
<manifestEntries>
<version>${project.version}</version>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
【问题讨论】:
-
顺便说一句:您使用的是非常旧版本的插件。
标签: maven maven-release-plugin