Skip to content

Commit

Permalink
CI settings added
Browse files Browse the repository at this point in the history
  • Loading branch information
anidotnet committed Jun 21, 2016
1 parent 4bf1d15 commit 53c5f9b
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 14 deletions.
42 changes: 42 additions & 0 deletions .ci/settings.xml
@@ -0,0 +1,42 @@
<!--
~ Copyright (c) 2016 JBus author or authors.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->

<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>
<!-- Maven Central Deployment -->
<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>
8 changes: 5 additions & 3 deletions .gitlab-ci.yml
Expand Up @@ -11,7 +11,9 @@ build_job:
deploy_job:
stage: deploy
only:
- release
- tags
script:
- echo "<settings><servers><server><id>ossrh</id><username>\$OSSRH_USER</username><password>\$OSSRH_PASS</password></server></servers></settings>" > ~/settings.xml
- mvn deploy --settings ~/settings.xml
# export/import GPG key - https://dracoblue.net/dev/uploading-snapshots-and-releases-to-maven-central-with-travis/
- echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import
- echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust
- mvn clean deploy --settings .ci/settings.xml -B -U
59 changes: 50 additions & 9 deletions pom.xml
Expand Up @@ -52,47 +52,61 @@
<url>git@gitlab.com:dizitart/jbus.git</url>
</scm>

<properties>
<commons-logging.version>1.2</commons-logging.version>
<commons-lang3.version>3.4</commons-lang3.version>
<log4j.version>1.2.17</log4j.version>
<junit.version>4.12</junit.version>
<powermock.version>1.6.5</powermock.version>
<mockito.version>1.10.19</mockito.version>
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
<nexus-staging-maven-plugin.version>1.6.3</nexus-staging-maven-plugin.version>
</properties>

<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
<version>${commons-logging.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
<version>${commons-lang3.version}</version>
</dependency>

<!-- Test dependency -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<version>${log4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.6.5</version>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.6.5</version>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -116,18 +130,20 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -140,12 +156,37 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</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>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/dizitart/jbus/ExceptionEvent.java
Expand Up @@ -33,7 +33,7 @@ public class ExceptionEvent implements HandlerChainAware {
* Instantiate the exception event.
*
* @param exception the exception that was thrown from the subscriber code.
* @param exceptionContext contextual information about the {@param exception}.
* @param exceptionContext contextual information about the {@code exception}.
* */
public ExceptionEvent(Throwable exception, ExceptionContext exceptionContext) {
this.exception = exception;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/dizitart/jbus/ReflectionUtil.java
Expand Up @@ -35,7 +35,7 @@ class ReflectionUtil {
private static Log logger = LogFactory.getLog(ReflectionUtil.class);

/**
* Finds all subscriber methods in the whole class hierarchy of {@param subscribedClass}.
* Finds all subscriber methods in the whole class hierarchy of {@code subscribedClass}.
*
* */
static List<ListenerMethod> findSubscribedMethods(Class<?> subscribedClass) {
Expand Down

0 comments on commit 53c5f9b

Please sign in to comment.