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

Autodeploy snapshot from master to Sonatype #236

Closed
Artur- opened this Issue Apr 27, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@Artur-
Copy link
Contributor

Artur- commented Apr 27, 2018

https://oss.sonatype.org/content/repositories/snapshots/org/hotswapagent/ only contains some quite outdated snapshots. It would be nice if the Travis master branch build autodeployed the snapshots

The main blocker for this as I see it is that the group id used in the project does not match the group id of the packages deployed to Maven. In the project you use org.hotswap.agent while the package in Sonatype is org.hotswapagent as http://hotswapagent.org/ is a domain owned by the project owner while http://hotswap.org/ is not. It can of course be resolved by some creative find and replace in a deploy script...

Once the group id problem is resolved, setting up deployment should be fairly trivial, e.g. in .travis.yml


deploy:
  - provider: script
    script: ./.travis.deploy.sh
    skip_cleanup: true
    on:
      branch: master

.travis.deploy.sh something like

#!/bin/bash

mvn deploy  --settings ./.travis.settings.xml -DaltDeploymentRepository=sonatype-snapshots::default::https://oss.sonatype.org/content/repositories/snapshots -DskipTests -B

and a .travis.settings.xml like

<settings>
    <servers>
        <server>
            <id>sonatype-snapshots</id>
            <username>${env.SONATYPE_USERNAME}</username>
            <password>${env.SONATYPE_PASSWORD}</password>
        </server>
    </servers>
</settings>

to allow setting the sonatype credentials as secret Travis variables.

There might also be easier ways for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.