Quantcast

-Dmaven.test.skip=true && jar:test-jar

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

-Dmaven.test.skip=true && jar:test-jar

Andrew Hughes-5
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: -Dmaven.test.skip=true && jar:test-jar

Barrie Treloar
On Fri, Sep 3, 2010 at 10:58 AM, Andrew Hughes <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: -Dmaven.test.skip=true && jar:test-jar

stephenconnolly
In reply to this post by Andrew Hughes-5
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 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: -Dmaven.test.skip=true && jar:test-jar

Barrie Treloar
On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
<[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: -Dmaven.test.skip=true && jar:test-jar

stephenconnolly
and you don't need the =true for -DskipTests

On 3 September 2010 08:17, Barrie Treloar <[hidden email]> wrote:

> On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
> <[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: -Dmaven.test.skip=true && jar:test-jar

Andrew Hughes-5
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 <
[hidden email]> wrote:

> and you don't need the =true for -DskipTests
>
> On 3 September 2010 08:17, Barrie Treloar <[hidden email]> wrote:
>
> > On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
> > <[hidden email]> 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: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: -Dmaven.test.skip=true && jar:test-jar

stephenconnolly
-DskipTests only skips running the tests not building the test-jar

On 3 September 2010 09:58, Andrew Hughes <[hidden email]> 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 <
> [hidden email]> wrote:
>
> > and you don't need the =true for -DskipTests
> >
> > On 3 September 2010 08:17, Barrie Treloar <[hidden email]> wrote:
> >
> > > On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
> > > <[hidden email]> 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: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: -Dmaven.test.skip=true && jar:test-jar

Benson Margulies
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 <
[hidden email]> wrote:

> -DskipTests only skips running the tests not building the test-jar
>
> On 3 September 2010 09:58, Andrew Hughes <[hidden email]> 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 <
> > [hidden email]> wrote:
> >
> > > and you don't need the =true for -DskipTests
> > >
> > > On 3 September 2010 08:17, Barrie Treloar <[hidden email]> wrote:
> > >
> > > > On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
> > > > <[hidden email]> 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: [hidden email]
> > > > For additional commands, e-mail: [hidden email]
> > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: -Dmaven.test.skip=true && jar:test-jar

stephenconnolly
That is my personal preference as well, but sometimes people do what they
want to do ;-)

On 3 September 2010 15:14, Benson Margulies <[hidden email]> 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 <
> [hidden email]> wrote:
>
> > -DskipTests only skips running the tests not building the test-jar
> >
> > On 3 September 2010 09:58, Andrew Hughes <[hidden email]> 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 <
> > > [hidden email]> wrote:
> > >
> > > > and you don't need the =true for -DskipTests
> > > >
> > > > On 3 September 2010 08:17, Barrie Treloar <[hidden email]>
> wrote:
> > > >
> > > > > On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
> > > > > <[hidden email]> 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: [hidden email]
> > > > > For additional commands, e-mail: [hidden email]
> > > > >
> > > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: -Dmaven.test.skip=true && jar:test-jar

Andrew Hughes-5
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 <
[hidden email]> 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 <[hidden email]> 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 <
> > [hidden email]> wrote:
> >
> > > -DskipTests only skips running the tests not building the test-jar
> > >
> > > On 3 September 2010 09:58, Andrew Hughes <[hidden email]> 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 <
> > > > [hidden email]> wrote:
> > > >
> > > > > and you don't need the =true for -DskipTests
> > > > >
> > > > > On 3 September 2010 08:17, Barrie Treloar <[hidden email]>
> > wrote:
> > > > >
> > > > > > On Fri, Sep 3, 2010 at 4:15 PM, Stephen Connolly
> > > > > > <[hidden email]> 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: [hidden email]
> > > > > > For additional commands, e-mail: [hidden email]
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Loading...