I use Nexus 2.14.0-01 and have the following problem:
The checksums that are computed by Nexus are different from the checksum that one gets on the command line (for the pom file). Deleting checksum files and recreating them by "Rebuild metadata" creates the same checksum files as before (with the apparently wrong checksum). Even manipulating the pom and then creating the checksum files always recreates the same wrong number.
Does Nexus have a cache for that that I need to empty? How can I convince Nexus to create correct checksum files?
Related
I'm having an issue where an external tool is being used to make a call which causes mvn to download a dependency on the fly. This download however is calling the "central" enterprise artifactory repo rather than one of our normal artifactory repos and I'm trying to figure out how to make it mirror the enterprise repo to point to the appropriate repo.
All I've seen indicates I should be able to do this by setting the mirror in the settings.xml file, and I've passed the path to this settings file via the -s option.
But the mirror is still being ignored.
Is there something special about making a command to use a dependency via the commandline that bypasses mirrors?
It appears that the reason setting mirrors wasn't working was because the deployment mechanisms in place weren't actually setting the xml files as intended. To get around it we added code to modify the .m2 folder to contain the xml files as part of the script run during deployment.
I have an Artifact Dependency for a build which produces two zip files. I only require one of the zip files but it keeps downloading both files, or gives an error, no matter what I try to specify to exclude the second.
The format of the file names is similar to App_1.1.1103.zip and App_1.1.1103_trial.zip, where 1.1.1103 is the version and build number.
The artifact paths I have defined are:
+:App*.zip!/**/*=>%AppFolder%
-:App*trial.zip
Both files are always downloaded and extracted to the same location with the second one overwriting files from the first.
How do I exclude the second zip when using the unzip syntax?
Is it possible to upload a file into Nexus (Open Source Version) without having its filename changed? By change I mean where uploaded file does not take the format artifactId-version-classifier but just kept its original file name.
For example: if I were you upload a file called t01.jar to nexus with the groupId being computerScience, the artifactId being Assignment1, and the version number being 1.0, the uploaded file would have a new file name Assignment1-1.0.jar but I want the file to retain its name t01.jar.
Is it possible for me to retain the original file name?
No, if you are using a Maven repository format on a repository server it dictates the structure of that repository in terms of directory and filename.
This makes it deterministic to retrieve filenames based on the coordinates. If you want to have another filename just change the filename after you downloaded the file from the repo.
The same applies btw if you use an Ivy repository or any other repository. They have a set naming convention and structure. For ivy it can be configured but once configured the same convention applies to all files and it is also using GAV coordinates for naming files and folders.
Again.. the main thing is ... there is no reason to insist on a specific filename!
I have a Maven project which performs a number of time consuming tests as part of the integration-test Maven cycle. I'm using Jenkins as the CI server.
During the integration test a number of files are produced in the target folder. For example, an "actual" BMP file is produced and compared to an "expected" BMP file. If the test fails, I need to look at the files in the target folder to determine how to deal with the error. Maybe the actual BMP looks fine and so it should be promoted to the new expected BMP. On the other hand, it may reveal a problem that requires a code fix.
The thing is I don't have any way to get access to these files, other than to ssh into the CI server and manually scp the files over to my own machine for closer inspection. It would be extremely helpful if I could access these files from the Jenkins web interface.
I tried using the build-helper-maven-plugin to attach the relevant files as Maven artifacts, but the problem is that there is no suitable phase in Maven that executes after an integration-test, if any test fails.
What can I do? Can I use the "Copy Artifact" plugin for this?
1) The files in the target folder can be accessed using a link such as /ws/projectname/target/filename...
2) Rather than typing the url each time, the SideBar plugin can be used to add a link to the file to Jenkins' left menu, making it easily accessible.
You need to copy your files into your workspace in a build step and archive them from there - Jenkins lets you specify artifacts only relative to the workspace.
I usually create a directory keyed by the BUILD_ID in the workspace, so that artifacts from different builds do not get mixed up in case I do not clean the workspace and archive from there (specifying ${BUILD_ID}/**/* in the archiving step).
In case your build fails before it can run the copying step and because of it does not do the copy, take a look at this question.
I have a zip archive artifact. I'm interested in downloading a single file from that artifact. I can't upload that file outside of the archive right now. The documentation says you download an archive like this
/repository/download/BUILD_TYPE_ID/BUILD_ID:id/ARTIFACT_PATH
So, my URL for that looks like this (and I need anonymous access, so you see the guest flag). And it works!
/repository/download/bt23/2253:id/mypackage.zip?guest=1
However, I want one single file from that artifact. And the docs are confusing on how to do that. They do not specify what replaces <zip or jar archive>. And I am not constructing the whole buildNumber or buildTypeId values properly.
/repository/archive/<zip or jar archive>/buildTypeId/BUILD_TYPE_ID/buildNumber/BUILD_NUMBER/index.html
I tried using zip and `.zip'. I tried filling in the build values directly, but it's much different from the working archive download URL.
/repository/archive/zip/buildTypeId/bt23/buildNumber/2253/myfile.txt?guest=1
Does anyone have working concrete example of the URL for a single file in an archive?
You need to replace <zip or jar archive> with relative path to your artifact. For example, if you want to retrieve file.txt from package.zip which is uploaded under dist directory in your build artifacts you need to use this url:
http://server/repository/archive/dist/package.zip/buildTypeId/bt23/buildNumber/2253/file.txt?guest=1
BTW, a new, more straightforward URL syntax will be available in TeamCity 7.0:
http://server/repository/download/bt23/2253/dist/package.zip!file.txt?guest=1
Old URLs will be supported too.