diff --git a/.travis.yml b/.travis.yml
index 44d3514b7..1bc1e1ba4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,5 +9,5 @@ jdk:
# - openjdk11 # Not currently supported by Jacoco plugin
env:
- MAVEN_OPTS="-Dhttps.protocol=TLSv1.2"
-script: mvn install -Prelease -Dgpg.skip=true
+script: mvn install -Prelease -Dgpg.skip=true -Djdk.enforced=1.7
after_success: mvn package -Pcoveralls
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b927d4491..016a765a4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,8 @@
- Added `@LengthRange` and `@ExactLength` for strings (#73)
- Added `@AllowedEnumValues` as a simpler way of specifying `@AllowedRawValues` on enum typed fields (#73)
- Added `@StartsWith` and `@EndsWith` for enforcing prefixes/suffixes on strings (#73)
+- Build Improvements
+ - `Automatic-Module-Name` manifest entries and `module-info.java` available so modules can be used on Module Path (#92) - Thanks to [jfallows](https://github.com/jfallows)
## 2.6.0
diff --git a/README.md b/README.md
index dac8d516a..bb88d3beb 100644
--- a/README.md
+++ b/README.md
@@ -99,7 +99,7 @@ Airline is built with Java 7 so can be used with Java 7 or above.
Airline does make heavy use of reflection and therefore will likely not work on the Module Path without exporting packages that contain your CLI and Command classes as part of your `module-info.java`
-I do not currently use JPMS in any of my personal/work projects that use Airline and therefore there has been no testing of this.
+Current `2.7.0-SNAPSHOT` builds include contributions from our user community to enable use of Airline on the Module Path including relevant `module-info.java` and `Automatic-Module-Name` manifest entries. If you encounter a problem with this please report it at https://github.com/rvesse/airline/issues
## Maven Artifacts
diff --git a/airline-core/pom.xml b/airline-core/pom.xml
index a4540b826..e06236c17 100644
--- a/airline-core/pom.xml
+++ b/airline-core/pom.xml
@@ -17,6 +17,7 @@
${project.parent.basedir}
true
+ com.github.rvesse.airline
diff --git a/airline-core/src/main/moditect/module-info.java b/airline-core/src/main/moditect/module-info.java
new file mode 100644
index 000000000..e9c93f2df
--- /dev/null
+++ b/airline-core/src/main/moditect/module-info.java
@@ -0,0 +1,93 @@
+/**
+ * Copyright (C) 2010-16 the original 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.
+ */
+module com.github.rvesse.airline
+{
+ requires com.github.rvesse.airline.io;
+ requires org.apache.commons.lang3;
+ requires org.apache.commons.collections4;
+ requires javax.inject;
+
+ exports com.github.rvesse.airline;
+ exports com.github.rvesse.airline.annotations;
+ exports com.github.rvesse.airline.annotations.help;
+ exports com.github.rvesse.airline.annotations.restrictions;
+ exports com.github.rvesse.airline.annotations.restrictions.global;
+ exports com.github.rvesse.airline.annotations.restrictions.ranges;
+ exports com.github.rvesse.airline.builder;
+ exports com.github.rvesse.airline.help;
+ exports com.github.rvesse.airline.help.cli;
+ exports com.github.rvesse.airline.help.common;
+ exports com.github.rvesse.airline.help.sections;
+ exports com.github.rvesse.airline.help.sections.common;
+ exports com.github.rvesse.airline.help.sections.factories;
+ exports com.github.rvesse.airline.help.suggester;
+ exports com.github.rvesse.airline.model;
+ exports com.github.rvesse.airline.parser;
+ exports com.github.rvesse.airline.parser.aliases;
+ exports com.github.rvesse.airline.parser.command;
+ exports com.github.rvesse.airline.parser.errors;
+ exports com.github.rvesse.airline.parser.errors.handlers;
+ exports com.github.rvesse.airline.parser.options;
+ exports com.github.rvesse.airline.parser.resources;
+ exports com.github.rvesse.airline.parser.suggester;
+ exports com.github.rvesse.airline.restrictions;
+ exports com.github.rvesse.airline.restrictions.common;
+ exports com.github.rvesse.airline.restrictions.factories;
+ exports com.github.rvesse.airline.restrictions.global;
+ exports com.github.rvesse.airline.restrictions.options;
+ exports com.github.rvesse.airline.types;
+ exports com.github.rvesse.airline.types.numerics;
+ exports com.github.rvesse.airline.types.numerics.abbreviated;
+ exports com.github.rvesse.airline.types.numerics.bases;
+ exports com.github.rvesse.airline.utils;
+ exports com.github.rvesse.airline.utils.comparators;
+ exports com.github.rvesse.airline.utils.predicates;
+ exports com.github.rvesse.airline.utils.predicates.parser;
+ exports com.github.rvesse.airline.utils.predicates.restrictions;
+
+ provides com.github.rvesse.airline.help.sections.factories.HelpSectionFactory with
+ com.github.rvesse.airline.help.sections.factories.CommonSectionsFactory;
+
+ provides com.github.rvesse.airline.restrictions.factories.ArgumentsRestrictionFactory with
+ com.github.rvesse.airline.restrictions.factories.AllowedValuesRestrictionFactory,
+ com.github.rvesse.airline.restrictions.factories.OccurrencesRestrictionFactory,
+ com.github.rvesse.airline.restrictions.factories.PathRestrictionFactory,
+ com.github.rvesse.airline.restrictions.factories.PortRestrictionFactory,
+ com.github.rvesse.airline.restrictions.factories.RangeRestrictionFactory,
+ com.github.rvesse.airline.restrictions.factories.SimpleRestrictionsFactory,
+ com.github.rvesse.airline.restrictions.factories.StringRestrictionFactory;
+
+ provides com.github.rvesse.airline.restrictions.factories.GlobalRestrictionFactory with
+ com.github.rvesse.airline.restrictions.factories.StandardGlobalRestrictionsFactory;
+
+ provides com.github.rvesse.airline.restrictions.factories.OptionRestrictionFactory with
+ com.github.rvesse.airline.restrictions.factories.AllowedValuesRestrictionFactory,
+ com.github.rvesse.airline.restrictions.factories.OccurrencesRestrictionFactory,
+ com.github.rvesse.airline.restrictions.factories.PathRestrictionFactory,
+ com.github.rvesse.airline.restrictions.factories.PortRestrictionFactory,
+ com.github.rvesse.airline.restrictions.factories.RangeRestrictionFactory,
+ com.github.rvesse.airline.restrictions.factories.RequiredOnlyIfRestrictionFactory,
+ com.github.rvesse.airline.restrictions.factories.RequireFromRestrictionFactory,
+ com.github.rvesse.airline.restrictions.factories.SimpleRestrictionsFactory,
+ com.github.rvesse.airline.restrictions.factories.StringRestrictionFactory;
+
+ uses com.github.rvesse.airline.ChannelFactory;
+ uses com.github.rvesse.airline.help.sections.factories.HelpSectionFactory;
+ uses com.github.rvesse.airline.restrictions.factories.ArgumentsRestrictionFactory;
+ uses com.github.rvesse.airline.restrictions.factories.GlobalRestrictionFactory;
+ uses com.github.rvesse.airline.restrictions.factories.OptionRestrictionFactory;
+
+}
diff --git a/airline-io/pom.xml b/airline-io/pom.xml
index 3e65e2995..70dc8544f 100644
--- a/airline-io/pom.xml
+++ b/airline-io/pom.xml
@@ -12,6 +12,7 @@
${project.parent.basedir}
true
+ com.github.rvesse.airline.io
diff --git a/airline-io/src/main/moditect/module-info.java b/airline-io/src/main/moditect/module-info.java
new file mode 100644
index 000000000..c4dec7dcb
--- /dev/null
+++ b/airline-io/src/main/moditect/module-info.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (C) 2010-16 the original 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.
+ */
+module com.github.rvesse.airline.io
+{
+ requires org.apache.commons.lang3;
+
+ exports com.github.rvesse.airline.io;
+ exports com.github.rvesse.airline.io.colors;
+ exports com.github.rvesse.airline.io.colors.sources;
+ exports com.github.rvesse.airline.io.decorations;
+ exports com.github.rvesse.airline.io.decorations.sources;
+ exports com.github.rvesse.airline.io.output;
+ exports com.github.rvesse.airline.io.printers;
+ exports com.github.rvesse.airline.io.writers;
+}
diff --git a/docs/guide/practise/jdk.md b/docs/guide/practise/jdk.md
index 2db5d85e8..00c3558b2 100644
--- a/docs/guide/practise/jdk.md
+++ b/docs/guide/practise/jdk.md
@@ -23,4 +23,4 @@ Airline is built with Java 7 so can be used with Java 7 or above.
Airline does make heavy use of reflection and therefore will likely not work on the Module Path without exporting packages that contain your CLI and Command classes as part of your `module-info.java`
-I do not currently use JPMS in any of my personal/work projects that use Airline and therefore there has been no testing of this.
\ No newline at end of file
+Current `2.7.0-SNAPSHOT` builds include contributions from our user community to enable use of Airline on the Module Path including relevant `module-info.java` and `Automatic-Module-Name` manifest entries. If you encounter a problem with this please report it at https://github.com/rvesse/airline/issues
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 1c53b4cc4..03d0c45cc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,6 +48,7 @@
1.7
+ 1.7
${project.basedir}
utf-8
@@ -67,6 +68,7 @@
1.6
3.1.1
2.22.0
+ 1.0.0.Beta2
1
@@ -162,7 +164,7 @@
- ${jdk.target}
+ ${jdk.enforced}
@@ -386,6 +388,9 @@
airline-maven-plugin
docs
+
+ 1.8
+
@@ -535,5 +540,115 @@
+
+
+ moditect-jdk8-plus
+
+ [1.8,)
+
+ ${basedir}/src/main/moditect/module-info.java
+
+
+
+
+
+ org.moditect
+ moditect-maven-plugin
+ ${plugin.moditect}
+
+
+ add-module-infos
+ package
+
+ add-module-info
+
+
+ 9
+ true
+
+
+ ${basedir}/src/main/moditect/module-info.java
+
+
+
+
+
+
+
+
+
+
+
+ automatic-module-name
+
+
+ moditect.skip
+ true
+
+
+ ${basedir}/src/main/moditect/module-info.java
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${plugin.jar}
+
+
+
+ ${moditect.moduleName}
+
+
+
+
+
+
+
+
+
+ generate-module-info
+
+ 9
+
+
+
+
+ org.moditect
+ moditect-maven-plugin
+ ${plugin.moditect}
+
+
+
+ generate-module-info
+
+
+
+
+
+ ${project.groupId}
+ ${project.artifactId}
+ ${project.version}
+
+
+ ${moditect.moduleName}
+
+ *;
+
+
+ *;
+
+ true
+
+
+
+
+
+
+
+
+
+