Hello,
>>Getting an artifact when you only have its coordinates is easy. Look at
the Mojo Cookbook:
>>http://docs.codehaus.org/display/MAVENUSER/Mojo%20Developer%20Cookbook
Thank you. I wish there was a plugin for it, but looks like I have to write
mojo.
And about naming. Look:
There is an artifact and pom.xml stored somewhere in my nexus for example.
I download pom.xml from it and want to run plugin that will:
1) download artifact itself
2) download all dependencies
Any action with "dependency" plugin would affect dependencies of artifact,
not artifact itself.
Sure I can edit pom.xml, rename artifact and add it as dependency, but I do
not want to edit it.
I need plugin that will download artifact from repository using pom.xml.
Example:
I have pom.xml:
<groupId>com.example</groupId>
<artifactId>myProject</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.example</groupId>
<artifactId>myLibrary</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
When I run "mvn plugin-i-want:some-goal" it should download
"com.example:myProject:1.0-SNAPSHOT" from my repository, unpack it and save
it in build directory like "compiler" plugin does with compiled code.
So, almost like compile but instead of compiling -- just download artifact
from repository :)
Thanks.
Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
"Develop with pleasure!"
-----Original Message-----
From: Wayne Fay [mailto:[email protected]]
Sent: Thursday, May 06, 2010 9:39 PM
To: Maven Users List
Subject: Re: Maven for project you do not have sources for
> Say, I have an artifact in repository and pom file for it. I want to
> download this artifact and run some code against it (some kind of
> tests). I
Getting an artifact when you only have its coordinates is easy. Look at the
Mojo Cookbook:
http://docs.codehaus.org/display/MAVENUSER/Mojo%20Developer%20Cookbook
> But if I do not have sources then I need a plug-in that will download
> artifact from repository and put binaries in "build" directory like if
> they
You can use dependency:unpack:
http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html
> I cannt use DEPENDENCY because projects does not have dependency on
> its self.
I don't understand this one. Just name the artifct of the project you're
working on differently than this artifact you're talking about.
A more concrete example may help us to provide better answers.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]