Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Only execute maven-release-plugin deploy steps for a specific sub-module/project

I have a maven project that is organized as:

MyProject

  • Core (parent -> oss.sonatype.org)
  • Package (parent -> MyProject)

MyProject and Package are used in bundling the project up for a proprietary deployment method (creates a specialized Zip)

What I want to do is be able to deploy the Core project to the OSS Sonatype Nexus Repo for used via Maven Dependencies in other projects.

"MyProject" is checked into github along with its sub-projects (Core, Package).

My problem is when I do a maven release:perform (in the Core dir), it checks out MyProject from github, and then runs maven deploy against the Parent's pom -- since it is the pom in the root of the checkout.

I dont want to deal with nested git repos; figuring out how to maintain MyProject and Package in one repo, and Core in another.

So, how can I either:

  1. Tell maven-release-plugin (included via the oss.sonatype.org parent pom) to execute only against the Core project.
  2. Tell maven-release-plugin to skip all deploy actions on the MyProject and Package projects. (I think i would prefer this since, if it maven-release-plugin could keep my POM versions in sync).
like image 875
empire29 Avatar asked Nov 13 '22 17:11

empire29


1 Answers

I think that you can't release a module if you don't release the parent.

I checked the documentation about plugin and you can release a parent but I don't found information about release a child only.

See: http://maven.apache.org/maven-release/maven-release-plugin/faq.html#nonrecursive

like image 74
Gerard Ribas Avatar answered Dec 28 '22 18:12

Gerard Ribas