skhatri / grunt-nexus-deployer Goto Github PK
View Code? Open in Web Editor NEWNexus Artifact deployer from grunt against snapshot and release repositories.
License: MIT License
Nexus Artifact deployer from grunt against snapshot and release repositories.
License: MIT License
if I use this plugin for subsequent deplyoments of differen release versions
(we use a release Nexus Repository)
a new artefact is uploaded, but also a new
maven-metadata.xml file.
This file is located in the basedir of the artefact and it should contain a list of deployed versions.
Currently this list is destroyed / not maintained by the plugin, it simply overwrites the array with the actual version.
The epected behavior should be:
Currently all tools depending on metadata will only see the last version deployed, older version are not visable, even if the artefact file still exists.
Hi,
if curl is missing (which is the default on a windows system), the nexus deployer fails somewhat silently with "Artifact Upload failed - status code unknown for .... "
I'd suggest adding this fact to the documentation.
Also please log stderr output, e.g.
childProcess.stderr.on('data', function (data) {
log.writeln(data);
});
I'd do a PR but I don't have git installed on this machine here. ;-)
Best regards,
David
[email protected] produces error code 401 when attempting to deploy on
windows 10, node v4.2.4
I downgraded to [email protected] and it works.
Nexus deployer it's not consistent. Sometimes it uploads all the files correctly. But in the majority of the times it fails with a status code "undefined". This happens sometimes with the metadata.xml file but also with the pom.xml.
It's something related with the "status" variable in the childProcess.stdout.on or childProcess.on function.
Full output:
09:16:17 -------------------------------------------
09:16:17 >> Artifact Upload failed
09:16:17 >> Status code undefined for http://nexus/content/repositories/yum_releases/group/project/maven-metadata.xml
09:16:17 Warning: Task "nexusDeployer:release" failed.� Use --force to continue.
The code needs to be updated from:
var curlOptions = [
'--silent',
'--output', '/dev/stderr',
'--write-out', '%{http_code}',
'--upload-file', fileLocation,
'--noproxy', options.noproxy ? options.noproxy : '127.0.0.1'
];
to (notice the extra double quotes to allow variable expansion on the http_code:
var curlOptions = [
'--silent',
'--output', '/dev/stderr',
'--write-out', '"%{http_code}"',
'--upload-file', fileLocation,
'--noproxy', options.noproxy ? options.noproxy : '127.0.0.1'
];
I ran into this issue while running a borrowed Gulp file that did not specify the pomDir
option. The createAndUploadArtifacts
function tries to default it to test/poms
and create the directory. But the directoryExists
function throws an Exception if the directory does not exist and stops execution.
I think only one of those options should exist - either throw the exception or create the default directory. What does the author @skhatri think? I can submit a pull request depending on your response.
--noproxy was introduced into curl at version 7.19.4 When the property is present on prior versions, the curl command fails silently and you don't have a way to remove it by configuration through the API. --noproxy should be an option to be added rather than a default.
After update to Nexus 3.16, script fails with following error:
-------------------------------------------
>> Artifact Upload failed
>> Status code 400 for https://xxxxx.xxxx.xx/repository/maven-snapshots//com/xxxxx/xxxx/xxxxx/maven-metadata.xml
Warning: Task "nexusDeployer:test" failed. Use --force to continue.
This is due to NEXUS-16853
It works if the following lines 129-131 are deleted manually from the script
grunt-nexus-deployer/tasks/lib/index.js
Line 129 in 81f642d
Hi,
This part of the plugin fail if you have a large artifact size. In my case in begain to fail at around 300mb.
I think that replacing the full read in a var with a md5 and sha based on a stream would solve the problem.
Here is the code in problem here :
var artifactData = fs.readFileSync(options.artifact, {encoding: 'binary'});
fs.writeFileSync(pomDir + '/artifact.' + options.packaging + '.md5', md5(artifactData));
fs.writeFileSync(pomDir + '/artifact.' + options.packaging + '.sha1', sha1(artifactData));
Thanks
The lastUpdated element in maven-metadata.xml is populated with local time of the computer that did the deployment instead of UTC.
This causes issues when people in different timezones are working on the same project and deploying the same artifact.
Scenario:
The option to accept Self-Signed Certs when connecting over https isn't documented ie
options.insecure = true
Hi,
We are using nexus-deployer (version 0.1.8) .The plugin is deploying artifacts to Nexus with null timestamps.
Since, our snapshot repository is set to be a maven2 standard and the policy requires a timestamp or it is considered invalid and removed but the clean task which runs every night.
Can you please have a look into this.
Thanks
Nikhil
Hi,
I have configured the grunt plugin, installed curl and when I run the plugin I get this error
Artifact Upload failed
Status code 201 for http://xx
on Nexus the groupId folders have been correctly created, maven-metadata.xml has been created as the http code 201 says, but the arifact upload failed, how can I have more log details? do you know what happens?
I am running the command as grunt nexusDeployer -verbose
Thanks a lot for the attention.
Status code 000
Anyone know what this error means?
We've now moved to using authentication when uploading to nexus so I'm passing the username and password using this grunt plugin.
It used to work when a username and password was not required.
Can an option be added to support upload of the artifact only? The scenario is that I have two files to upload one with a classifier. In releases repository the overwrite option is set to false so therefore trying to upload the pom files causes a 400 http response?
Or could add additional functionality to upload multiple files/classifier for a single version/group/artifact?
Looks like although ejs.render receives the expected options here
https://github.com/skhatri/grunt-nexus-deployer/blob/master/tasks/lib/index.js#L19
the values are not inserted in the template which results not populated.
I suspect ejs doesn't support (anymore?) the ejs.open
and ejs.close
configs.
If I revert to the "classic" ejs pattern (<artifactId><%=artifactId%></artifactId>
) all works fine.
Thanks!!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.