I have artifacts that I also build test jars from. The test jars is then
referenced by other artifacts.

The artifact (ansattportal-commons) that also should exist as test jar
(tests and test resources):
<build>
       <plugins>
               <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-jar-plugin</artifactId>
                                <executions>
                                        <execution>
                                                <goals>
                                                        <goal>test-jar</goal>
                                                </goals>
                                        </execution>
                                </executions>
                        </plugin>
            </plugins>
</build>


The artifact that depends is configured like this:
             <dependencies> 
                <dependency>
                        <groupId>no.avinor</groupId>
                        <artifactId>ansattportal-commons</artifactId>
                        <version>1.0-SNAPSHOT</version>     
                </dependency>
                <dependency>
                        <groupId>no.avinor</groupId>
                        <artifactId>ansattportal-commons</artifactId>
                        <version>1.0-SNAPSHOT</version>
                        <type>test-jar</type>
                        <scope>test</scope>
                </dependency>
        </dependencies>

-Ronny


Trygve Laugst?l-5 wrote:
> 
> hamdard wrote:
>> My problem is that I don't have the jar available in advance to add it to
>> the
>> maven's dependency section with scopt test.
>> 
>> The jar is generated as part of a maven lifecycle prior to test
>> ()generate-sources. I need the ability to add a  a directory to the test
>> classpath with a filter *.jar
> 
> Make the plugin attach the generated (test) source directory to the 
> project and the compile plugin will compile the sources and include them 
> in the test class path automatically.
> 
> --
> Trygve
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-m2-How-to-get-files-into-test-classpath--tf987507.html#a6635942
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