You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Neil Blue <ne...@1spatial.com> on 2007/04/04 16:49:36 UTC

How to access a dependency path in the pom?

Hello,

I am starting to use Cargo for functional testing in maven2. I would like to 
store the tomcat install zip in the local repository and then resolve the 
path to the dependancy as a system property in at test. For example:

...
    <dependency>
      <groupId>tomcat</groupId>
      <artifactId>tomcat-zip</artifactId>
      <version>5</version>
      <type>zip</type>
    </dependency>       
...

...
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <printSummary>true</printSummary>
          <useFile>false</useFile>          
          <systemProperties>
            <property>
              <name>tomcat.zip</name>
              <value>${XXX}</value>              
            </property>
          </systemProperties>
        </configuration>
      </plugin>
...

Please can anyone tell me how to get the path to a dependancy like this in the 
pom.

Thanks
Neil

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


RE: How to access a dependency path in the pom?

Posted by David Jackman <Da...@fastsearch.com>.
Franz gave me the same "on top of my head" advice when I pretty much
asked the same question earlier this week.  I did some looking around,
and it appears he's right--that's the only way to do it.

This page shows the usage to make this work:
http://maven.apache.org/plugins/maven-dependency-plugin/usage.html.
Look under the dependency:copy mojo.  And note that when I set the
overWrite property to false, it never copied the dependency at all.

..David..
 

-----Original Message-----
From: franz see [mailto:franz.see@gmail.com] 
Sent: Wednesday, April 04, 2007 9:53 AM
To: users@maven.apache.org
Subject: Re: How to access a dependency path in the pom?


Good day to you, Neil ,

On top of my head,....

1. Copy your tomcat-zip somewhere in your target ( probably using the
maven-dependency-plugin ).
2. Set ${XXX} to the location where you copied tomcat-zip

Cheers,
Franz


neilb wrote:
> 
> Hello,
> 
> I am starting to use Cargo for functional testing in maven2. I would 
> like to store the tomcat install zip in the local repository and then 
> resolve the path to the dependancy as a system property in at test. 
> For example:
> 
> ...
>     <dependency>
>       <groupId>tomcat</groupId>
>       <artifactId>tomcat-zip</artifactId>
>       <version>5</version>
>       <type>zip</type>
>     </dependency>       
> ...
> 
> ...
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <printSummary>true</printSummary>
>           <useFile>false</useFile>          
>           <systemProperties>
>             <property>
>               <name>tomcat.zip</name>
>               <value>${XXX}</value>              
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
> ...
> 
> Please can anyone tell me how to get the path to a dependancy like 
> this in the pom.
> 
> Thanks
> Neil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

--
View this message in context:
http://www.nabble.com/How-to-access-a-dependency-path-in-the-pom--tf3526
274s177.html#a9839108
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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: How to access a dependency path in the pom?

Posted by Neil Blue <ne...@1spatial.com>.
Thanks Franz,

That works just great.

Cheers
Neil

On Wednesday 04 April 2007 16:52, franz see wrote:
> Good day to you, Neil ,
>
> On top of my head,....
>
> 1. Copy your tomcat-zip somewhere in your target ( probably using the
> maven-dependency-plugin ).
> 2. Set ${XXX} to the location where you copied tomcat-zip
>
> Cheers,
> Franz
>
> neilb wrote:
> > Hello,
> >
> > I am starting to use Cargo for functional testing in maven2. I would like
> > to
> > store the tomcat install zip in the local repository and then resolve the
> > path to the dependancy as a system property in at test. For example:
> >
> > ...
> >     <dependency>
> >       <groupId>tomcat</groupId>
> >       <artifactId>tomcat-zip</artifactId>
> >       <version>5</version>
> >       <type>zip</type>
> >     </dependency>
> > ...
> >
> > ...
> >         <groupId>org.apache.maven.plugins</groupId>
> >         <artifactId>maven-surefire-plugin</artifactId>
> >         <configuration>
> >           <printSummary>true</printSummary>
> >           <useFile>false</useFile>
> >           <systemProperties>
> >             <property>
> >               <name>tomcat.zip</name>
> >               <value>${XXX}</value>
> >             </property>
> >           </systemProperties>
> >         </configuration>
> >       </plugin>
> > ...
> >
> > Please can anyone tell me how to get the path to a dependancy like this
> > in the
> > pom.
> >
> > Thanks
> > Neil
> >
> > ---------------------------------------------------------------------
> > 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: How to access a dependency path in the pom?

Posted by franz see <fr...@gmail.com>.
Good day to you, Neil ,

On top of my head,....

1. Copy your tomcat-zip somewhere in your target ( probably using the
maven-dependency-plugin ).
2. Set ${XXX} to the location where you copied tomcat-zip

Cheers,
Franz


neilb wrote:
> 
> Hello,
> 
> I am starting to use Cargo for functional testing in maven2. I would like
> to 
> store the tomcat install zip in the local repository and then resolve the 
> path to the dependancy as a system property in at test. For example:
> 
> ...
>     <dependency>
>       <groupId>tomcat</groupId>
>       <artifactId>tomcat-zip</artifactId>
>       <version>5</version>
>       <type>zip</type>
>     </dependency>       
> ...
> 
> ...
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <printSummary>true</printSummary>
>           <useFile>false</useFile>          
>           <systemProperties>
>             <property>
>               <name>tomcat.zip</name>
>               <value>${XXX}</value>              
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
> ...
> 
> Please can anyone tell me how to get the path to a dependancy like this in
> the 
> pom.
> 
> Thanks
> Neil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-access-a-dependency-path-in-the-pom--tf3526274s177.html#a9839108
Sent from the Maven - Users mailing list archive at Nabble.com.


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