There are a number of pitfalls with test jars. My entirely personal
suggestion is this: any time you are tempted to put a test jar configuration
into a POM, just go and make a new, ordinary, project with the shared test
code in it, and use it with <scope>test</scope>. You won't regret it.

On Fri, Sep 3, 2010 at 5:26 AM, Stephen Connolly <
[email protected]> wrote:

> -DskipTests only skips running the tests not building the test-jar
>
> On 3 September 2010 09:58, Andrew Hughes <[email protected]> wrote:
>
> > Hi Guys,
> >
> > The problem is not that we're skipping the tests. I really don't want to
> > run
> > the tests... but I do want the jar:test-jar to still run and build...
> > moduleA-0.0.0-test.jar so that other module <dependencies> still resolve
> > this.
> >
> >
> > On Fri, Sep 3, 2010 at 5:08 PM, Stephen Connolly <
> > [email protected]> wrote:
> >
> > > and you don't need the =true for -DskipTests
> > >
> > > On 3 September 2010 08:17, Barrie Treloar <[email protected]> wrote:
> > >
> > > > On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
> > > > <[email protected]> wrote:
> > > > > just use "-DskipTests" as that will skip running the tests but not
> > > > compiling
> > > > > or packaging them... oh and it's shorter than its alias
> > > > > "-Dmaven.skip.test.exec=true" as well as the bigger skip that you
> are
> > > > using
> > > > > "-Dmaven.skip.test=true"
> > > >
> > > > Whoops.
> > > > If I had read our internal wiki with this help hints I would have
> read:
> > > >
> > > > Skip Running Tests
> > > >  Run maven with -DskipTests=true, e.g.:
> > > >    mvn install -DskipTests=true
> > > >  (Dont use maven.test.skip as this doesn't generate the test-jar)
> > > >
> > > > Apologies.
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [email protected]
> > > > For additional commands, e-mail: [email protected]
> > > >
> > > >
> > >
> >
>

Reply via email to