java - maven settings.xml properties are not seen in pom -


i have in settings.xml following config

<profile> <properties> <nexus.host>http://localhost:8081/nexus/content/repositories</nexus.host> </properties> </profile> 

this profile set active.

its used in distribution management section of pom

<distributionmanagement>         <snapshotrepository>             <id>my-snapshots</id>             <name>my snapshots</name>             <url>${nexus.path}/snapshots</url>         </snapshotrepository>         <repository>             <id>my-releases</id>             <name>my releases</name>             <url>${nexus.path}/releases</url>         </repository>     </distributionmanagement> 

this works when run on local machine, when job executed on jenkins fails org.apache.maven.project.projectbuildingexception: problems encountered while processing poms:

[fatal] non-resolvable parent pom: failure transfer com.myapp:sample:pom:1.1.0 ${nexus.path}/releases cached in local repository, resolution not reattempted until update interval of my-releases has elapsed or updates forced. original error: not transfer artifact com.myapp:sample:pom:1.1.0 from/to my-releases (${nexus.path}/releases): cannot access ${nexus.path}/releases type default using available connector factories: wagonrepositoryconnectorfactory , 'parent.relativepath' points @ wrong local pom @ line 3, column 13

unable identify cause of error

i had same issue in past. resolve in jenkins need set maven argument can find location of settings.xml.

you need have settings.xml in application resources jenkins can find it.

to set argument(in jenkins, should under goals , options):

-s src/main/resources/settings.xml 

however in instance jenkins administrators provided separate version of maven application have needed settings.xml , there no need provide our own custom settings.xml.

on side note, might want contact jenkins administrators ensure have implemented proper configurations jenkins able deploy produced artifacts repository under id have specified.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -