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 9243353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:47:36+00:00 2026-06-18T08:47:36+00:00

The pom.xml builds jars with classifiers(for dev, test, stage environments). E.g. <profiles> <profile> <id>dev</id>

  • 0

The pom.xml builds jars with classifiers(for dev, test, stage environments).
E.g.

 <profiles>
    <profile>
        <id>dev</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
    </profile>
    <profile>
        <id>jenkins-dev</id>
        <properties>
            <jar.classifier>default-jenkins-dev</jar.classifier>
        ...............
    </profile>

There are 2 branches in mercurial(default, second).

So in the second branch the jar classifier is ‘second-jenkins-dev’.

There are several modules(e.g. A, B, C)

The problem occurs when some my modules from default branch were build latest(The latest jar by time of A module is A-default-jenkins-dev.jar) And I try to build the whole war of the ‘second’ branch. Instead of having the A-second-jenkins-dev.jar as a dependnecy, I get
A-default-jenkins-dev.jar

Could someone help?

  • 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-06-18T08:47:37+00:00Added an answer on June 18, 2026 at 8:47 am

    I think your strategy to use profile to select the branch to build is confusing and error prone (but that’s only personnal opinion).

    I think you need to check the following to help you solving your issue:

    • do you take care of the profile to checkout the sources that will be build ?
    • do take care of the profile to define your dependencies ?
    • why the dev profile is activeByDefault ?
    • are you using the same jenkins job to build both (default and second) ? In this case take care the workspace will be shared for both build.

    Alternative solution:

    Modify the pom(s) in branch second and don’t play with profiles to handle this. Use the artifact <version> to handle branches. Keep the <classifier> to make distinction between artifact type (for instance you can build a src jar and a class jar based on the same code : that’s the idea behind maven classifier)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following XML in my maven POM.xml: <profiles> <profile> <id>default</id> <activation> <activeByDefault>true</activeByDefault>
I have following pom.xml <project> <properties> <buildNumber>dev</buildNumber> </properties> <build> <finalName>${project.artifactId}-${project.version}-${buildNumber}</finalName> </build> </project> This works
When I run mvn compile from command line, it builds using pom.xml . But
pom.xml <dependencies> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> </dependency> <!-- JUnit testing framework --> <dependency> <groupId>junit</groupId>
In pom.xml I have (taken from http://struberg.wordpress.com/2012/05/10/using-jpa-in-real-projects-part-1/ ): <properties> <openjpa.sql.action>refresh</openjpa.sql.action> <database.driver.name>org.postgresql.Driver</database.driver.name> <database.connection.url>jdbc:postgresql://myURL</database.connection.url> <database.user>user</database.user> <database.password>password</database.password>
I have a maven pom.xml file with multiple instances of a same goal defined
this is my pom.xml <repositories> <repository> <url>http://download.java.net/maven/2/</url> <id>hibernate-support</id> <layout>default</layout> <name>Repository for library Library[hibernate-support]</name> </repository>
I have a Grails project with pom.xml that is treated as Maven project by
Given the following repository URL from my pom.xml how can I determine what the
I have a maven dependency in my pom.xml as such: <dependency> <groupId>com.foo</groupId> <artifactId>Bar</artifactId> <version>1.2.3</version>

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.