You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-users@incubator.apache.org by Eric Kolotyluk <er...@gmail.com> on 2014/03/09 02:07:36 UTC

Maven Dependency on exe

I have a dependency

     <dependency>
       <groupId>net.kolotyluk.windows</groupId>
       <artifactId>elevate</artifactId>
       <version>0.0.1-SNAPSHOT</version>
       <type>exe</type>
       <scope>test</scope>
     </dependency>

The artifact is in my local repository installed from an NPanday build, 
but I want to be able to refer to it in my regular Java/Scala projects. 
In particular, my unit tests need to run this executable in order to do 
the unit tests properly.

Understandably 
C:\Users\Eric\.m2\repository\net\kolotyluk\windows\elevate\0.0.1-SNAPSHOT\elevate-0.0.1-SNAPSHOT.exe 
does not show up on the classpath, but is there some way to pass this 
information from Maven to the tests so they can find the executable?

Looking at the -X output from mvn, Maven is clearly aware of the 
artifact in my local repository.

Cheers, Eric

Re: Maven Dependency on exe

Posted by Eric Kolotyluk <er...@gmail.com>.
Cool, that does exactly what I want. Thanks so much.

Cheers, Eric

On 3/8/2014 9:33 PM, Dan Tran wrote:
> use maven dependency to copy your exe into your target/dependency
> directory.  Once that happen, you pass
> ${project.build.directory}/dependency/your.exe to your test
>
> -D
>
>
> On Sat, Mar 8, 2014 at 7:53 PM, Wayne Fay <wa...@gmail.com> wrote:
>
>>> Understandably
>>>
>> C:\Users\Eric\.m2\repository\net\kolotyluk\windows\elevate\0.0.1-SNAPSHOT\elevate-0.0.1-SNAPSHOT.exe
>>> does not show up on the classpath, but is there some way to pass this
>>> information from Maven to the tests so they can find the executable?
>> What unit test tool are you using? I would start looking there and
>> make it work (perhaps even hardcoding some paths etc to start), then
>> sort out a way to make it work with Maven once you have it working at
>> a basic level.
>>
>> Wayne
>>
>> ---------------------------------------------------------------------
>> 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: Maven Dependency on exe

Posted by Dan Tran <da...@gmail.com>.
use maven dependency to copy your exe into your target/dependency
directory.  Once that happen, you pass
${project.build.directory}/dependency/your.exe to your test

-D


On Sat, Mar 8, 2014 at 7:53 PM, Wayne Fay <wa...@gmail.com> wrote:

> > Understandably
> >
> C:\Users\Eric\.m2\repository\net\kolotyluk\windows\elevate\0.0.1-SNAPSHOT\elevate-0.0.1-SNAPSHOT.exe
> > does not show up on the classpath, but is there some way to pass this
> > information from Maven to the tests so they can find the executable?
>
> What unit test tool are you using? I would start looking there and
> make it work (perhaps even hardcoding some paths etc to start), then
> sort out a way to make it work with Maven once you have it working at
> a basic level.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven Dependency on exe

Posted by Wayne Fay <wa...@gmail.com>.
> Understandably
> C:\Users\Eric\.m2\repository\net\kolotyluk\windows\elevate\0.0.1-SNAPSHOT\elevate-0.0.1-SNAPSHOT.exe
> does not show up on the classpath, but is there some way to pass this
> information from Maven to the tests so they can find the executable?

What unit test tool are you using? I would start looking there and
make it work (perhaps even hardcoding some paths etc to start), then
sort out a way to make it work with Maven once you have it working at
a basic level.

Wayne

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