You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andrew Hughes <ah...@gmail.com> on 2010/09/03 03:28:59 UTC
-Dmaven.test.skip=true && jar:test-jar
Hi Guys,
When -Dmaven.test.skip=true the jar:test-jar goals are skipped. Other
modules who have a dependency on the jar:test-jar artifact then fail
(unresolved dependency).
Is this a sensible default for the plugin and any idea's how I can override
this?
Thanks heaps (again) :)
--Andrew
Re: -Dmaven.test.skip=true && jar:test-jar
Posted by Andrew Hughes <ah...@gmail.com>.
I was avoiding this, but you're both only re-enforcing what I was thinking
of doing.
I have raised this as an issue (improvement) for the jar plugin
http://jira.codehaus.org/browse/MJAR-138 at least it's on the radar that
way. Please feel encouraged to comment/edit the issue if you can add improve
or compliment any of the info I submitted.
Thanks v much for your help && CHEERS :)
On Fri, Sep 3, 2010 at 11:48 PM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:
> That is my personal preference as well, but sometimes people do what they
> want to do ;-)
>
> On 3 September 2010 15:14, Benson Margulies <bi...@gmail.com> wrote:
>
> > 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 <
> > stephen.alan.connolly@gmail.com> wrote:
> >
> > > -DskipTests only skips running the tests not building the test-jar
> > >
> > > On 3 September 2010 09:58, Andrew Hughes <ah...@gmail.com> 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 <
> > > > stephen.alan.connolly@gmail.com> wrote:
> > > >
> > > > > and you don't need the =true for -DskipTests
> > > > >
> > > > > On 3 September 2010 08:17, Barrie Treloar <ba...@gmail.com>
> > wrote:
> > > > >
> > > > > > On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
> > > > > > <st...@gmail.com> 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: users-unsubscribe@maven.apache.org
> > > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Re: -Dmaven.test.skip=true && jar:test-jar
Posted by Stephen Connolly <st...@gmail.com>.
That is my personal preference as well, but sometimes people do what they
want to do ;-)
On 3 September 2010 15:14, Benson Margulies <bi...@gmail.com> wrote:
> 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 <
> stephen.alan.connolly@gmail.com> wrote:
>
> > -DskipTests only skips running the tests not building the test-jar
> >
> > On 3 September 2010 09:58, Andrew Hughes <ah...@gmail.com> 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 <
> > > stephen.alan.connolly@gmail.com> wrote:
> > >
> > > > and you don't need the =true for -DskipTests
> > > >
> > > > On 3 September 2010 08:17, Barrie Treloar <ba...@gmail.com>
> wrote:
> > > >
> > > > > On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
> > > > > <st...@gmail.com> 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: users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > >
> > > > >
> > > >
> > >
> >
>
Re: -Dmaven.test.skip=true && jar:test-jar
Posted by Benson Margulies <bi...@gmail.com>.
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 <
stephen.alan.connolly@gmail.com> wrote:
> -DskipTests only skips running the tests not building the test-jar
>
> On 3 September 2010 09:58, Andrew Hughes <ah...@gmail.com> 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 <
> > stephen.alan.connolly@gmail.com> wrote:
> >
> > > and you don't need the =true for -DskipTests
> > >
> > > On 3 September 2010 08:17, Barrie Treloar <ba...@gmail.com> wrote:
> > >
> > > > On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
> > > > <st...@gmail.com> 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: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> >
>
Re: -Dmaven.test.skip=true && jar:test-jar
Posted by Stephen Connolly <st...@gmail.com>.
-DskipTests only skips running the tests not building the test-jar
On 3 September 2010 09:58, Andrew Hughes <ah...@gmail.com> 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 <
> stephen.alan.connolly@gmail.com> wrote:
>
> > and you don't need the =true for -DskipTests
> >
> > On 3 September 2010 08:17, Barrie Treloar <ba...@gmail.com> wrote:
> >
> > > On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
> > > <st...@gmail.com> 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: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>
Re: -Dmaven.test.skip=true && jar:test-jar
Posted by Andrew Hughes <ah...@gmail.com>.
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 <
stephen.alan.connolly@gmail.com> wrote:
> and you don't need the =true for -DskipTests
>
> On 3 September 2010 08:17, Barrie Treloar <ba...@gmail.com> wrote:
>
> > On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
> > <st...@gmail.com> 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
Re: -Dmaven.test.skip=true && jar:test-jar
Posted by Stephen Connolly <st...@gmail.com>.
and you don't need the =true for -DskipTests
On 3 September 2010 08:17, Barrie Treloar <ba...@gmail.com> wrote:
> On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
> <st...@gmail.com> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: -Dmaven.test.skip=true && jar:test-jar
Posted by Barrie Treloar <ba...@gmail.com>.
On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
<st...@gmail.com> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: -Dmaven.test.skip=true && jar:test-jar
Posted by Stephen Connolly <st...@gmail.com>.
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"
-Stephen
On 3 September 2010 02:28, Andrew Hughes <ah...@gmail.com> wrote:
> Hi Guys,
>
> When -Dmaven.test.skip=true the jar:test-jar goals are skipped. Other
> modules who have a dependency on the jar:test-jar artifact then fail
> (unresolved dependency).
>
> Is this a sensible default for the plugin and any idea's how I can override
> this?
>
> Thanks heaps (again) :)
> --Andrew
>
Re: -Dmaven.test.skip=true && jar:test-jar
Posted by Barrie Treloar <ba...@gmail.com>.
On Fri, Sep 3, 2010 at 10:58 AM, Andrew Hughes <ah...@gmail.com> wrote:
> Hi Guys,
>
> When -Dmaven.test.skip=true the jar:test-jar goals are skipped. Other
> modules who have a dependency on the jar:test-jar artifact then fail
> (unresolved dependency).
>
> Is this a sensible default for the plugin and any idea's how I can override
> this?
>
> Thanks heaps (again) :)
> --Andrew
>
I've noticed this too.
But when thinking about it, I *really* do want my tests to be working.
So its important to fix them.
One case where this is a problem is in integration tests and someone
plays with the data in databases. Whole tests start failing.
And then someone wants to cut a release ...
So we work around this issue by doing
-Dmaven.test.failure.ignore=true
which still runs the tests, so the test-jar gets built, but ignores
all failures.
Dont do it often, but its in the toolbox for when you do.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org