Skip to content

Commit

Permalink
Add deployment configuration. (#22)
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Klauke <info@felix-klauke.de>
  • Loading branch information
felixklauke committed Aug 14, 2018
1 parent a7c7350 commit b67d8f7
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 2 deletions.
31 changes: 30 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
######################################
### Configure programming language ###
######################################
language: java
script: mvn clean compile test

##################################
### Make sure using Oracle JDK ###
##################################
jdk:
- oraclejdk8

###################################
### Disable Email notifications ###
###################################
notifications:
email: false

###########################
### Actual Build Script ###
###########################
script:
- bash buildViaTravis.sh

##################
### Deployment ###
##################
deploy:
provider: script
script: bash installViaTravis.sh
on:
branch: master
4 changes: 4 additions & 0 deletions buildViaTravis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

# Build via maven
mvn clean compile test
21 changes: 20 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,27 @@

<artifactId>caroline-core</artifactId>

<version>1.1</version>
<version>1.2</version>

<distributionManagement>

<!-- Release repo -->
<repository>
<id>felixklauke-maven-releases</id>
<url>https://repo.felix-klauke.de/repository/maven-releases/</url>
</repository>

<!-- Snapshot repo -->
<snapshotRepository>
<id>felixklauke-maven-snapshots</id>
<url>https://repo.felix-klauke.de/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>

<build>
<plugins>

<!-- Compiler settings -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -50,6 +67,7 @@
</build>

<repositories>

<!-- Spigot nexus -->
<repository>
<id>spigot-repo</id>
Expand All @@ -64,6 +82,7 @@
</repositories>

<dependencies>

<!--Spigot API-->
<dependency>
<groupId>org.spigotmc</groupId>
Expand Down
42 changes: 42 additions & 0 deletions deploy/maven-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--
~ MIT License
~
~ Copyright (c) 2017 Felix Klauke
~
~ Permission is hereby granted, free of charge, to any person obtaining a copy
~ of this software and associated documentation files (the "Software"), to deal
~ in the Software without restriction, including without limitation the rights
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
~ copies of the Software, and to permit persons to whom the Software is
~ furnished to do so, subject to the following conditions:
~
~ The above copyright notice and this permission notice shall be included in all
~ copies or substantial portions of the Software.
~
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
~ SOFTWARE.
-->

<settings>
<servers>

<!-- Credentials for snapshots repo -->
<server>
<id>felixklauke-maven-snapshots</id>
<username>${env.NEXUS_DEPLOYMENT_CREDENTIALS_USERNAME}</username>
<password>${env.NEXUS_DEPLOYMENT_CREDENTIALS_PASSWORD}</password>
</server>

<!-- Credentials for release repo -->
<server>
<id>felixklauke-maven-releases</id>
<username>${env.NEXUS_DEPLOYMENT_CREDENTIALS_USERNAME}</username>
<password>${env.NEXUS_DEPLOYMENT_CREDENTIALS_PASSWORD}</password>
</server>
</servers>
</settings>
4 changes: 4 additions & 0 deletions installViaTravis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

# Deploy to nexus
mvn deploy --settings deploy/maven-settings.xml

0 comments on commit b67d8f7

Please sign in to comment.