Giter VIP home page Giter VIP logo

grunt-nexus-deployer's People

Contributors

alfred-mac avatar alfred-thomas avatar ezeed avatar jandurovec avatar joaogbcravo avatar jv512049 avatar kwiatkk1 avatar skhatri avatar smatyas5am avatar sureshau avatar surlyburro avatar wismax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grunt-nexus-deployer's Issues

maven-metadata.xml contains only last deployed version

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:

  • download metadata isf available,
  • add current version to version array
  • update lastmodified / latest etc. (as done already)
  • upload the file to the server again

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.

"Artifact Upload failed - status code unknown" when curl is missing

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

Status code undefined

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.

Variable expansion on Windows (w/ or w/out Cgywin) fails

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'
            ];

Missing POM directory throws exception instead of creating the default directory

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.

curl options

--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.

Status code 400 with Nexus 3.16

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

uploads[pomDir + "/outer.xml"] = groupArtifactPath + '/' + 'maven-metadata.xml';

Read artifact before md5 fail with large file

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

lastUpdated in maven-metadata.xml is populated with local time

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:

  1. Alice in London deploys artifact X (snapshot) to Nexus
  2. Bob's project depends on X (snapshot) and downloads the artifact to local Maven repository during a build
  3. (2 hours later) Charlie in New York deploys a new version of artifact X (snapshot) to Nexus
  4. When Bob runs the build again, Maven will not download Charlie's version of artifact even though it's newer, because its lastUpdated is lower than the one for Alice's artifact that sits in Bob's local repository.

null timestamps on Artifact uploaded to nexus

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

Upload failed status 201

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

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.

Option to upload artifact only or multiple file/classifier upload

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.