-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Windows
pom.xml with env.Jenkins.Repository works fine on Linux
<profile>
<id>upstream</id>
<repositories>
<repository>
<id>upstream</id>
<url>${env.Jenkins.Repository}</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
but on Windows I get error No connector available to access repository upstream
${env.Jenkins.Repository}
On investigation - i.e. with -X on maven job I see that environment variables are normalised to uppercase and hence come through as
env.JENKINS.REPOSITORY=http://blah
Easy to work around by adjusting maven pom to support both upper and lower case, but it does mean the documentation @ https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Maven+Repository+Server does not work on Windows.
Pom work around is
<profile>
<id>upstream-non-windows</id>
<activation>
<property>
<name>env.Jenkins.Repository</name>
</property>
</activation>
<repositories>
<repository>
<id>upstream</id>
<url>${env.Jenkins.Repository}</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
<profile>
<id>upstream-windows</id>
<activation>
<property>
<name>env.JENKINS.REPOSITORY</name>
</property>
</activation>
<repositories>
<repository>
<id>upstream</id>
<url>${env.JENKINS.REPOSITORY}</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>