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

  • Home
  • SEARCH
  • 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

I have a multi-module project, and I am using profiles in the parent pom
I have C++ project (VS2005) which includes header file with version number in #define
My multi-module Maven project looks like: /foo pom.xml /foo-parent /foo-core /foo-something /src /site Pay
I have a project which is source controlled using Subversion and VisualSVN. Since the
I've got artefacts which are built and released using Maven. The artefact's original pom.xml
We have a multi-module maven project that uses a profile that defines a buildnumber-maven-plugin
I have a parent project with 5 children having also dependencies between each other.
I have a complex project where there are many directories that have POM files,
I have a hierarchical maven project, from which I am trying to build a
I have parent project with: <modules> <module>../module1</module> <module>../module2</module> <module>../module3</module> </modules> and modules with <parent>

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.