Hi Chris and everyone,


>the problem is that Eclipse doesn't know any difference between the
>normal classpath of an application and a test classpath that includes
>tests. For eclipse everything (application and test classes) are thrown
>into one basket. That's why you are able to build in Eclipse.

Makes sense as to why Eclipse does not discriminate.

>As Jörg mentioned, in maven there is no such thing as a test-jar type
>dependency.

>I guess you are refering to the test-jar goal of the jar plugin.

Correct.  I should have been more clear in my question.  I am referring to
the artifact bar-1.9.0-SNAPSHOT-tests.jar.


>Unfortunately these test jars are usually not deployed in the local or
>any remote maven reposiories, so they only exist in your projects target
>directory.

Actually, that isn't true. It does deploy.  At least it does for me.  It
seems to deploy both to my local repo as well as to Nexus.


And if I add a dependency like this:

<dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>dao</artifactId>
        <version>${project.version}</version>
        <scope>test</scope>
        <type>test-jar</type>
                </dependency>



it works (whether it officially is supposed to).  This dependency:

<dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>dao</artifactId>
        <version>${project.version}</version>
        <scope>test</scope>
        <type>test</type>
</dependency>

does not.

That is my question.  Thanks, guys!


John Kramer
email: jkra...@mojiva.com
mobile: 314.435.2370
skype: kramer.mojiva
twitter: @KramerKnowsTech <https://twitter.com/KramerKnowsTech>
0xCAFEBABE00000032


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

Reply via email to