Quantcast

dependency management within plugin dependencies

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

dependency management within plugin dependencies

Gregory Kick-2
I have a question about the behavior of the <dependencyManagement>
portion of a POM as it relates to plugin dependencies.

Say I have:
...
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>GROUP</groupId>
      <artifactId>ARTIFACT</artifactId>
    </dependency>
  </dependencies>
</dependencyManagement>
...

And in some project that inherits from this pom,
<plugin>
  ...
  <dependencies>
    <dependency>
      <groupId>GROUP</groupId>
      <artifactId>ARTIFACT</artifactId>
    </dependency>
  <delendencies>
  ...
</plugin>
will fail with a missing version.

Is this the expected behavior or is this a bug?


--
Gregory Kick
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dependency management within plugin dependencies

Wayne Fay
You're looking for <pluginManagement> I believe...

Wayne

On 12/6/06, Gregory Kick <[hidden email]> wrote:

> I have a question about the behavior of the <dependencyManagement>
> portion of a POM as it relates to plugin dependencies.
>
> Say I have:
> ...
> <dependencyManagement>
>  <dependencies>
>    <dependency>
>      <groupId>GROUP</groupId>
>      <artifactId>ARTIFACT</artifactId>
>    </dependency>
>  </dependencies>
> </dependencyManagement>
> ...
>
> And in some project that inherits from this pom,
> <plugin>
>  ...
>  <dependencies>
>    <dependency>
>      <groupId>GROUP</groupId>
>      <artifactId>ARTIFACT</artifactId>
>    </dependency>
>  <delendencies>
>  ...
> </plugin>
> will fail with a missing version.
>
> Is this the expected behavior or is this a bug?
>
>
> --
> Gregory Kick
> [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dependency management within plugin dependencies

Federico Yankelevich
In reply to this post by Gregory Kick-2
Hi,
dependencyManagement is inherited by children POMs.
It is useful to define a dependency within dependencyManagement tag expliciting the version there.
Then in the children POMs you can just declare your dependecy without having the version tag

have a look here: http://maven.apache.org/pom.html#Dependency%20Management

bye,
Federico

Gregory Kick-2 wrote
I have a question about the behavior of the <dependencyManagement>
portion of a POM as it relates to plugin dependencies.

Say I have:
...
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>GROUP</groupId>
      <artifactId>ARTIFACT</artifactId>
    </dependency>
  </dependencies>
</dependencyManagement>
...

And in some project that inherits from this pom,
<plugin>
  ...
  <dependencies>
    <dependency>
      <groupId>GROUP</groupId>
      <artifactId>ARTIFACT</artifactId>
    </dependency>
  <delendencies>
  ...
</plugin>
will fail with a missing version.

Is this the expected behavior or is this a bug?


--
Gregory Kick
gk5885@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: dependency management within plugin dependencies

Gregory Kick-2
Federico,

I'm aware of what it does...  The question was regarding dependencies
listed relative to a plugin.

Wayne,

The problem with <pluginManagement> is that I don't necessarily want a
dependency for every invocation of the pluign.

For example, say that have a plugin that uses the jaxb api and I want
to use jaxb in some situations and jaxme in others.  They have the
same api so it might be reasonable to want a plugin to execute using
one implementation in some instances and the other implementation in
another.  Additionally, I'd like to standardize the versions in the
same way as I would with a typical dependency, so that I always use
jaxb whatever-jaxb-version and jaxme whatever-jaxme-version.

My first thought is that a dependency that is listed under a plugin
should also utilize <dependencyManagement>, but that seems to not be
the case.  And, since there's no <dependencyManagement> under
<pluginManagement> I wondered whether this was intentional or an
oversight.

Thoughts?

On 12/7/06, Federico Yankelevich <[hidden email]> wrote:

>
> Hi,
> dependencyManagement is inherited by children POMs.
> It is useful to define a dependency within dependencyManagement tag
> expliciting the version there.
> Then in the children POMs you can just declare your dependecy without having
> the version tag
>
> have a look here: http://maven.apache.org/pom.html#Dependency%20Management
>
> bye,
> Federico
>
>
> Gregory Kick-2 wrote:
> >
> > I have a question about the behavior of the <dependencyManagement>
> > portion of a POM as it relates to plugin dependencies.
> >
> > Say I have:
> > ...
> > <dependencyManagement>
> >   <dependencies>
> >     <dependency>
> >       <groupId>GROUP</groupId>
> >       <artifactId>ARTIFACT</artifactId>
> >     </dependency>
> >   </dependencies>
> > </dependencyManagement>
> > ...
> >
> > And in some project that inherits from this pom,
> > <plugin>
> >   ...
> >   <dependencies>
> >     <dependency>
> >       <groupId>GROUP</groupId>
> >       <artifactId>ARTIFACT</artifactId>
> >     </dependency>
> >   <delendencies>
> >   ...
> > </plugin>
> > will fail with a missing version.
> >
> > Is this the expected behavior or is this a bug?
> >
> >
> > --
> > Gregory Kick
> > [hidden email]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/dependency-management-within-plugin-dependencies-tf2772190s177.html#a7735149
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Gregory Kick
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: dependency management within plugin dependencies

Wayne Fay
Sounds like a job for a <profile>.

Wayne

On 12/7/06, Gregory Kick <[hidden email]> wrote:

> Federico,
>
> I'm aware of what it does...  The question was regarding dependencies
> listed relative to a plugin.
>
> Wayne,
>
> The problem with <pluginManagement> is that I don't necessarily want a
> dependency for every invocation of the pluign.
>
> For example, say that have a plugin that uses the jaxb api and I want
> to use jaxb in some situations and jaxme in others.  They have the
> same api so it might be reasonable to want a plugin to execute using
> one implementation in some instances and the other implementation in
> another.  Additionally, I'd like to standardize the versions in the
> same way as I would with a typical dependency, so that I always use
> jaxb whatever-jaxb-version and jaxme whatever-jaxme-version.
>
> My first thought is that a dependency that is listed under a plugin
> should also utilize <dependencyManagement>, but that seems to not be
> the case.  And, since there's no <dependencyManagement> under
> <pluginManagement> I wondered whether this was intentional or an
> oversight.
>
> Thoughts?
>
> On 12/7/06, Federico Yankelevich <[hidden email]> wrote:
> >
> > Hi,
> > dependencyManagement is inherited by children POMs.
> > It is useful to define a dependency within dependencyManagement tag
> > expliciting the version there.
> > Then in the children POMs you can just declare your dependecy without having
> > the version tag
> >
> > have a look here: http://maven.apache.org/pom.html#Dependency%20Management
> >
> > bye,
> > Federico
> >
> >
> > Gregory Kick-2 wrote:
> > >
> > > I have a question about the behavior of the <dependencyManagement>
> > > portion of a POM as it relates to plugin dependencies.
> > >
> > > Say I have:
> > > ...
> > > <dependencyManagement>
> > >   <dependencies>
> > >     <dependency>
> > >       <groupId>GROUP</groupId>
> > >       <artifactId>ARTIFACT</artifactId>
> > >     </dependency>
> > >   </dependencies>
> > > </dependencyManagement>
> > > ...
> > >
> > > And in some project that inherits from this pom,
> > > <plugin>
> > >   ...
> > >   <dependencies>
> > >     <dependency>
> > >       <groupId>GROUP</groupId>
> > >       <artifactId>ARTIFACT</artifactId>
> > >     </dependency>
> > >   <delendencies>
> > >   ...
> > > </plugin>
> > > will fail with a missing version.
> > >
> > > Is this the expected behavior or is this a bug?
> > >
> > >
> > > --
> > > Gregory Kick
> > > [hidden email]
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> > >
> > >
> >
> > --
> > View this message in context: http://www.nabble.com/dependency-management-within-plugin-dependencies-tf2772190s177.html#a7735149
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
>
> --
> Gregory Kick
> [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...