You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Benson Margulies <bi...@gmail.com> on 2010/08/02 19:00:57 UTC

A dependency only for the dependency plugin

I want to include a dependency in a POM *only* so I can process it in
the dependency plugin. I want it never to end up in any classpath.

What's the right scope?

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


Re: A dependency only for the dependency plugin

Posted by lukewpatterson <lu...@gmail.com>.

Brian Fox-3 wrote:
> 
> ... It's possible that this would work correctly in M3
> though because of the rework in the resolution.
> 

that would be nice, then the project wouldn't have to be aware of whether or
not it was a module and if the artifact was part of its enclosing
multi-module project
-- 
View this message in context: http://maven.40175.n5.nabble.com/A-dependency-only-for-the-dependency-plugin-tp2261982p2265327.html
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


Re: A dependency only for the dependency plugin

Posted by Brian Fox <br...@infinity.nu>.
In M3 the reactor is treated like a local repository layer in the
resolution, meaning the plugin doesn't have to do anything special to
consider the reactor as is the case in m2. So using the same plugin in
M3 will work better.

On Thu, Aug 5, 2010 at 9:08 AM, Benson Margulies <bi...@gmail.com> wrote:
> I don't understand the remark about M3. Either it implies that it
> \won't/ work in M2, or perhaps you left out a  word?
>
> On Wed, Aug 4, 2010 at 7:26 PM, Brian Fox <br...@infinity.nu> wrote:
>> In that case you'll need to use the unpack-dependencies goal along
>> with provided. It's possible that this would work correctly in M3
>> though because of the rework in the resolution.
>>
>> On Mon, Aug 2, 2010 at 9:18 PM, Benson Margulies <bi...@gmail.com> wrote:
>>> On Mon, Aug 2, 2010 at 4:17 PM, Brian Fox <br...@infinity.nu> wrote:
>>>> Your case was why I originally wrote these goals to take the artifact
>>>> info as configuration instead of from the dependency list. The only
>>>> reason you would want to use a dependency and the
>>>> copy/unpack-dependencies would be if:
>>>> You need to resolve dependencies produced by another module in the same reactor
>>>> You're using ranges.
>>>
>>> That is exactly my problem. Inside one aggre(g/v)ating project, I want
>>> to build module A, and then unpack it as part of setting up module B.
>>> So to ensure order I want to list A in B's dependencies ... but it
>>> does not ever belong on the classpath.
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
> ---------------------------------------------------------------------
> 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: A dependency only for the dependency plugin

Posted by Benson Margulies <bi...@gmail.com>.
I don't understand the remark about M3. Either it implies that it
\won't/ work in M2, or perhaps you left out a  word?

On Wed, Aug 4, 2010 at 7:26 PM, Brian Fox <br...@infinity.nu> wrote:
> In that case you'll need to use the unpack-dependencies goal along
> with provided. It's possible that this would work correctly in M3
> though because of the rework in the resolution.
>
> On Mon, Aug 2, 2010 at 9:18 PM, Benson Margulies <bi...@gmail.com> wrote:
>> On Mon, Aug 2, 2010 at 4:17 PM, Brian Fox <br...@infinity.nu> wrote:
>>> Your case was why I originally wrote these goals to take the artifact
>>> info as configuration instead of from the dependency list. The only
>>> reason you would want to use a dependency and the
>>> copy/unpack-dependencies would be if:
>>> You need to resolve dependencies produced by another module in the same reactor
>>> You're using ranges.
>>
>> That is exactly my problem. Inside one aggre(g/v)ating project, I want
>> to build module A, and then unpack it as part of setting up module B.
>> So to ensure order I want to list A in B's dependencies ... but it
>> does not ever belong on the classpath.
>>
>> ---------------------------------------------------------------------
>> 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
>
>

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


Re: A dependency only for the dependency plugin

Posted by Brian Fox <br...@infinity.nu>.
In that case you'll need to use the unpack-dependencies goal along
with provided. It's possible that this would work correctly in M3
though because of the rework in the resolution.

On Mon, Aug 2, 2010 at 9:18 PM, Benson Margulies <bi...@gmail.com> wrote:
> On Mon, Aug 2, 2010 at 4:17 PM, Brian Fox <br...@infinity.nu> wrote:
>> Your case was why I originally wrote these goals to take the artifact
>> info as configuration instead of from the dependency list. The only
>> reason you would want to use a dependency and the
>> copy/unpack-dependencies would be if:
>> You need to resolve dependencies produced by another module in the same reactor
>> You're using ranges.
>
> That is exactly my problem. Inside one aggre(g/v)ating project, I want
> to build module A, and then unpack it as part of setting up module B.
> So to ensure order I want to list A in B's dependencies ... but it
> does not ever belong on the classpath.
>
> ---------------------------------------------------------------------
> 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: A dependency only for the dependency plugin

Posted by Benson Margulies <bi...@gmail.com>.
On Mon, Aug 2, 2010 at 4:17 PM, Brian Fox <br...@infinity.nu> wrote:
> Your case was why I originally wrote these goals to take the artifact
> info as configuration instead of from the dependency list. The only
> reason you would want to use a dependency and the
> copy/unpack-dependencies would be if:
> You need to resolve dependencies produced by another module in the same reactor
> You're using ranges.

That is exactly my problem. Inside one aggre(g/v)ating project, I want
to build module A, and then unpack it as part of setting up module B.
So to ensure order I want to list A in B's dependencies ... but it
does not ever belong on the classpath.

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


Re: A dependency only for the dependency plugin

Posted by Brian Fox <br...@infinity.nu>.
Your case was why I originally wrote these goals to take the artifact
info as configuration instead of from the dependency list. The only
reason you would want to use a dependency and the
copy/unpack-dependencies would be if:
You need to resolve dependencies produced by another module in the same reactor
You're using ranges.

If neither are true, you can use copy/unpack and it should be fine.

On Mon, Aug 2, 2010 at 3:05 PM, Benson Margulies <bi...@gmail.com> wrote:
> I'm using the unpack goal in the depenency plugin. Somehow I got the
> idea that it was better to declare the thing I am unpacking as a
> dependency (even if I don't want it in the classpath) instead of just
> giving the other unpack goal a full GAV.
>
> On Mon, Aug 2, 2010 at 1:34 PM, lukewpatterson <lu...@gmail.com> wrote:
>>
>>
>> Benson Margulies wrote:
>>>
>>> process it in the dependency plugin.
>>>
>>
>> what do you mean by "process"? if you mean "copy" or "unpack", m-d-p [1] has
>> separate goals for working with artifacts listed in the configuration
>> section and working with project <dependency>s
>>
>> e.g. see "copy" [2] vs. "copy-dependencies" [3]
>>
>> [1] http://maven.apache.org/plugins/maven-dependency-plugin/
>> [2] http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html
>> [3]
>> http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
>> --
>> View this message in context: http://maven.40175.n5.nabble.com/A-dependency-only-for-the-dependency-plugin-tp2261982p2262028.html
>> 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
>
>

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


Re: A dependency only for the dependency plugin

Posted by Benson Margulies <bi...@gmail.com>.
I'm using the unpack goal in the depenency plugin. Somehow I got the
idea that it was better to declare the thing I am unpacking as a
dependency (even if I don't want it in the classpath) instead of just
giving the other unpack goal a full GAV.

On Mon, Aug 2, 2010 at 1:34 PM, lukewpatterson <lu...@gmail.com> wrote:
>
>
> Benson Margulies wrote:
>>
>> process it in the dependency plugin.
>>
>
> what do you mean by "process"? if you mean "copy" or "unpack", m-d-p [1] has
> separate goals for working with artifacts listed in the configuration
> section and working with project <dependency>s
>
> e.g. see "copy" [2] vs. "copy-dependencies" [3]
>
> [1] http://maven.apache.org/plugins/maven-dependency-plugin/
> [2] http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html
> [3]
> http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
> --
> View this message in context: http://maven.40175.n5.nabble.com/A-dependency-only-for-the-dependency-plugin-tp2261982p2262028.html
> 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: A dependency only for the dependency plugin

Posted by lukewpatterson <lu...@gmail.com>.

Benson Margulies wrote:
> 
> process it in the dependency plugin.
> 

what do you mean by "process"? if you mean "copy" or "unpack", m-d-p [1] has
separate goals for working with artifacts listed in the configuration
section and working with project <dependency>s

e.g. see "copy" [2] vs. "copy-dependencies" [3] 

[1] http://maven.apache.org/plugins/maven-dependency-plugin/
[2] http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html
[3]
http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
-- 
View this message in context: http://maven.40175.n5.nabble.com/A-dependency-only-for-the-dependency-plugin-tp2261982p2262028.html
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


Re: A dependency only for the dependency plugin

Posted by Ron Wheeler <rw...@artifact-software.com>.
  "provided"
On 02/08/2010 1:00 PM, Benson Margulies wrote:
> I want to include a dependency in a POM *only* so I can process it in
> the dependency plugin. I want it never to end up in any classpath.
>
> What's the right scope?
>
> ---------------------------------------------------------------------
> 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