maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Patrick (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (MNG-6083) Maven 3.3.9 breaks release:perform by not including maven.config
Date Sun, 04 Sep 2016 15:13:20 GMT

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

Robert Patrick edited comment on MNG-6083 at 9/4/16 3:13 PM:
-------------------------------------------------------------

>From my quick scan of the toolchains documentation, it will not help us.  It seems that
the definitions in toolchain.xml are really only exposed to plugins that leverage them.  In
our case, I need to invoke an external process (via shell script) and pass it arguments to
these environment-specific locations.  I don't see any documentation on how I can reference
values defined in toolchain.xml at any point in my POM.  For example, here is a greatly simplified
example of a Maven exec plugin execution from the POM that doe the pre-integration-test setup
for each test execution:

&lt;plugin&gt;
&nbsp;&nbsp;&lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
&nbsp;&nbsp;&lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
&nbsp;&nbsp;&lt;executions&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;execution&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id&gt;setup-environments-for-tests&lt;/id&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;phase&gt;pre-integration-test&lt;/phase&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;goals&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;goal&gt;exec&lt;/goal&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/goals&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;configuration&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;executable&gt;${bash-executable}&lt;/executable&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;arguments&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;shell-script&gt;${system-test-bin}/setupTestEnvironment.sh&lt;/shell-script&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;path_to_commercial_software_v1&gt;${software.location.v1}&lt;/path_to_commercial_software_v1&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;path_to_commercial_software_v2&gt;${software.location.v2}&lt;/path_to_commercial_software_v2&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;path_to_commercial_software_v3&gt;${software.location.v3}&lt;/path_to_commercial_software_v3&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;path_to_jdk7&gt;${path-to-java7}&lt;/path_to_jdk7&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;path_to_jdk8&gt;${path-to-java8}&lt;/path_to_jdk8&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;script_to_call_value&gt;${script-to-call}&lt;/script_to_call_value&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/arguments&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/configuration&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/execution&gt;
&nbsp;&nbsp;&nbsp;&nbsp;...
&nbsp;&nbsp;&lt;/executions&gt;
&lt;/plugin&gt;

How would I reference those tools locations when they are defined in toolchain.xml?  I didn't
see anything in the docs that covered such a use case...


was (Author: rhpatrick00):
>From my quick scan of the toolchains documentation, it will not help us.  It seems that
the definitions in toolchain.xml are really only exposed to plugins that leverage them.  In
our case, I need to invoke an external process (via shell script) and pass it arguments to
these environment-specific locations.  I don't see any documentation on how I can reference
values defined in toolchain.xml at any point in my POM.  For example, here is a greatly simplified
example of a Maven exec plugin execution from the POM that doe the pre-integration-test setup
for each test execution:


&lt;plugin&gt;
  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
  &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
  &lt;executions&gt;
    &lt;execution&gt;
      &lt;id&gt;setup-environments-for-tests&lt;/id&gt;
      &lt;phase&gt;pre-integration-test&lt;/phase&gt;
      &lt;goals&gt;
	&lt;goal&gt;exec&lt;/goal&gt;
      &lt;/goals&gt;
      &lt;configuration&gt;
	&lt;executable&gt;${bash-executable}&lt;/executable&gt;
	&lt;arguments&gt;
	  &lt;shell-script&gt;${system-test-bin}/setupTestEnvironment.sh&lt;/shell-script&gt;
	  &lt;path_to_commercial_software_v1&gt;${software.location.v1}&lt;/path_to_commercial_software_v1&gt;
	  &lt;path_to_commercial_software_v2&gt;${software.location.v2}&lt;/path_to_commercial_software_v2&gt;
	  &lt;path_to_commercial_software_v3&gt;${software.location.v3}&lt;/path_to_commercial_software_v3&gt;
	  &lt;path_to_jdk7&gt;${path-to-java7}&lt;/path_to_jdk7&gt;
	  &lt;path_to_jdk8&gt;${path-to-java8}&lt;/path_to_jdk8&gt;
	  &lt;script_to_call_value&gt;${script-to-call}&lt;/script_to_call_value&gt;
	&lt;/arguments&gt;
      &lt;/configuration&gt;
    &lt;/execution&gt;
    ...
  &lt;/executions&gt;
&lt;/plugin&gt;

How would I reference those tools locations when they are defined in toolchain.xml?  I didn't
see anything in the docs that covered such a use case...

> Maven 3.3.9 breaks release:perform by not including maven.config
> ----------------------------------------------------------------
>
>                 Key: MNG-6083
>                 URL: https://issues.apache.org/jira/browse/MNG-6083
>             Project: Maven
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 3.3.9
>            Reporter: Robert Patrick
>            Priority: Blocker
>
> Our release process runs both our build and our integration tests.  The integration tests
rely on our project root directory's .mvn/maven.config file to run properly.  The maven.config
file is NOT checked into the source tree because it contains environment-specific values so
each developer has their own version of it on each machine on which they build.
> This has been working fine for months now but simply changing the version of Maven used
from 3.3.3 to 3.3.9 causes the build to break due to not having the -Ds defined in $PROJECT_ROOT/.mvn/maven.config.
> It appears that the release:perform goal checks out the release source in another location
and with Maven 3.3.9, the maven.config from the original location is not being used.  The
build specifies the release-plugin version so the difference seems to be in the core Maven
distribution.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message