[JIRA] (JENKINS-42179) withMaven doesn't discover the released artifacts when executing "mvn release"

5 views
Skip to first unread message

cleclerc@cloudbees.com (JIRA)

unread,
Feb 19, 2017, 12:13:02 PM2/19/17
to jenkinsc...@googlegroups.com
Cyrille Le Clerc created an issue
 
Jenkins / Bug JENKINS-42179
withMaven doesn't discover the released artifacts when executing "mvn release"
Issue Type: Bug Bug
Assignee: Cyrille Le Clerc
Components: pipeline-maven-plugin
Created: 2017/Feb/19 5:12 PM
Priority: Minor Minor
Reporter: Cyrille Le Clerc

"withMaven()" doesn't discover the released artifacts generated by "mvn release:prepare release:perform".

It's because the Maven Event Spy is passed by a "-Dmaven.ext.class.path=" parameter of the "mvn" invocation and the "sub" call of "mvn" doesn't inherit of the variable.

We should instead pass "-Dmaven.ext.class.path=" and "-Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder=..." using the "JAVA_TOOL_OPTIONS" environment variable.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

scm_issue_link@java.net (JIRA)

unread,
Feb 21, 2017, 5:09:02 PM2/21/17
to jenkinsc...@googlegroups.com
SCM/JIRA link daemon commented on Bug JENKINS-42179
 
Re: withMaven doesn't discover the released artifacts when executing "mvn release"

Code changed in jenkins
User: Alvaro Lobato
Path:
jenkins-plugin/pom.xml
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java
http://jenkins-ci.org/commit/pipeline-maven-plugin/50291c9c7878f5899065731c14d446f7e1d7546c
Log:
Merge pull request #19 from cyrille-leclerc/JENKINS-42179

JENKINS-42179 use the JAVA_TOOL_OPTIONS environment variable to pass `-Dmaven.ext.class.path`

Compare: https://github.com/jenkinsci/pipeline-maven-plugin/compare/fa0f35294292...50291c9c7878

scm_issue_link@java.net (JIRA)

unread,
Feb 21, 2017, 5:09:03 PM2/21/17
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Cyrille Le Clerc
Path:
jenkins-plugin/pom.xml
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java
http://jenkins-ci.org/commit/pipeline-maven-plugin/3952f7fb1071a4dd5025dab853ac54de56dc7166
Log:


JENKINS-42179 use the JAVA_TOOL_OPTIONS environment variable to pass `-Dmaven.ext.class.path`

cleclerc@cloudbees.com (JIRA)

unread,
Feb 27, 2017, 10:24:02 AM2/27/17
to jenkinsc...@googlegroups.com

cleclerc@cloudbees.com (JIRA)

unread,
Feb 27, 2017, 10:27:04 AM2/27/17
to jenkinsc...@googlegroups.com
Cyrille Le Clerc commented on Bug JENKINS-42179
 
Re: withMaven doesn't discover the released artifacts when executing "mvn release"

The JVMs started in a withMaven()

{...}

wrapping step are now emitting an unpleasant "Picked up JAVA_TOOL_OPTIONS" but the problem is fixed for the moment. We could discuss with the Maven community to find a better solution.

[INFO] Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/home/ubuntu/jenkins-aws-home/workspace/plugins/pipeline-maven-plugin/multi-module-maven-project/release@tmp/withMavenec593a03/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/home/ubuntu/jenkins-aws-home/workspace/plugins/pipeline-maven-plugin/multi-module-maven-project/release@tmp/withMavenec593a03" 

cleclerc@cloudbees.com (JIRA)

unread,
Feb 27, 2017, 10:27:04 AM2/27/17
to jenkinsc...@googlegroups.com
Cyrille Le Clerc edited a comment on Bug JENKINS-42179
The JVMs started in a "{{withMaven(){...\}}}" wrapping step are now emitting an unpleasant "{{Picked up JAVA_TOOL_OPTIONS}}" but the problem is fixed for the moment. We could discuss with the Maven community to find a better solution.

{noformat}
[INFO] Picked up JAVA_TOOL_OPTIONS:

-Dmaven.ext.class.path="/home/ubuntu/jenkins-aws-home/workspace/plugins/pipeline-maven-plugin/multi-module-maven-project/release@tmp/withMavenec593a03/pipeline-maven-spy.jar"
-Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/home/ubuntu/jenkins-aws-home/workspace/plugins/pipeline-maven-plugin/multi-module-maven-project/release@tmp/withMavenec593a03"
{noformat}

cleclerc@cloudbees.com (JIRA)

unread,
Feb 27, 2017, 10:27:04 AM2/27/17
to jenkinsc...@googlegroups.com

cleclerc@cloudbees.com (JIRA)

unread,
Feb 27, 2017, 10:28:01 AM2/27/17
to jenkinsc...@googlegroups.com

robin.jansohn@zf.com (JIRA)

unread,
Jun 6, 2019, 10:45:01 AM6/6/19
to jenkinsc...@googlegroups.com

Is there any way to suppress this output? One of our tests starts a separate java process and expects no output to appear...

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

robin.jansohn@zf.com (JIRA)

unread,
Jun 7, 2019, 4:52:03 AM6/7/19
to jenkinsc...@googlegroups.com

Is there any way to suppress this output? One of our tests starts a separate java process and expects no output to appear...

EDIT: I fixed it by explicitly setting JAVA_TOOL_OPTIONS to empty value for that separate process.

robin.jansohn@zf.com (JIRA)

unread,
Jun 7, 2019, 4:52:03 AM6/7/19
to jenkinsc...@googlegroups.com
Robin Jansohn updated an issue
 
Change By: Robin Jansohn
Comment:
Is there any way to suppress this output? One of our tests starts a separate java process and expects no output to appear...

cleclerc@cloudbees.com (JIRA)

unread,
Jun 7, 2019, 5:39:03 AM6/7/19
to jenkinsc...@googlegroups.com
Cyrille Le Clerc commented on Bug JENKINS-42179
 
Re: withMaven doesn't discover the released artifacts when executing "mvn release"

Robin Jansohn thanks for the update. We currently don't see a solution to operate without using JAVA_TOOLS_OPTIONS to pass parameters to forked maven processes (e.g. when performing "mvn release:prepare release:perform")

Reply all
Reply to author
Forward
0 new messages