The copy mojo doesn't care about the scope because it will copy the
artifacts listed in the artifactItems element. The scope is used by
copy-dependencies to decide which ones from the project need to be
copied since it starts from the entire dependency element. If you don't
specify a scope, it will include all.
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Steinar Bang
Sent: Monday, November 20, 2006 9:04 AM
To: users@maven.apache.org
Subject: Re: Pulling jars into local repository
Steinar Bang [EMAIL PROTECTED]:
Tom Huybrechts [EMAIL PROTECTED]:
On 11/10/06, Steinar Bang [EMAIL PROTECTED] wrote:
Now, I need to find out if I can make maven pull in the eclipse
bundles neccessary for the runtime, as well. This would avoid this
as a copying step.
Declare them as runtime dependencies ?
Yes, that is the obvious approach. My problem is that I don't know
exactly which eclipse bundles to depend on, and from where.
I've now tried changing the scope of the dependencies from compile
to provided. Maven still copied the offending jar files (an OSGi
framwork incompatible with the version delivered with the eclipse IDE)
were still copied to the eclipse PDE platform directory.
I also tried changing the scope to test, and this did succeed in
making maven not copy the jar files to the eclipse PDE platform
directory, but the bundle compilation failed because of a missing OSGi
framework.
Here are the dependency elements from the bundles' top level
pom.xml:
dependency
groupIdorg.eclipse/groupId
artifactIdosgi/artifactId
version3.1.2/version
scopecompile/scope
/dependency
dependency
groupIdorg.eclipse.osgi/groupId
artifactIdservices/artifactId
version3.1.2/version
scopecompile/scope
/dependency
Here are the copy-dependencies settings from the same file:
plugin
groupIdorg.codehaus.mojo/groupId
artifactIddependency-maven-plugin/artifactId
executions
execution
idcopy-dependencies/id
phasepackage/phase
goals
goalcopy-dependencies/goal
/goals
configuration
outputDirectory${user.home}/pde_target_platform/plugins/outputDirecto
ry
excludeTransitivetrue/excludeTransitive
/configuration
/execution
execution
idcopy/id
phasepackage/phase
goals
goalcopy/goal
/goals
configuration
artifactItems
artifactItem
groupId${project.groupId}/groupId
artifactId${project.artifactId}/artifactId
version${project.version}/version
type${project.packaging}/type
/artifactItem
/artifactItems
outputDirectory${user.home}/pde_target_platform/plugins/outputDirecto
ry
/configuration
/execution
/executions
/plugin
Do I need to add a scope to the artifactItem, I wonder?
-
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]