Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 26/Jan/15 10:23 PM
Description:

ISSUE #1:
"Use private Maven repository" option for "Invoke top-level Maven target" build step is enabled by default.

A similar option is part of the normal Maven build step configuration but is DISABLED by default. The default setting should match the default of other Maven tasks/steps.

Steps:

  • In any Maven Job, click "Add pre-build step"
  • Click "Advanced"
  • NOTE: "Use private Maven repository" option is enabled by default.

This causes churn when creating jobs because every pre/post build step added to a job needs to be edited to work properly if the default repository is not used, usually after debugging a multiple failed builds because people forget or are not aware of this nuance.

ISSUE #2:
When disabling "Use private Maven repository" option for "Invoke top-level Maven target" build step, it does not honor the global setting.

Configure Global options:

  • Go to: Manage Jenkins->Configure Jenkins
  • Scroll down to "Maven Project Configuration"
  • In the "Local Maven Repository" drop down, select "Local to the executor"
  • Click "Save"

NOTE: This should trigger the following command-line value to be inserted in the maven command:

-Dmaven.repo.local=/home/webpulse/.jenkins-slave/maven-repositories/0

Configure Job:

  • In any Maven Job, click "Add pre-build step"
  • Set "Goals" to build Maven project (e.g., 'clean install -D skipTests -P wp-dev')
  • Click "Advanced"
  • UNCHECK "Use private Maven repository"
  • Click "Save"
  • Click "Build Now

The -Dmaven.repo.local is missing from the command line:

[wpma-test-dev.functional] $ /home/.../bin/mvn -s /tmp/settings1580842080375722878.xml clean install -D skipTests -P wp-dev

Because the default (global configuration) is set to use a repository "Local to the executor", the -Dmaven.repo.local option should be included and look something like:

-Dmaven.repo.local=/home/.../.jenkins-slave/maven-repositories/0

Because it is missing, the artifacts are put in the wrong repository and subsequent build steps that use the executor-specific repository all fail.

Project: Jenkins
Priority: Major Major
Reporter: Jeff VIncent
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to