Nexus will then simply upload the POM file but not the JAR file. At this point, the clean-up of the mess begins.
Your Maven build will fail, not being able to locate the JAR file. If you attempt to re-do the step, but this time, pressing the Add Artifact button, you will get the following error:
You need to clean up the repository of the Nexus server, which you can do by going to the Browse Storage tab > navigating to the appropriate section by GAV > right-click > Delete.
However, if you attempt another build, Maven will fail again. If you look at the build log, you will see something like:
Failure to find ... in http://.../nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced
The next step is to go to the Local repository where the Maven build ran and clean it up. Navigate in the file system by GAV and you will find files named similarly to:
some-artifact-0.1.jar.lastUpdated
some-artifact-0.1.pom.lastUpdated
Delete these, re-run the Maven build. It should find your artifacts now.
No comments:
Post a Comment