You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karsten Tinnefeld (JIRA)" <ji...@codehaus.org> on 2009/03/31 17:20:13 UTC
[jira] Created: (MNG-4120) Profile activation should be per module
Profile activation should be per module
---------------------------------------
Key: MNG-4120
URL: http://jira.codehaus.org/browse/MNG-4120
Project: Maven 2
Issue Type: Bug
Components: Dependencies, POM
Affects Versions: 2.0.9
Reporter: Karsten Tinnefeld
In a multi-module-project, one might wish to run certain targets dependent on the existance of some file or directory.
In a single-module-project, I'd say
<profiles><profile><id>do-if-file-exists</id>
<activation><exists>some/special/path</exists></activation>
<plugins><!-- my specific configuration --></plugins></profile></profiles>
This however does not work on a per-module base in a multi-module project, but the profile is (de)activated depending on the situation on the run pom only, and this is not even documented.
In my opinion, profile activation should be on a per-module basis.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-4120) Profile activation should be per
module
Posted by "Karsten Tinnefeld (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=171685#action_171685 ]
Karsten Tinnefeld commented on MNG-4120:
----------------------------------------
Second try.
> Profile activation should be per module
> ---------------------------------------
>
> Key: MNG-4120
> URL: http://jira.codehaus.org/browse/MNG-4120
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies, POM
> Affects Versions: 2.0.9
> Reporter: Karsten Tinnefeld
>
> In a multi-module-project, one might wish to run certain targets dependent on the existance of some file or directory.
> In a single-module-project, I'd say
> <profiles><profile><id>do-if-file-exists</id>
> <activation><exists>some/special/path</exists></activation>
> <plugins><!-- my specific configuration --></plugins></profile></profiles>
> This however does not work on a per-module base in a multi-module project, but the profile is (de)activated depending on the situation on the run pom only, and this is not even documented.
> In my opinion, profile activation should be on a per-module basis.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (MNG-4120) Profile activation should be per module
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter closed MNG-4120.
-----------------------------
Assignee: Brett Porter
Resolution: Duplicate
> Profile activation should be per module
> ---------------------------------------
>
> Key: MNG-4120
> URL: http://jira.codehaus.org/browse/MNG-4120
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies, POM
> Affects Versions: 2.0.9
> Reporter: Karsten Tinnefeld
> Assignee: Brett Porter
>
> In a multi-module-project, one might wish to run certain targets dependent on the existance of some file or directory.
> In a single-module-project, I'd say
> <profiles><profile><id>do-if-file-exists</id>
> <activation><exists>some/special/path</exists></activation>
> <plugins><!-- my specific configuration --></plugins></profile></profiles>
> This however does not work on a per-module base in a multi-module project, but the profile is (de)activated depending on the situation on the run pom only, and this is not even documented.
> In my opinion, profile activation should be on a per-module basis.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (MNG-4120) Profile activation should
be per module
Posted by "Karsten Tinnefeld (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=171685#action_171685 ]
Karsten Tinnefeld edited comment on MNG-4120 at 4/1/09 5:00 AM:
----------------------------------------------------------------
In order to deliver configuration files etc. with the other project artifacts, I had this defined in a profile attached to my master configuration pom in a large-scale banking portal project. The idea is that this automatically copies the project attachments to the target directory whenever src/main/attachments exists.
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>copy-attachments</id>
<goals>
<goal>run</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<tasks>
<copy preservelastmodified="true" todir="${project.build.directory}"
flatten="true">
<fileset dir="${basedir}/src/main/attachments"
includes="**/*" />
<regexpmapper from="^(.*)$$"
to="${project.artifactId}-${project.version}-\1" />
</copy>
</tasks>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.7.1</version>
</dependency>
</dependencies>
</plugin>
I would then attach these artifacts (did not yet figure out a generic way for it) in the concrete projects, e.g. a log4j configuration:
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-supplemental</id>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>
target/${project.artifactId}-${project.version}-log4j.xml
</file>
<type>xml</type>
<classifier>log4j</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Hope, this helps.
was (Author: tinne):
Second try.
> Profile activation should be per module
> ---------------------------------------
>
> Key: MNG-4120
> URL: http://jira.codehaus.org/browse/MNG-4120
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies, POM
> Affects Versions: 2.0.9
> Reporter: Karsten Tinnefeld
>
> In a multi-module-project, one might wish to run certain targets dependent on the existance of some file or directory.
> In a single-module-project, I'd say
> <profiles><profile><id>do-if-file-exists</id>
> <activation><exists>some/special/path</exists></activation>
> <plugins><!-- my specific configuration --></plugins></profile></profiles>
> This however does not work on a per-module base in a multi-module project, but the profile is (de)activated depending on the situation on the run pom only, and this is not even documented.
> In my opinion, profile activation should be on a per-module basis.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-4120) Profile activation should be per
module
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=171631#action_171631 ]
Brett Porter commented on MNG-4120:
-----------------------------------
I'm not sure I understand - are you trying to activate based on an inherited profile?
Can you attach a sample project that illustrates?
> Profile activation should be per module
> ---------------------------------------
>
> Key: MNG-4120
> URL: http://jira.codehaus.org/browse/MNG-4120
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies, POM
> Affects Versions: 2.0.9
> Reporter: Karsten Tinnefeld
>
> In a multi-module-project, one might wish to run certain targets dependent on the existance of some file or directory.
> In a single-module-project, I'd say
> <profiles><profile><id>do-if-file-exists</id>
> <activation><exists>some/special/path</exists></activation>
> <plugins><!-- my specific configuration --></plugins></profile></profiles>
> This however does not work on a per-module base in a multi-module project, but the profile is (de)activated depending on the situation on the run pom only, and this is not even documented.
> In my opinion, profile activation should be on a per-module basis.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-4120) Profile activation should be per
module
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=171845#action_171845 ]
Benjamin Bentmann commented on MNG-4120:
----------------------------------------
Looks like a dup of MNG-2363, isn't it? File-based profile activation resolves relative paths against the current working directory, not the module base directory.
> Profile activation should be per module
> ---------------------------------------
>
> Key: MNG-4120
> URL: http://jira.codehaus.org/browse/MNG-4120
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies, POM
> Affects Versions: 2.0.9
> Reporter: Karsten Tinnefeld
>
> In a multi-module-project, one might wish to run certain targets dependent on the existance of some file or directory.
> In a single-module-project, I'd say
> <profiles><profile><id>do-if-file-exists</id>
> <activation><exists>some/special/path</exists></activation>
> <plugins><!-- my specific configuration --></plugins></profile></profiles>
> This however does not work on a per-module base in a multi-module project, but the profile is (de)activated depending on the situation on the run pom only, and this is not even documented.
> In my opinion, profile activation should be on a per-module basis.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira