Subproject dependency copy trips up release plugin?

2007-02-12 Thread shinsato

We have a project with a few sub-projects.  One of those subprojects uses the
maven-dependency-plugin, copying the jar file artifact from one of the
sibling sub-projects.  The dependency plugin has worked fine in another
multi-project m2 buld and release when the dependency copy was only
referencing projects outside the multi-project's project tree.

But in the present multi-project release, copying that sibling jar file with
the dependency plugin causes the mvn release:prepare step to fail, because
it can't find the released version in the release repository.  It doesn't
care about referencing sibling project dependencies from the regular pom
dependencies, it only chokes for the dependency:copy.

Is this a bug or a usage issue?

Here's a diagram for the issue with three pseudo-poms.  I omitted groupId's,
scm, distributionManagement, and other content from the poms that were not
necessary to communicate the basic issue.  Any ideas or workaround would be
appreciated.

superproject/
A/   - no dependencies
B/   - dependency:copy A

//superproject/pom.xml (abbrieviated)
project
  artifactIdsuperproject/artifactId
  packagingpom/packaging
  version1.0.0.1-SNAPSHOT/version
  modules
moduleA/module
moduleB/module
  /modules
/project

// superproject/A/pom.xml (abbrievated)
project
  parent
artifactIdsuperproject/artifactId
version1.0.0.1-SNAPSHOT/version
  /parent
  artifactIdA/artifactId
  version1.0.0.1-SNAPSHOT/version
  build
plugins
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
configuration
  source1.5/source
  target1.5/target
/configuration
  /plugin
/project

// superproject/B/pom.xml (abbreviated)
project
  parent
artifactIdsuperproject/artifactId
version1.0.0.1-SNAPSHOT/version
  /parent
  artifactIdB/artifactId
  packagingwar/packaging
  version1.0.0.1-SNAPSHOT/version

  build
finalNameFooWar/finalName
plugins
  plugin
groupIdorg.apache.maven/groupId
artifactIdmaven-dependency-plugin/artifactId
executions
  execution
idcopy/id
goals
  goalcopy/goal
/goals
configuration
  artifactItems
artifactItem
  artifactIdA/artifactId
  version${pom.version}/version
  typejar/type
/artifactItem
  /artifactItems
 
outputDirectory${project.build.directory}/${pom.build.finalName}/jars/outputDirectory
/configuration
  /execution
/executions
  /plugin
/plugins
  /build

  dependencies
dependency
  artifactIdA/artifactId
  version${pom.version}/version
/dependency
  /dependencies
/project

The error message during mvn release:prepare is basically:
[INFO] Building B
[INFO]task-segment: [clean, integration-test]
[INFO]

[INFO] [clean:clean] skip deleting directories
[INFO] [dependency:copy {execution: copy}]
[INFO] Configured Artifact: groupId:A:null:1.0.0.1:jar
Downloading: details/1.0.0.1/A-1.0.0.1.jar
[WARNING] Unable to get resource from repository sizzle (our repository
details)
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to resolve artifact.

GroupId: groupId
ArtifactId: A
Version: 1.0.0.1

Reason: Unable to download the artifact from any repository

-- 
View this message in context: 
http://www.nabble.com/Subproject-dependency-copy-trips-up-release-plugin--tf3215460s177.html#a8929542
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Subproject dependency copy trips up release plugin?

2007-02-12 Thread Brian E. Fox
You're missing the groupId in artifactItem:
artifactItems
artifactItem
  artifactIdA/artifactId
  version${pom.version}/version
  typejar/type
/artifactItem

This isn't inherited if not filled in.  

-Original Message-
From: shinsato [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 12, 2007 1:12 PM
To: users@maven.apache.org
Subject: Subproject dependency copy trips up release plugin?


We have a project with a few sub-projects.  One of those subprojects
uses the maven-dependency-plugin, copying the jar file artifact from one
of the sibling sub-projects.  The dependency plugin has worked fine in
another multi-project m2 buld and release when the dependency copy was
only referencing projects outside the multi-project's project tree.

But in the present multi-project release, copying that sibling jar file
with the dependency plugin causes the mvn release:prepare step to fail,
because it can't find the released version in the release repository.
It doesn't care about referencing sibling project dependencies from the
regular pom dependencies, it only chokes for the dependency:copy.

Is this a bug or a usage issue?

Here's a diagram for the issue with three pseudo-poms.  I omitted
groupId's, scm, distributionManagement, and other content from the poms
that were not necessary to communicate the basic issue.  Any ideas or
workaround would be appreciated.

superproject/
A/   - no dependencies
B/   - dependency:copy A

//superproject/pom.xml (abbrieviated)
project
  artifactIdsuperproject/artifactId
  packagingpom/packaging
  version1.0.0.1-SNAPSHOT/version
  modules
moduleA/module
moduleB/module
  /modules
/project

// superproject/A/pom.xml (abbrievated)
project
  parent
artifactIdsuperproject/artifactId
version1.0.0.1-SNAPSHOT/version
  /parent
  artifactIdA/artifactId
  version1.0.0.1-SNAPSHOT/version
  build
plugins
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
configuration
  source1.5/source
  target1.5/target
/configuration
  /plugin
/project

// superproject/B/pom.xml (abbreviated)
project
  parent
artifactIdsuperproject/artifactId
version1.0.0.1-SNAPSHOT/version
  /parent
  artifactIdB/artifactId
  packagingwar/packaging
  version1.0.0.1-SNAPSHOT/version

  build
finalNameFooWar/finalName
plugins
  plugin
groupIdorg.apache.maven/groupId
artifactIdmaven-dependency-plugin/artifactId
executions
  execution
idcopy/id
goals
  goalcopy/goal
/goals
configuration
  artifactItems
artifactItem
  artifactIdA/artifactId
  version${pom.version}/version
  typejar/type
/artifactItem
  /artifactItems
 
outputDirectory${project.build.directory}/${pom.build.finalName}/jars
/outputDirectory
/configuration
  /execution
/executions
  /plugin
/plugins
  /build

  dependencies
dependency
  artifactIdA/artifactId
  version${pom.version}/version
/dependency
  /dependencies
/project

The error message during mvn release:prepare is basically:
[INFO] Building B
[INFO]task-segment: [clean, integration-test]
[INFO]


[INFO] [clean:clean] skip deleting directories
[INFO] [dependency:copy {execution: copy}]
[INFO] Configured Artifact: groupId:A:null:1.0.0.1:jar
Downloading: details/1.0.0.1/A-1.0.0.1.jar
[WARNING] Unable to get resource from repository sizzle (our
repository
details)
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to resolve artifact.

GroupId: groupId
ArtifactId: A
Version: 1.0.0.1

Reason: Unable to download the artifact from any repository

--
View this message in context:
http://www.nabble.com/Subproject-dependency-copy-trips-up-release-plugin
--tf3215460s177.html#a8929542
Sent from the Maven - Users mailing list archive at Nabble.com.


-
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]