Wednesday 15 August 2012

What is making the *sources.jar during Maven release? -



What is making the *sources.jar during Maven release? -

i not have maven-source-plugin in plugins, [project-name]-sources.jar getting built during release:perform. doesn't seem doing during other stages of build life-cycle.

unfortunately, [project-name]-sources.jar gets uploaded our repository (nexus). management wants sources kept in svn , away repository.

how do that? not assembly issue. we've tried different build profiles [project-name]-sources.jar still remained. don't want source codes uploaded repository during releases.

any thought one?

thanks in advance.

below utilize in tag:

<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>

the reply during release run maven-sources-plugin attached build life cylce (package phase) activated property performrelease. defined in super-pom defines profile.

here appropriate part of super pom:

class="lang-xml prettyprint-override"> <profiles> <!-- note: release profile removed future versions of super pom --> <profile> <id>release-profile</id> <activation> <property> <name>performrelease</name> <value>true</value> </property> </activation> <build> <plugins> <plugin> <inherited>true</inherited> <artifactid>maven-source-plugin</artifactid> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <inherited>true</inherited> <artifactid>maven-javadoc-plugin</artifactid> <executions> <execution> <id>attach-javadocs</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <inherited>true</inherited> <artifactid>maven-deploy-plugin</artifactid> <configuration> <updatereleaseinfo>true</updatereleaseinfo> </configuration> </plugin> </plugins> </build> </profile> </profiles>

maven maven-release-plugin

No comments:

Post a Comment