Your settings.xml do not contain your own repo, only a mirror for central.
It might be that with this setting metadata is handled differently. Have
you tried to build locally using the settings file (-s option) and see if
it behaves wrong, too? I generally always add a release and snapshot
company repo entry (and exclude it from the mirror).

2015-11-09 14:37 GMT+01:00 <m...@mherrn.de>:

> Hi all,
>
> I have now modified my jenkins build to include the -U option to force
> checking for new snapshots. And now it works.
>
> So it really seems to be the problem, that maven doesn't check for the
> artifact (not even if hasn't the jar in the local repository).
>
> What are the possible reasons for this behaviour? As I said, on the
> workstation it works fine.
>
> Any help is appreciated.
>
> Regards
> Marco
>
> > Hi Bernd,
> >
> > yes, it does. This is the settings file I provided to access my
> > repository.
> >
> > It looks like this:
> >
> > ----/----
> > <settings>
> >   <!--localRepository>${user.home}/mvn-repository</localRepository-->
> >   <localRepository>/tmp/mvn-repo</localRepository>
> >
> >   <mirrors>
> >     <mirror>
> >       <!--This sends everything else to /public -->
> >       <id>MYREPO</id>
> >       <mirrorOf>*</mirrorOf>
> >       <url>http://192.168.30.10:5501/repository/MYREPO</url>
> >     </mirror>
> >   </mirrors>
> >
> >   <profiles>
> >     <profile>
> >       <id>MYREPO</id>
> >       <!--Enable snapshots for the built in central repo to direct -->
> >       <!--all requests to nexus via the mirror -->
> >       <repositories>
> >         <repository>
> >           <id>central</id>
> >           <url>http://central</url>
> >           <releases><enabled>true</enabled></releases>
> >           <snapshots><enabled>true</enabled></snapshots>
> >         </repository>
> >         <repository>
> >           <id>central-snap</id>
> >           <url>http://central</url>
> >           <releases><enabled>true</enabled></releases>
> >           <snapshots><enabled>true</enabled></snapshots>
> >         </repository>
> >       </repositories>
> >      <pluginRepositories>
> >         <pluginRepository>
> >           <id>central</id>
> >           <url>http://central</url>
> >           <releases><enabled>true</enabled></releases>
> >           <snapshots><enabled>true</enabled></snapshots>
> >         </pluginRepository>
> >       </pluginRepositories>
> >     </profile>
> >   </profiles>
> >
> >   <activeProfiles>
> >     <!--make the profile active all the time -->
> >     <activeProfile>MYREPO</activeProfile>
> >   </activeProfiles>
> >
> >    <servers>
> >     <server>
> >       <id>MYREPO</id>
> >       <username>someuser</username>
> >       <password>somepass</password>
> >     </server>
> >     <server>
> >       <id>MYREPO-Releases</id>
> >       <username>someuser</username>
> >       <password>somepass</password>
> >     </server>
> >     <server>
> >       <id>MYREPO-Snapshots</id>
> >       <username>someuser</username>
> >       <password>somepass</password>
> >     </server>
> >   </servers>
> > </settings>
> > ----/----
> >
> >
> > The mirror is a virtual repository that includes both, the snapshot and
> > release repository.
> >
> > This settings file is the same as on my workstation (where it works
> > correctly).
> >
> >> Hello,
> >>
> >> check the /opt/jenkins/mvn-settings.xml files, if it specifies
> >> anything for the repo or distributions or proxy or similiar.
> >>
> >>
> >> Gruss
> >> Bernd
> >>
> >> Am Mon, 9
> >> Nov 2015 12:07:35 +0100 schrieb m...@mherrn.de:
> >>
> >>> Hmm, the metadata files seems correct. It references the file with the
> >>> timestamp. Also on the workstation if works well.
> >>>
> >>> A difference I see is that the build on the workstation downloads the
> >>> maven-metadata.xml, but the jenkins build doesn't.
> >>>
> >>> I assume this can be the problem. But why is this the case? And how
> >>> can I fix it?
> >>>
> >>> Unfortunately cleaning the local repository doesn't help
> >>> .
> >>>
> >>> > I observe this happening from time to time when both maven2 and
> >>> > maven3 builds are using the same local repository. Maven2 seems to
> >>> > modify metadata
> >>> > files in a way that maven3 fails to work with.
> >>> > Cleaning bogus artifacts from local repo makes the problem go away.
> >>> >
> >>> > 2015-11-09 12:31 GMT+02:00 <m...@mherrn.de>:
> >>> >
> >>> >> Hi,
> >>> >>
> >>> >> I am using jenkins as a build server that uses an apache archiva
> >>> >> repository as default repository. That repository is specified by a
> >>> >> custom
> >>> >> settings.xml I provide to the build.
> >>> >>
> >>> >> Now when building such a maven project it tries to download the
> >>> >> dependencies from apache archiva, but fails, because it references
> >>> >> the wrong pom.
> >>> >>
> >>> >> Here is the output of the build:
> >>> >>
> >>> >> ----/----
> >>> >> <===[JENKINS REMOTING CAPACITY]===>channel started
> >>> >> Executing Maven:  -B -f /mnt/raid/jenkins/workspace/MvnTest/pom.xml
> >>> >> -Dmaven.repo.local=/mnt/raid/jenkins/maven-repositories/1 -s
> >>> >> /opt/jenkins/mvn-settings.xml clean package
> >>> >> [INFO] Scanning for projects...
> >>> >> [INFO]
> >>> >> [INFO]
> >>> >>
> ------------------------------------------------------------------------
> >>> >> [INFO] Building MvnTest 1.0-SNAPSHOT
> >>> >> [INFO]
> >>> >>
> ------------------------------------------------------------------------
> >>> >> Downloading:
> >>> >>
> >>> >>
> http://192.168.30.10:5501/repository/BFR/myproject/Commons/1.0-SNAPSHOT/Commons-1.0-SNAPSHOT.pom
> >>> >> [WARNING] The POM for myproject:Commons:jar:1.0-SNAPSHOT is
> >>> >> missing, no dependency information available
> >>> >> Downloading:
> >>> >>
> >>> >>
> http://192.168.30.10:5501/repository/MYREPO/myproject/Commons/1.0-SNAPSHOT/Commons-1.0-SNAPSHOT.jar
> >>> >> [INFO]
> >>> >>
> ------------------------------------------------------------------------
> >>> >> [INFO] BUILD FAILURE
> >>> >> [INFO]
> >>> >>
> ------------------------------------------------------------------------
> >>> >> [INFO] Total time: 3.091s
> >>> >> [INFO] Finished at: Mon Nov 09 11:21:57 CET 2015
> >>> >> [INFO] Final Memory: 7M/20M
> >>> >> [INFO]
> >>> >>
> ------------------------------------------------------------------------
> >>> >> [ERROR] Failed to execute goal on project MvnTest: Could not
> >>> >> resolve dependencies for project
> >>> >> myproject:MvnTest:jar:1.0-SNAPSHOT: Could not find artifact
> >>> >> myproject:Commons:jar:1.0-SNAPSHOT in MYREPO
> >>> >> (http://192.168.30.10:5501/repository/MYREPO) -> [Help 1] [ERROR]
> >>> >> [ERROR] To see the full stack trace of the errors, re-run Maven
> >>> >> with the -e switch.
> >>> >> [ERROR] Re-run Maven using the -X switch to enable full debug
> >>> >> logging. [ERROR]
> >>> >> [ERROR] For more information about the errors and possible
> >>> >> solutions, please read the following articles:
> >>> >> [ERROR] [Help 1]
> >>> >>
> >>> >>
> http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
> >>> >> ----/----
> >>> >>
> >>> >> The interesting thing is that is tries to download
> >>> >> Commons-1.0-SNAPSHOT.jar, which really does not exist. The files
> >>> >> are named
> >>> >> like Commons-1.0-20151109.083301-1.jar.
> >>> >>
> >>> >> When building this project on my workstation it works, but the
> >>> >> output is also different:
> >>> >>
> >>> >> ----/----
> >>> >> [INFO] Scanning for projects...
> >>> >> [INFO]
> >>> >> [INFO]
> >>> >>
> ------------------------------------------------------------------------
> >>> >> [INFO] Building MvnTest 1.0-SNAPSHOT
> >>> >> [INFO]
> >>> >>
> ------------------------------------------------------------------------
> >>> >> Downloading:
> >>> >>
> >>> >>
> http://192.168.30.10:5501/repository/MYREPO/myproject/Commons/1.0-SNAPSHOT/maven-metadata.xml
> >>> >> Downloading:
> >>> >> http://central/myproject/Commons/1.0-SNAPSHOT/maven-metadata.xml
> >>> >> Downloaded:
> >>> >>
> >>> >>
> http://192.168.30.10:5501/repository/MYREPO/myproject/Commons/1.0-SNAPSHOT/maven-metadata.xml
> >>> >> (357 B at 1.0 KB/sec)
> >>> >> [WARNING] Could not transfer metadata
> >>> >> myproject:Commons:1.0-SNAPSHOT/maven-metadata.xml from/to
> >>> >> central-snap (http://central): central: unknown error
> >>> >> Downloading:
> >>> >>
> >>> >>
> http://192.168.30.10:5501/repository/MYREPO/myproject/Commons/1.0-SNAPSHOT/Commons-1.0-20151109.095759-4.pom
> >>> >> Downloaded:
> >>> >>
> >>> >>
> http://192.168.30.10:5501/repository/MYREPO/myproject/Commons/1.0-SNAPSHOT/Commons-1.0-20151109.095759-4.pom
> >>> >> (2 KB at 19.0 KB/sec)
> >>> >> Downloading:
> >>> >>
> >>> >>
> http://192.168.30.10:5501/repository/MYREPO/myproject/Commons/1.0-SNAPSHOT/Commons-1.0-20151109.095759-4.jar
> >>> >> Downloaded:
> >>> >>
> >>> >>
> http://192.168.30.10:5501/repository/MYREPO/myproject/Commons/1.0-SNAPSHOT/Commons-1.0-20151109.095759-4.jar
> >>> >> (90 KB at 528.9 KB/sec)
> >>> >> [...]
> >>> >> ----/----
> >>> >>
> >>> >> What is going on here?
> >>> >> Thanks in advance
> >>> >>
> >>> >>
> >>> >>
> ---------------------------------------------------------------------
> >>> >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> >>> >> For additional commands, e-mail: users-h...@maven.apache.org
> >>> >>
> >>> >>
> >>> >
> >>> >
> >>> > --
> >>> > Regards,
> >>> > Anton.
> >>> >
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> >>> For additional commands, e-mail: users-h...@maven.apache.org
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> >> For additional commands, e-mail: users-h...@maven.apache.org
> >>
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to