-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Platform: PC, OS: Linux
The settings.xml for maven is part of the workspace and checked out of SVN
together with the source source-code just before maven is executed. To configure
maven the "alternate settings file" option is used, but the final path is not
correct.
The setup is two SVN urls that must be checked out:
http://.../sccm-test
http://.../sccm/sccm-conf
The second project contains the settings.xml.
Some examples of what we see:
Alternate settings file: sccm-conf/settings.xml ->
Resulting Maven '-s' option:
/sccm/var/db/hudson/FFFJ/jobs/Development
build/workspace/sccm-test/sccm-conf/settings.xml
Alternate settings file: ../sccm-conf/settings.xml
Resulting Maven '-s' option:
/sccm/var/db/hudson/FFFJ/jobs/Development build/workspace/../sccm-conf/settings.xml
-> Simplified: /sccm/var/db/hudson/FFFJ/jobs/Development
build/sccm-conf/settings.xml
Alternate settings file: ../workspace/sccm-conf/settings.xml
Resulting Maven '-s' option:
/sccm/var/db/hudson/FFFJ/jobs/Development
build/workspace/sccm-test/../workspace/sccm-conf/settings.xml
-> Simplified: /sccm/var/db/hudson/FFFJ/jobs/Development
build/workspace/workspace/sccm-conf/settings.xml
Alternate settings file: ../../workspace/sccm-conf/settings.xml
Resulting Maven '-s' option:
/sccm/var/db/hudson/FFFJ/jobs/Development
build/workspace/../../workspace/sccm-conf/settings.xml
-> Simplified: /sccm/var/db/hudson/FFFJ/jobs/workspace/sccm-conf/settings.xml
It seems that entering .. is interpreted by the Java code and then also by the
platform?
- is blocking
-
JENKINS-4939 Hudson deploy artifact does not use alternate settings.xml
-
- Closed
-
-
JENKINS-7105 Sonar plugin does not resolve "alternate settings file" correctly for Maven project
-
- Closed
-
-
JENKINS-7495 Make POM parser aware of alternate settings.xml
-
- Open
-
- is duplicated by
-
JENKINS-4938 Alternate settings file cannot be located
-
- Closed
-
-
JENKINS-6080 Unable to use alternate settings file after upgrading to Hudson 1.352
-
- Closed
-
[JENKINS-4693] Alternate settings file not found
Assignee | New: Andrew Bayer [ abayer ] |
Link |
New:
This issue is duplicated by |
Link |
New:
This issue is blocking |
I'm experiencing similar issue related to alternate settings file feature in
Hudson ver. 1.329 and after upgrade it has been reproduced in Hudson ver. 1.332
too. Help for "Alternate settings file" field suggests that path should be
relative to workspace root; regardless if build's "Local module directory" is
empty or not, when build starts Hudson seems to check for existence of
configured settings.xml file but it does so using wrong file path: to the job
workspace Hudson wrongfully appends "Local module directory" (if empty then it
appends last path component of URL), and then appends path configured as
"Alternate settings file" which already contains "Local module directory" (or if
empty, last path component of URL) because it is supposed to be relative to
workspace root. This settings.xml file existence check fails build before maven
is run.
When configuring "Alternate settings file" field it seems same wrong validation
is used to check for existence of configured file, and it doesn't complain when
configured "Alternate settings" file path doesn't start with "Local module
directory" (or if empty, last path component of URL).
If one configures job's "Alternate settings file" path not to include "Local
module directory", build starts (settings.xml file existence check seems to
pass), but in build log I see that path used for -s option is wrong, it doesn't
append "Local module directory" nor last path component of URL if "Local module
directory" is empty; maven doesn't complain that -s option uses invalid path and
just continues, but later build fails because alternate settings.xml hasn't been
applied (e.g. dependency/plugin can not be downloaded from secured repository as
appropriate server definition is missing).
Current workaround is to explicitly specify -s option in "Goals and options",
and as value use full absolute path to alternate settings file.