You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by DCVer <ke...@o2.pl> on 2008/04/16 11:41:45 UTC

"mvn install site" performs test phase 2 times?

Hi,

I use CruiseControl for continous integration. There are many projects,
which builds are configured as "mvn clean install site". The problem is,
that both 'install' and 'site' commands perform tests and some of my tests
take about 20-30mins! This is waste of time (of course, both test phases do
exactly the same work), so I would like somehow to do only 1 test phase - is
that possible?

Regards
-- 
View this message in context: http://www.nabble.com/%22mvn-install-site%22-performs-test-phase-2-times--tp16719990s177p16719990.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Classpath Manifest and format of libraries. Maven-jar-Plugin

Posted by Thomas Darbois <Th...@edifixio.com>.
Hello

I'm having trouble with a multi module project that I m working on.

I need a class path inside the manifest of the built jar (plugin maven jar and configuration <addClasspath>true</addClasspath> in my parent pom defined in pluginmanagement).

The classpath is perfectly formatted when I'm running the project from the parent pom, but when I'm running maven from one of the module the class path is not well formatted: it add a version tag at the end of the name of the library the module depends on.

Example:

A module toto(packaging : jar, version : 0.1) dependending on an other module test (packaging : jar, version : 0.1) both are called by the pom parent (packaging : pom, version : 0.1) using <modules> and both are inheriting from him (<parent><artifactId>parent</artifactId>[...]</parent>)
The parent pom look likes :

        <modules>
                <module>toto</module>
                <module>test</module>
        </modules>
        <build>
                <finalName>${artifactId}</finalName>
                <pluginManagement><plugins>
                <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-jar-plugin</artifactId>
                                        <version>2.0</version>
                                        <configuration>
                                                <archive>
                                                        <manifest>
                                                                <addClasspath>true</addClasspath>
                                                        </manifest>
                                                </archive>
                                        </configuration>
<executions>
                                                <execution>
                                                        <phase>compile</phase>
                                                        <goals>
                                                                <goal>jar</goal>
                                                        </goals>
                                                </execution>
                                        </executions>
                                </plugin>
</plugins>
</pluginManagement>
</build>


The module toto contains :
        <dependencies>
                <dependency>
                        <groupId>
                                XXX
                        </groupId>
                        <artifactId>test</artifactId>
                        <version>0.1</version>
                </dependency>
        </dependencies>



When I m packaging from the parent pom the classpath inside of the manifest of toto.jar looks like :
Class-Path: test.jar

When I'm packaging from toto the classpath inside the manifest of toto.jar looks like :
Class-Path: test-0.1.jar


Is there anywhere to format the name of the libraries inside the class-path. I know we can alter the directory where to find the library (with <classpathPrefix>) but the name I can't find any information?

Thanks for your time.

Tomas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: "mvn install site" performs test phase 2 times?

Posted by Martin Höller <ma...@xss.co.at>.
On Thursday 17 April 2008 DCVer wrote:
> Well. to be honest, I would like not to skip test phase during building
> artifact and I would like to have test reports (surefire reports) in
> genereted site. I would like to "merge" those two test phases into 1 -
> can "site" phase somehow base on tests made by "install" command? Tests
> would be preformed once (e.g. in "install" phase), but "site" phase would
> do report for those tests.

You d' better not do this. See this thread for more details:
http://www.nabble.com/cobertura-+-surefire-config-to16281994s177.html#a16289201

hth,
- martin

Re: "mvn install site" performs test phase 2 times?

Posted by DCVer <ke...@o2.pl>.
Well. to be honest, I would like not to skip test phase during building
artifact and I would like to have test reports (surefire reports) in
genereted site. I would like to "merge" those two test phases into 1 - can
"site" phase somehow base on tests made by "install" command? Tests would be
preformed once (e.g. in "install" phase), but "site" phase would do report
for those tests.

Regards


Stephen Connolly-2 wrote:
> 
> in Hudson you can use a freestyle project and specify the goals as  
> either
> 
> install -DskipTests | site
> 
> or
> 
> install | site -DskipTests
> 
> to do what your after
> 
> Sent from my iPod
> 
> On 16 Apr 2008, at 10:41, DCVer <ke...@o2.pl> wrote:
> 
>>
>> Hi,
>>
>> I use CruiseControl for continous integration. There are many  
>> projects,
>> which builds are configured as "mvn clean install site". The problem  
>> is,
>> that both 'install' and 'site' commands perform tests and some of my  
>> tests
>> take about 20-30mins! This is waste of time (of course, both test  
>> phases do
>> exactly the same work), so I would like somehow to do only 1 test  
>> phase - is
>> that possible?
>>
>> Regards
>> -- 
>> View this message in context:
>> http://www.nabble.com/%22mvn-install-site%22-performs-test-phase-2-times--tp16719990s177p16719990.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/%22mvn-install-site%22-performs-test-phase-2-times--tp16719990s177p16743964.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: "mvn install site" performs test phase 2 times?

Posted by Stephen Connolly <st...@gmail.com>.
in Hudson you can use a freestyle project and specify the goals as  
either

install -DskipTests | site

or

install | site -DskipTests

to do what your after

Sent from my iPod

On 16 Apr 2008, at 10:41, DCVer <ke...@o2.pl> wrote:

>
> Hi,
>
> I use CruiseControl for continous integration. There are many  
> projects,
> which builds are configured as "mvn clean install site". The problem  
> is,
> that both 'install' and 'site' commands perform tests and some of my  
> tests
> take about 20-30mins! This is waste of time (of course, both test  
> phases do
> exactly the same work), so I would like somehow to do only 1 test  
> phase - is
> that possible?
>
> Regards
> -- 
> View this message in context: http://www.nabble.com/%22mvn-install-site%22-performs-test-phase-2-times--tp16719990s177p16719990.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org