There was a pretty long thread about this exact issue about two or three weeks ago. I encountered the same issue. My solution, eventually, was to use the "preparationGoals" property when I run release:prepare to force an "install". The problem appears to be that maven-release-plugin fails to use objects in the reactor when resolving dependencies - at least, in the prepare goal. I can't swear to that, but it's my uneducated observation.

Using a ${project.version} to version your modules works just fine.

Here is my prepare command line:

mvn -DpreparationGoals="clean,install" release:prepare

Good luck!
Dave


Martin Eigenbrodt wrote:
This may be a beginner question,  but I haven't found any hints..
I've got a project that contains a servlet and an ejb. The Servlet depends
on the ejb. I've trouble releasing that as complete project.

My directory Layout is like:

pom.xml <- package type pom
   servlet
       pom.xml
  ejb
       pom.xml

the parent pom has version 1.1-SNAPSHOT.  The Servlet an ejb pom don't
specify a version (inherit them).
The Servlet defines a dependecy on the ejb without specifing a version.
The dependencyMangement section from the parent pom contains:
 <dependencies>
    <dependency>
      <groupId>myGroup<groupId>
      <artifactId>ejb<artifactId>
      <version>${project.version}</version>
    </dependency>

If I try release:prepare the build fails with "Failed to resolve artifacts:
myGroup:ejb:1.1

I understand why this happens but is there a obvious solution? How do you
release multimodule projects with interdependent childs?

Best regards,

Martin


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

Reply via email to