Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3278106
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:26:39+00:00 2026-05-17T19:26:39+00:00

I am trying to perform a release using a multi-module maven project. My objective

  • 0

I am trying to perform a release using a multi-module maven project. My objective is to modify the version of all poms, and create a tag in the SCM, which is why I am using the maven release plugin.

This project has a hierarchy that I have simplified as:

example/
    module1/
    module2/
        module-jni-linux/
        module-jni-macosx/

The pom.xml of example contains its modules like this:

<modules>
  <module>module1</module>
  <module>module2</module>
</modules>

And the pom.xml of module2 contains modules that depend on a profile determined by the OS type:

<profiles>
<!-- profile for linux -->
<profile>
  <id>linux</id>
  <activation>
    <os>
      <name>linux</name>
    </os>
  </activation>
  <modules>
    <module>module-jni-linux</module>
  </modules>
</profile>
<!-- profile for mac os -->    
<profile> 
  <id>macosx</id>
  <activation>
    <os>
      <name>mac os x</name>
    </os>
  </activation>
  <modules> 
    <module>module-jni-macosx</module> 
  </modules> 
</profile> 

Finally, each module-jni-* uses the native-maven-plugin to compile some C/C++ sources and generate a shared library.


The problem:

When I try a mvn release:prepare -DdryRun=true in a Mac OS X box, I realize that the module-jni-linux is not taken into account by the release process. That means that while all modules pass to a 1.0.0/1.0.1-SNAPSHOT version, module-jni-linux is not modified. What I would like when doing a release:prepare is that all submodules are updated even if its profile has not been activated.

I tried to active both profiles with mvn -P linux,macosx ..., but the module-jni-linux will not build under mac (and viceversa).

How can I perform a release that updates the version of both submodules?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:26:40+00:00Added an answer on May 17, 2026 at 7:26 pm

    Ok I found a way to do it:

    In order to create a release, the maven-release-plugin runs the clean and verify goals before committing to the SCM. The verify goal tries to compile each module.

    What I do now is configure the plugin so it only runs the verify goal. But since the verify is important anyway, I run it manually before doing the release under different environments. My release procedure is then as follows:

    1. run mvn clean verify in both a Mac and a Linux environment. For this I configured a multi-node hudson job.
    2. run mvn release:prepare -P macosx,linux -DdryRun=true -DpreparationGoals=clean, this activates both profiles but skips the compilation
    3. check that the dry-run results are satisfactory
    4. do step 2 with -DdryRun=false
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to release a web project using Maven 2.2.1 and the maven-release-plugin
I'm trying to understand the maven-release-plugin (version 2.0, CVS). The release-prepare works well. But
I'm trying perform a relatively basic TCP socket send/receive operation on Windows CE using
I am trying to perform a method in a background thread using a NSOperationQueue
I`m trying to perform a linq query in a friends JsonArray using Facebook C#
Im trying to perform a mod rewriting to my web site. And I used
I am trying to perform an automatic login when the user clicks a link
I'm trying to perform a fulltext search with codeigniters built in Active Record methods.
I'm trying to perform the acquisition of data from the internet on the load
I am trying to perform a bulk insert onto SQL Server: BULK INSERT SampleData

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.