I'm trying to clean my pom.xml files and store all repository configuration in the settings.xml file. I created a plugin group in nexus then configure a mirror with its url, i also have all credentials in jenkins. Here are my configs.
<profiles>
<profile>
<id>nexus</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>train4</id>
<url>http://train4</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
<layout>p2</layout>
</repository>
</profile>
</profiles>
then the miror
<mirror>
<id>train4</id>
<name>Train 4 Repository</name>
<url>http://ip:8081/nexus/content/groups/train4/</url>
<layout>p2</layout>
<mirrorOfLayouts>p2</mirrorOfLayouts>
<mirrorOf>*</mirrorOf>
</mirror>
I got this error in jenkins:
!ENTRY org.eclipse.equinox.p2.transport.ecf 2 0 2017-06-28 18:31:55.062
!MESSAGE Connection to http://ip:8081/nexus/content/groups/train4/p2.index failed on Connection refused. Retry attempt 0 started !STACK 0 org.apache.http.conn.HttpHostConnectException: Connection refused at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190) at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:151) at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:125)
Can anyone help ? Thanks in advance.