You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by William Ferguson <Wi...@yarris.com> on 2007/08/09 01:08:19 UTC

Making provided scope dependencies available

As suggested by Eric, I've reposted this query to the developers list.

--------
What lifecycle phase needs to have run in order to get provided scope
dependencies made available in a plugin.

http://maven.apache.org/ref/current/maven-project/apidocs/org/apache/mav
en/project/MavenProject.html#getArtifacts()

In my plugin during the package phase, ${project.artifacts} doesn't
contain any of the dependencies declared as 'provided'. Though it does
contain all dependencies declared as either compile or runtime.

What do I need to do to make provided scope dependencies available?

William
--------

As an aside, it seems to me that provided is not really a scope at all
but another degree of freedom in defining a dependency. Ie you really
want to define a dependency as either compile or runtime (or test) and
whether it should be included as part of an application or supplied by
the environment/container is the responsibility of the provided
attribute. But perhaps I'm missing something.

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


RE: Making provided scope dependencies available

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
In order for the plugin to receive the dependencies, you need to specify
@requiresDependencyResolution [scope] in your mojo annotation. This will
tell maven to ensure everything is resolved and then you will get the
objects you want.

-----Original Message-----
From: William Ferguson [mailto:William.Ferguson@yarris.com] 
Sent: Wednesday, August 08, 2007 7:08 PM
To: Maven Developers List
Subject: Making provided scope dependencies available

As suggested by Eric, I've reposted this query to the developers list.

--------
What lifecycle phase needs to have run in order to get provided scope
dependencies made available in a plugin.

http://maven.apache.org/ref/current/maven-project/apidocs/org/apache/mav
en/project/MavenProject.html#getArtifacts()

In my plugin during the package phase, ${project.artifacts} doesn't
contain any of the dependencies declared as 'provided'. Though it does
contain all dependencies declared as either compile or runtime.

What do I need to do to make provided scope dependencies available?

William
--------

As an aside, it seems to me that provided is not really a scope at all
but another degree of freedom in defining a dependency. Ie you really
want to define a dependency as either compile or runtime (or test) and
whether it should be included as part of an application or supplied by
the environment/container is the responsibility of the provided
attribute. But perhaps I'm missing something.

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


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


RE: Making provided scope dependencies available

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
In order for the plugin to receive the dependencies, you need to specify
@requiresDependencyResolution [scope] in your mojo annotation. This will
tell maven to ensure everything is resolved and then you will get the
objects you want.

-----Original Message-----
From: William Ferguson [mailto:William.Ferguson@yarris.com] 
Sent: Wednesday, August 08, 2007 7:08 PM
To: Maven Developers List
Subject: Making provided scope dependencies available

As suggested by Eric, I've reposted this query to the developers list.

--------
What lifecycle phase needs to have run in order to get provided scope
dependencies made available in a plugin.

http://maven.apache.org/ref/current/maven-project/apidocs/org/apache/mav
en/project/MavenProject.html#getArtifacts()

In my plugin during the package phase, ${project.artifacts} doesn't
contain any of the dependencies declared as 'provided'. Though it does
contain all dependencies declared as either compile or runtime.

What do I need to do to make provided scope dependencies available?

William
--------

As an aside, it seems to me that provided is not really a scope at all
but another degree of freedom in defining a dependency. Ie you really
want to define a dependency as either compile or runtime (or test) and
whether it should be included as part of an application or supplied by
the environment/container is the responsibility of the provided
attribute. But perhaps I'm missing something.

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


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