You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Markus Karg <ka...@quipsy.de> on 2012/07/27 15:06:06 UTC

Failsafe Plugin: How to get resource dependencies for integration-tests?

Hello Maven Community,

 

I have a complex setup to do for an end-to-end integration test. For
this, I am using the Maven Failsafe plugin. As the test needs some
resources to run (which I plan to put into Nexus as this feels just
natural), I want to tell Maven that when the integration test is
running, it shall download them and put them on the HDD. Is there a way
to specifiy such "intergration-test"-scoped dependencies?

 

Thanks!

Markus

 


Re: Failsafe Plugin: How to get resource dependencies for integration-tests?

Posted by Wayne Fay <wa...@gmail.com>.
> natural), I want to tell Maven that when the integration test is
> running, it shall download them and put them on the HDD. Is there a way
> to specifiy such "intergration-test"-scoped dependencies?

I am unaware of any such integration-test scope for dependencies. I
would just use "test" scope for this purpose.

You may also find this plugin helpful: maven-remote-resources-plugin

Wayne

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


Re: Failsafe Plugin: How to get resource dependencies for integration-tests?

Posted by Ansgar Konermann <an...@googlemail.com>.
If you don't need resource filtering, you could just put the jar with your
resources on the test classpath, i. e. add a test-scoped dependency to the
module containing the integration test.
Am 27.07.2012 15:06 schrieb "Markus Karg" <ka...@quipsy.de>:

> Hello Maven Community,
>
>
>
> I have a complex setup to do for an end-to-end integration test. For
> this, I am using the Maven Failsafe plugin. As the test needs some
> resources to run (which I plan to put into Nexus as this feels just
> natural), I want to tell Maven that when the integration test is
> running, it shall download them and put them on the HDD. Is there a way
> to specifiy such "intergration-test"-scoped dependencies?
>
>
>
> Thanks!
>
> Markus
>
>
>
>

RE: Failsafe Plugin: How to get resource dependencies for integration-tests?

Posted by Markus KARG <ma...@headcrashing.eu>.
Good point! :-)

> -----Original Message-----
> From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
> Sent: Montag, 30. Juli 2012 16:11
> To: Maven Users List
> Subject: Re: Failsafe Plugin: How to get resource dependencies for
> integration-tests?
> 
> I suggest binding to the pre-integration-test phase as there is no
> guarantee that the dependency plugin will always execute before
> failsafe if you are binding to the integration-test phase
> 
> On 30 July 2012 11:12, Markus Karg <ka...@quipsy.de> wrote:
> 
> > Thanks to all for all the kind help!
> >
> > In fact I made it work, and the solution is as simple as using the
> > dependency plugin:
> >
> > <plugin>
> >         <artifactId>maven-dependency-plugin</artifactId>
> >         <version>2.4</version>
> >         <executions>
> >                 <execution>
> >                         <id>copy</id>
> >                         <phase>integration-test</phase>
> >                         <goals>
> >                                 <goal>copy</goal>
> >                         </goals>
> >                         <configuration>
> >                                 <artifactItems>
> >                                         <artifactItem>
> >                                                 <groupId>G</groupId>
> >
> <artifactId>A</artifactId>
> >                                                 <version>V</version>
> >                                                 <type>db</type>
> >
> > <destFileName>myDbFile.db</destFileName>
> >                                         </artifactItem>
> >                                 </artifactItems>
> >                         </configuration>
> >                 </execution>
> >         </executions>
> > </plugin>
> >
> > Regards
> > Markus
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Laird Nelson [mailto:ljnelson@gmail.com]
> > Gesendet: Freitag, 27. Juli 2012 17:31
> > An: Maven Users List
> > Betreff: Re: Failsafe Plugin: How to get resource dependencies for
> > integration-tests?
> >
> > On Fri, Jul 27, 2012 at 7:27 AM, Martin Gainty <mg...@hotmail.com>
> > wrote:
> >
> > > Marcus
> > > you can copy applicable resources with maven-resources-plugin
> > >
> > http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-
> resources.htmljustrememberto hook the phase you want to bind to e.g.
> > > <phase>validate</phase>maven phases are listed here:
> > > http://maven.apache.org/guides/introduction/introduction-to-the-
> life
> > > cy
> > > cle.html
> >
> >
> > You might also find this helpful:
> > http://maven.apache.org/plugins/maven-remote-resources-plugin/
> >
> > Best,
> > Laird
> >
> > --
> > http://about.me/lairdnelson
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >


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


Re: Failsafe Plugin: How to get resource dependencies for integration-tests?

Posted by Stephen Connolly <st...@gmail.com>.
I suggest binding to the pre-integration-test phase as there is no
guarantee that the dependency plugin will always execute before failsafe if
you are binding to the integration-test phase

On 30 July 2012 11:12, Markus Karg <ka...@quipsy.de> wrote:

> Thanks to all for all the kind help!
>
> In fact I made it work, and the solution is as simple as using the
> dependency plugin:
>
> <plugin>
>         <artifactId>maven-dependency-plugin</artifactId>
>         <version>2.4</version>
>         <executions>
>                 <execution>
>                         <id>copy</id>
>                         <phase>integration-test</phase>
>                         <goals>
>                                 <goal>copy</goal>
>                         </goals>
>                         <configuration>
>                                 <artifactItems>
>                                         <artifactItem>
>                                                 <groupId>G</groupId>
>                                                 <artifactId>A</artifactId>
>                                                 <version>V</version>
>                                                 <type>db</type>
>
> <destFileName>myDbFile.db</destFileName>
>                                         </artifactItem>
>                                 </artifactItems>
>                         </configuration>
>                 </execution>
>         </executions>
> </plugin>
>
> Regards
> Markus
>
> -----Ursprüngliche Nachricht-----
> Von: Laird Nelson [mailto:ljnelson@gmail.com]
> Gesendet: Freitag, 27. Juli 2012 17:31
> An: Maven Users List
> Betreff: Re: Failsafe Plugin: How to get resource dependencies for
> integration-tests?
>
> On Fri, Jul 27, 2012 at 7:27 AM, Martin Gainty <mg...@hotmail.com>
> wrote:
>
> > Marcus
> > you can copy applicable resources with maven-resources-plugin
> >
> http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.htmljustrememberto hook the phase you want to bind to e.g.
> > <phase>validate</phase>maven phases are listed here:
> > http://maven.apache.org/guides/introduction/introduction-to-the-lifecy
> > cle.html
>
>
> You might also find this helpful:
> http://maven.apache.org/plugins/maven-remote-resources-plugin/
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

AW: Failsafe Plugin: How to get resource dependencies for integration-tests?

Posted by Markus Karg <ka...@quipsy.de>.
Thanks to all for all the kind help!

In fact I made it work, and the solution is as simple as using the dependency plugin:

<plugin>
	<artifactId>maven-dependency-plugin</artifactId>
	<version>2.4</version>
	<executions>
		<execution>
			<id>copy</id>
			<phase>integration-test</phase>
			<goals>
				<goal>copy</goal>
			</goals>
			<configuration>
				<artifactItems>
					<artifactItem>
						<groupId>G</groupId>
						<artifactId>A</artifactId>
						<version>V</version>
						<type>db</type>
						<destFileName>myDbFile.db</destFileName>
					</artifactItem>
				</artifactItems>
			</configuration>
		</execution>
	</executions>
</plugin>

Regards
Markus

-----Ursprüngliche Nachricht-----
Von: Laird Nelson [mailto:ljnelson@gmail.com] 
Gesendet: Freitag, 27. Juli 2012 17:31
An: Maven Users List
Betreff: Re: Failsafe Plugin: How to get resource dependencies for integration-tests?

On Fri, Jul 27, 2012 at 7:27 AM, Martin Gainty <mg...@hotmail.com> wrote:

> Marcus
> you can copy applicable resources with maven-resources-plugin 
> http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.htmljustremember to hook the phase you want to bind to e.g.
> <phase>validate</phase>maven phases are listed here:
> http://maven.apache.org/guides/introduction/introduction-to-the-lifecy
> cle.html


You might also find this helpful:
http://maven.apache.org/plugins/maven-remote-resources-plugin/

Best,
Laird

--
http://about.me/lairdnelson

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

Re: Failsafe Plugin: How to get resource dependencies for integration-tests?

Posted by Laird Nelson <lj...@gmail.com>.
On Fri, Jul 27, 2012 at 7:27 AM, Martin Gainty <mg...@hotmail.com> wrote:

> Marcus
> you can copy applicable resources with maven-resources-plugin
> http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.htmljustremember to hook the phase you want to bind to e.g.
> <phase>validate</phase>maven phases are listed here:
> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html


You might also find this helpful:
http://maven.apache.org/plugins/maven-remote-resources-plugin/

Best,
Laird

-- 
http://about.me/lairdnelson

RE: Failsafe Plugin: How to get resource dependencies for integration-tests?

Posted by Martin Gainty <mg...@hotmail.com>.
Marcus
you can copy applicable resources with maven-resources-plugin http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.htmljust remember to hook the phase you want to bind to e.g. <phase>validate</phase>maven phases are listed here:http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
Viel Gluck!
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
 > Subject: Failsafe Plugin: How to get resource dependencies for integration-tests?
> Date: Fri, 27 Jul 2012 15:06:06 +0200
> From: karg@quipsy.de
> To: users@maven.apache.org
> 
> Hello Maven Community,
> 
>  
> 
> I have a complex setup to do for an end-to-end integration test. For
> this, I am using the Maven Failsafe plugin. As the test needs some
> resources to run (which I plan to put into Nexus as this feels just
> natural), I want to tell Maven that when the integration test is
> running, it shall download them and put them on the HDD. Is there a way
> to specifiy such "intergration-test"-scoped dependencies?
> 
>  
> 
> Thanks!
> 
> Markus
> 
>  
>