Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Geo Tools
Commits
4859a8ea
Commit
4859a8ea
authored
May 31, 2017
by
Matija Obreza
Browse files
Publish artifacts on Maven Central
parent
765864be
Pipeline
#1217
passed with stage
in 1 minute and 18 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.ci-maven-settings.xml
0 → 100644
View file @
4859a8ea
<settings
xmlns=
"http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd"
>
<servers>
<server>
<id>
ossrh
</id>
<username>
${env.OSSRH_USER}
</username>
<password>
${env.OSSRH_PASS}
</password>
</server>
</servers>
<profiles>
<profile>
<id>
ossrh
</id>
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
<properties>
<gpg.executable>
${env.GPG_EXECUTABLE}
</gpg.executable>
<gpg.passphrase>
${env.GPG_PASSPHRASE}
</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
.gitlab-ci.yml
View file @
4859a8ea
image
:
maven:3-jdk-8
stages
:
-
build
build
:
script
:
"
mvn
install
-B"
run tests in branches
:
stage
:
build
image
:
maven:3-jdk-8
script
:
-
MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" mvn test -B
except
:
-
master
-
tags
artifacts
:
paths
:
-
geotools-cli/target/geotools-cli*.jar
-
geotools-cli/target/lib/*.jar
publish maven snapshot artifacts
:
stage
:
build
image
:
maven:3-jdk-8
script
:
-
echo "${GPG_KEY_SECRET}" | gpg --allow-secret-key-import --import
-
gpg --list-keys
-
mvn clean deploy --settings .ci-maven-settings.xml -B -U
only
:
-
master
publish maven artifacts
:
stage
:
build
image
:
maven:3-jdk-8
script
:
-
echo "${GPG_KEY_SECRET}" | gpg --allow-secret-key-import --import
-
gpg --list-keys
-
mvn clean deploy --settings .ci-maven-settings.xml -B -U -Prelease
only
:
-
tags
pom.xml
View file @
4859a8ea
...
...
@@ -124,4 +124,71 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>
release
</id>
<activation>
<activeByDefault>
false
</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-source-plugin
</artifactId>
<version>
2.2.1
</version>
<executions>
<execution>
<id>
attach-sources
</id>
<goals>
<goal>
jar-no-fork
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-javadoc-plugin
</artifactId>
<version>
2.9.1
</version>
<executions>
<execution>
<id>
attach-javadocs
</id>
<goals>
<goal>
jar
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-gpg-plugin
</artifactId>
<version>
${maven-gpg-plugin.version}
</version>
<executions>
<execution>
<id>
sign-artifacts
</id>
<phase>
verify
</phase>
<goals>
<goal>
sign
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<distributionManagement>
<repository>
<id>
ossrh
</id>
<name>
Sonatype Releases
</name>
<url>
https://oss.sonatype.org/service/local/staging/deploy/maven2
</url>
</repository>
<snapshotRepository>
<id>
ossrh
</id>
<name>
Sonatype Snapshots
</name>
<url>
https://oss.sonatype.org/content/repositories/snapshots
</url>
<uniqueVersion>
true
</uniqueVersion>
</snapshotRepository>
</distributionManagement>
</project>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment