Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to upload artifact only or multiple file/classifier upload #14

Open
agubler opened this issue May 14, 2015 · 1 comment
Open

Comments

@agubler
Copy link

agubler commented May 14, 2015

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?

@avanha
Copy link

avanha commented Jun 9, 2015

I worked around the problem in my fork, by adding an option that controls meta-data upload. Then in my build file, I have multiple upload configurations, one for each classifier, but only the first one uploads the metadata, avoiding conflicts in my release repository (Hosted in Nexus). I also revised SNAPSHOT support. I'll ping the project owner to see if he'd accept a pull request.

https://github.com/SpritzInc/grunt-nexus-deployer

Example config:

        nexusDeployer: {
            options: {
                auth: {
                    username:'user',
                    password:'password'
                },
                groupId: 'org.example.project',
                artifactId: '<%= pkg.name %>',
                version: '<%= mavenVersion %>',
                buildNumber: '<%= buildNumber %>',
                buildTime: '<%= buildTime %>',
                packaging: 'zip',
                pomDir: 'dist/pom',
                url: '<%= publishUrl %>'
            },
            debug: {
                options: {
                    classifier: 'debug',
                    uploadMetadata: true, // Since this is done first, upload the metadata here
                    artifact: 'dist/<%=pkg.name%>-<%= pkg.version %>-debug.zip'
                }
            },
            release: {
                options: {
                    classifier: '',
                    uploadMetadata: false, // But skip it here, to prevent errors when publishing to a release repo
                    artifact: 'dist/<%=pkg.name%>-<%= pkg.version %>.zip'
                }
            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants