I want to attach it to package phase and below is my pom file. But it doesn't
produce the test jar file either.

<plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-jar-plugin</artifactId>
                                <version>2.2</version>
                                <inherited>false</inherited>
                                <executions>
                                        <execution>
                                                <phase>package</phase>
                                                <goals>
                                                        <goal>test-jar</goal>
                                                </goals>
                                        </execution>
                                </executions>
                                <configuration>
                                        
<outputDirectory>target/</outputDirectory>
                                        <excludes>
                                        <!-- 
                                                
<exclude>**/ui_demo_zh_CN.properties</exclude>
                                                -->
                                                <exclude>**/dcm/**</exclude>
                                        </excludes>

                                        <archive>
                                                <manifest>
                                                        
<addClasspath>true</addClasspath>
                                                        
                                                </manifest>
                                                <manifestEntries>
                                                        <mode>development</mode>
                                                </manifestEntries>
                                                
<manifestFile>src/test/resources/MANIFEST.MF</manifestFile>

                                        </archive>
                                </configuration>
                        </plugin>

Wayne Fay wrote:
> 
> The test-jar artifact is only produced for poms with packaging set to
> test-jar. You can distinguish these poms/jars as they use the
> classifier "tests".
> 
> Read this for more info:
> http://maven.apache.org/guides/mini/guide-attached-tests.html
> 
> Wayne
> 
> On 8/23/08, youhaodeyi <[EMAIL PROTECTED]> wrote:
>>
>> When running "mvn package", there should be two jars, one is the
>> java-application.jar the other is test.jar. Why wasn't the test.jar
>> produced?
>>
>> I found there is a jar plugin for maven, is it for both "jar:jar" and
>> "jar:test-jar"? How can I distinguish them?
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-package-test-jar--tp19127023p19127023.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-package-test-jar--tp19127023p19136879.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to