Skip to content

Commit

Permalink
Merge 886b26a into 1f0dfc3
Browse files Browse the repository at this point in the history
  • Loading branch information
jodastephen committed Oct 18, 2017
2 parents 1f0dfc3 + 886b26a commit ed8cd81
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 12 deletions.
15 changes: 13 additions & 2 deletions .travis.yml
Expand Up @@ -21,8 +21,19 @@ jdk:
- oraclejdk8
- oraclejdk9

cache:
directories:
- "$HOME/.m2/repository"

before_cache:
- rm -rf $HOME/.m2/repository/org/apache/commons/commons-lang3

install:
- mvn --version

script:
- mvn
- mvn -e -B

after_success:
- mvn clean cobertura:cobertura coveralls:report -Ptravis-cobertura
- if [ $TRAVIS_JDK_VERSION == "openjdk7" ] || [ $TRAVIS_JDK_VERSION == "oraclejdk8" ]; then mvn -e -B clean cobertura:cobertura coveralls:report -Ptravis-cobertura; fi
- if [ $TRAVIS_JDK_VERSION == "oraclejdk9" ]; then mvn -e -B clean cobertura:cobertura -Ptravis-cobertura; fi
103 changes: 93 additions & 10 deletions pom.xml
Expand Up @@ -63,8 +63,6 @@
<developer>
<name>Stephen Colebourne</name>
<id>scolebourne</id>
<email>scolebourne@joda.org</email>
<organization>SITA ATS Ltd</organization>
<timezone>0</timezone>
<roles>
<role>Java Developer</role>
Expand Down Expand Up @@ -593,6 +591,11 @@
<!-- JMH Benchmark related properties, version, target compiler and name of the benchmarking uber jar. -->
<jmh.version>1.17.4</jmh.version>
<uberjar.name>benchmarks</uberjar.name>

<!-- Override versions for Java 9 -->
<commons.compiler.version>3.7.0</commons.compiler.version>
<commons.felix.version>3.3.0</commons.felix.version>
<commons.javadoc.version>3.0.0-M1</commons.javadoc.version>
</properties>


Expand Down Expand Up @@ -654,14 +657,18 @@
</goals>
</execution>
</executions>
<!-- Temporary fix for LANG-1338, remove this after this has implemented in parent pom -->
<configuration>
<archive combine.children="append">
<manifestEntries>
<Automatic-Module-Name>org.apache.commons.lang3</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
<!-- https://issues.apache.org/jira/browse/FELIX-5698 -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<dependencies>
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>biz.aQute.bndlib</artifactId>
<version>3.5.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -679,6 +686,7 @@
<configLocation>${basedir}/checkstyle.xml</configLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<enableRulesSummary>false</enableRulesSummary>
<excludes>module-info.java</excludes>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -827,6 +835,41 @@
</build>
</profile>

<profile>
<id>java7and8</id>
<activation>
<jdk>[1.7,9)</jdk>
</activation>
<build>
<plugins>
<!-- Don't compile module-info.java, see java 9 profile -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
<!-- Avoid errors from module-info -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<sourceFileExcludes>
<sourceFileExclude>module-info.java</sourceFileExclude>
</sourceFileExcludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>java9</id>
<activation>
Expand All @@ -839,7 +882,47 @@
<commons.javadoc.version>3.0.0-M1</commons.javadoc.version>
<!-- coverall version 4.3.0 does not work with java 9, see https://github.com/trautonen/coveralls-maven-plugin/issues/112 -->
<coveralls.skip>true</coveralls.skip>
<!-- Skip animal sniffer, as it doesn't work on Java 9 and the release flag does the same job -->
<animal.sniffer.skip>true</animal.sniffer.skip>
<!-- Skip clirr, as it doesn't work on Java 9 -->
<clirr.skip>true</clirr.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<!-- compile first with module-info for Java 9 -->
<execution>
<id>default-compile</id>
<configuration>
<release>9</release>
</configuration>
</execution>
<!-- then compile without module-info for Java 7 -->
<execution>
<id>base-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
</execution>
</executions>
<!-- setup defaults for compile and testCompile -->
<configuration>
<jdkToolchain>
<version>9</version>
</jdkToolchain>
<release>7</release>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
Expand Down
41 changes: 41 additions & 0 deletions src/main/java/module-info.java
@@ -0,0 +1,41 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/

/**
* Apache Commons Lang provides utility classes for the core of Java.
*/
module org.apache.commons.lang3 {

// see AbstractCircuitBreaker
requires static java.desktop;

// all packages are exported
exports org.apache.commons.lang3;
exports org.apache.commons.lang3.arch;
exports org.apache.commons.lang3.builder;
exports org.apache.commons.lang3.concurrent;
exports org.apache.commons.lang3.event;
exports org.apache.commons.lang3.exception;
exports org.apache.commons.lang3.math;
exports org.apache.commons.lang3.mutable;
exports org.apache.commons.lang3.reflect;
exports org.apache.commons.lang3.text;
exports org.apache.commons.lang3.text.translate;
exports org.apache.commons.lang3.time;
exports org.apache.commons.lang3.tuple;

}

0 comments on commit ed8cd81

Please sign in to comment.