junit - maven release:prepare skips test-jar -
i`m using maven ver. 3 following plugin generate separated *.jar file tests.
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-jar-plugin</artifactid> <version>2.4</version> <executions> <execution> <id>core-tests</id> <phase>package</phase> <goals> <goal>test-jar</goal> </goals> </execution> </executions> </plugin>
and release plugin configuration looks following:
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-release-plugin</artifactid> <version>2.0-beta-8</version> <configuration> <releaseprofiles>release</releaseprofiles> <preparationgoals>clean install</preparationgoals> <generatereleasepoms>false</generatereleasepoms> <scmcommentprefix> release plugin - </scmcommentprefix> </configuration> </plugin>
generating test classes in separated jar works fine until use:
maven clean deploy
when i`m doing release test-jar not created:
-dresume=false release:prepare release:perform
release output:
... [info] [info] [compiler:testcompile {execution: default-testcompile}] [info] [info] not compiling test sources [info] [info] [surefire:test {execution: default-test}] [info] [info] tests skipped. [info] [info] [jar:jar {execution: default-jar}] [info] [info] building jar: /home/tomcat/hudson_home/jobs/project-core/workspace/target/core-1.2-snapshot.jar [info] [info] [jar:test-jar {execution: core-tests}] [info] [info] skipping packaging of test-jar ...
i alos tried use dskiptests without success
-dresume=false -darguments="-dskiptests" release:prepare release:perform -prelease
or
-dresume=false -darguments="-dmaven.test.skip.exec=true" release:prepare release:perform -prelease
how can generate test-jar during release? why skipped?
edit
i found problem occures when have active release profile. can`t find profile in parent pom. comes from? maven-release-plugin definitions?
resolved
i found profile release on hudsons .m2/settings.xml:
<profile> <id>release</id> <activation> <activebydefault>false</activebydefault> </activation> <properties> <username>*****</username> <password>*****</password> <skiptests>true</skiptests> <maven.test.skip>true</maven.test.skip> </properties> </profile>
i needed remove maven.test.skip , works fine now.
Comments
Post a Comment