You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by no...@gies.team on 2024/11/26 10:35:06 UTC
Fwd: Usage of Maven Profiles from modules
Good day,
I am trying to use maven profiles separated into modules (<modules> in a parent pom).
After successfully installing the parent pom (and the modules), I tried to use the profiles.
Profiles located in the parent POM still work as before, but new profiles located in a module do not.
I tried to activate the profiles with the command parameter -P, e.g., Pmy-profile-name-in-parent-pom, or, e.g., Pmy-profile-name-in-module-a.
The command mvn help:all-profiles also lists only the profiles directly in the parent pom.
I wanted to figure out whether this should or should not work. It would be great if you could give me a hint.
Best
Norman
Re: Usage of Maven Profiles from modules
Posted by no...@gies.team.
Hi Guillaume,
Thanks a lot for your response.
I created a simple project and attached it to this email (I hope it is accessible).
Re: Usage of Maven Profiles from modules
Posted by Guillaume Nodet <gn...@apache.org>.
I just added a profile in a child and i've been able to see it and invoke
it...
Could you provide a simple project to reproduce the problem, the commands
you run, the output, and what you'd expect ?
Le mar. 26 nov. 2024 à 11:35, <no...@gies.team> a écrit :
> Good day,
>
> I am trying to use maven profiles separated into modules (<modules> in a
> parent pom).
>
> After successfully installing the parent pom (and the modules), I tried to
> use the profiles.
>
> Profiles located in the parent POM still work as before, but new profiles
> located in a module do not.
>
> I tried to activate the profiles with the command parameter -P, e.g.,
> Pmy-profile-name-in-parent-pom, or, e.g., Pmy-profile-name-in-module-a.
>
> The command mvn help:all-profiles also lists only the profiles directly in
> the parent pom.
>
> I wanted to figure out whether this should or should not work. It would be
> great if you could give me a hint.
>
> Best
> Norman
>
>
--
------------------------
Guillaume Nodet
Re: Usage of Maven Profiles from modules
Posted by Martin Höller <ma...@xss.co.at.INVALID>.
Am 26. Nov. 2024 schrieb norman@gies.team:
> Good day,
>
> I am trying to use maven profiles separated into modules (<modules> in a parent pom).
>
> After successfully installing the parent pom (and the modules), I tried to use the profiles.
>
> Profiles located in the parent POM still work as before, but new profiles located in a module do not.
>
> I tried to activate the profiles with the command parameter -P, e.g., Pmy-profile-name-in-parent-pom, or, e.g., Pmy-profile-name-in-module-a.
>
> The command mvn help:all-profiles also lists only the profiles directly in the parent pom.
>
> I wanted to figure out whether this should or should not work. It would be great if you could give me a hint.
>
> Best
> Norman
>
--
Martin Höller | martin.hoeller@xss.co.at
*x Software + Systeme | http://www.xss.co.at/
Karmarschgasse 51/2/20 | Tel: +43-1-6060114-40
A-1100 Vienna, Austria | Fax: +43-1-6060114-71
Re: Usage of Maven Profiles from modules
Posted by Martin Höller <ma...@xss.co.at.INVALID>.
Hi!
Sorry for my previous (empty) mail. Sent it unintentionally.
Problably the maven-help-plugin [0] could be of help for you. It provides
the active-profiles and all-profiles Goals, which could be handy.
hth,
- martin
[0] https://maven.apache.org/plugins/maven-help-plugin/plugin-info.html
Am 26. Nov. 2024 schrieb norman@gies.team:
> Good day,
>
> I am trying to use maven profiles separated into modules (<modules> in a parent pom).
>
> After successfully installing the parent pom (and the modules), I tried to use the profiles.
>
> Profiles located in the parent POM still work as before, but new profiles located in a module do not.
>
> I tried to activate the profiles with the command parameter -P, e.g., Pmy-profile-name-in-parent-pom, or, e.g., Pmy-profile-name-in-module-a.
>
> The command mvn help:all-profiles also lists only the profiles directly in the parent pom.
>
> I wanted to figure out whether this should or should not work. It would be great if you could give me a hint.
>
> Best
> Norman