[ 
https://issues.apache.org/jira/browse/MINVOKER-180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17431427#comment-17431427
 ] 

Zbigniew Lis commented on MINVOKER-180:
---------------------------------------

[~khmarbaise] I know this is years later, but the problem is still there, and I 
think the author was misunderstood.

If you run "mvn generate-resources -PmyProfile" on a project that *uses* 
maven-invoker-plugin, then myProfile is passed to whatever execution you have 
configured in this plugin *in addition* to what is configured in plugin 
configuration, or in invoker.properties file.

You should be able to reproduce it using project provided by the author: if you 
run "mvn generate-resources -PmyProfile" on "maven-invoker-profile-inheritance" 
project, then you'll see that the profile is being activated in the 
"maven-invoker-profile-inheritance-dependency" project (and in result the 
echo-maven-plugin will be executed) I couldn't find a way to prevent this 
behavior.

And this happens only in versions 1.6 and higher.

> Profiles are passed to invoked executions since version 1.6
> -----------------------------------------------------------
>
>                 Key: MINVOKER-180
>                 URL: https://issues.apache.org/jira/browse/MINVOKER-180
>             Project: Maven Invoker Plugin
>          Issue Type: Bug
>    Affects Versions: 1.6, 1.7, 1.8, 1.9
>         Environment: Maven 3.2.3
>            Reporter: Frank Jakop
>            Assignee: Karl Heinz Marbaise
>            Priority: Blocker
>         Attachments: maven-invoker-profile-inheritance.zip
>
>
> We recently upgraded to version > 1.5 (tried all versions) of invoker plugin 
> and it seems to me that starting with 1.6 all profiles, which are activated 
> on the invoker-triggering project are now passed into the invoked lifecycles.
> This is a blocker for us, because now too much mojo executions take place, 
> which fail our builds.
> I attached a test case. To reproduce, unpack and go to 
> maven-invoker-profile-inheritance. Run "mvn generate-resources -PmyProfile" 
> and you see the echo mojo being executed and printing "########## Running in 
> myProfile ##########".
> Now change the version of invoker plugin to 1.5 and repeat the test. You will 
> notice that the mojo is not executed.
> According to the docs this is the expected behaviour, since we do not have 
> invoker.profiles file and do set the profiles for the invocation explicitly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to