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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:29:15+00:00 2026-05-20T01:29:15+00:00

I have a project with a parent pom.xml which define profiles, and a debug

  • 0

I have a project with a parent pom.xml which define profiles, and a debug profile :

<profile>
    <id>debug-true</id>
    <activation>
        <property>
            <name>debug</name>
            <value>true</value>
        </property>
    </activation>
</profile>

I want that one of my sub-modules adds the dependency jboss-seam-debug when the profile debug is activated.

I written this children pom.xml :

<profiles>
    <profile>
        <id>debug-true</id>
        <dependencies>
            <dependency>
                <groupId>org.jboss.seam</groupId>
                <artifactId>jboss-seam-debug</artifactId>
            </dependency>
        </dependencies>
    </profile>
</profiles>

But it doesn’t work, that dependency is not part of the dependency tree when I specify -Ddebug=true … it’s like the children pom.xml re-defines my debug profile …

Do you know how could I add jboss-seam-debug dependency to my sub-module when the property debug has the value true ?


Actually, here is my full need which is a bit more complex.

Here is my parent pom.xml :

<profiles>
    <profile>
        <id>env-dev</id>
        <activation>
            <activeByDefault>true</activeByDefault>
            <property>
                <name>env</name>
                <value>dev</value>
            </property>
        </activation>
        <properties>
            <debug>true</debug>
    ... other properties ...
        </properties>
    </profile>
    ...

Generally, I just pass -Denv=dev on the mvn command line and wanted my sub-module to activate jboss-seam-debug only when property debug is defined to true so I wrote that in the sub-module pom.xml :

<profiles>
    <profile>
        <id>debug-true</id>
        <activation>
            <property>
                <name>debug</name>
                <value>true</value>
            </property>
        </activation>
        <dependencies>
            <dependency>
                <groupId>org.jboss.seam</groupId>
                <artifactId>jboss-seam-debug</artifactId>
            </dependency>
        </dependencies>
    </profile>
    ...

which didn’t work only by passing -Denv=dev because I don’t pass the system property -Ddebug=true, it’s the maven property which is activated by my parent pom.xml, and that my children doesn’t “see” …

  • 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-20T01:29:15+00:00Added an answer on May 20, 2026 at 1:29 am

    it’s because profiles are not inhertited in maven. This means debug-true in child POM does not inhertif the activation of profile in parent POM also called debug-true.

    You have two possibilities to solve this:

    1) call mvn -Pdebug-true which will trigger the coresponding profile in each POM

    2) add activation code in each POM

    Personally I would prefere first solution.

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

Sidebar

Related Questions

Currently, I have a Maven project which inherits from a parent pom defining two
Currently, I have the following structure for my project Foo : foo-parent +- pom.xml
I have two projects: Parent project: A, Sub project: B A/pom.xml: <groupId>com.dummy.bla</groupId> <artifactId>parent</artifactId> <version>0.1-SNAPSHOT</version>
I have this project structure where I have a parent pom which include let's
I have a multi-module project, and I am using profiles in the parent pom
This is my parent pom.xml (part of it) in a multi-module project: ... <build>
I have Maven multi-module project with such structure: parent-pom-project -- module1 -- module2 At
I have parent project parent, which has three modules like: <groupId>com.dummy.bla.bla</groupId> <artifactId>parent</artifactId> <version>1.0-SNAPSHOT</version> <packaging>pom</packaging>
My multi-module Maven project looks like: /foo pom.xml /foo-parent /foo-core /foo-something /src /site Pay
I have 3 modules which are linked to a parent project. I need to

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.