Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Commit

Permalink
JPMS module descriptor
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Grigoriadi <roman.grigoriadi@oracle.com>
  • Loading branch information
Roman Grigoriadi committed Jun 12, 2018
1 parent 265c537 commit 1c19bf8
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 74 deletions.
154 changes: 80 additions & 74 deletions saaj-ri/pom.xml
Expand Up @@ -79,6 +79,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<release>7</release>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -128,26 +131,63 @@
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>prepare-endorsed</id>
<phase>validate</phase>
<id>copy-upgrade-module-path</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<skip>${maven.endorsed.skip}</skip>
<outputDirectory>${endorsed.dir}</outputDirectory>
<outputDirectory>${upgrade.mods}</outputDirectory>
<silent>false</silent>
<includeArtifactIds>javax.xml.soap-api</includeArtifactIds>
</configuration>
</execution>
<execution>
<id>copy-module-path</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${mods}</outputDirectory>
<silent>false</silent>
<includeArtifactIds>stax-ex,mimepull</includeArtifactIds>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<release>9</release>
<compilerArgs>
<arg>--upgrade-module-path</arg>
<arg>${upgrade.mods}</arg>
</compilerArgs>
</configuration>
</execution>
<execution>
<!--Replaces all files with 7, with exception to module-info -->
<id>base-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>7</release>
<compilerArgs>
<arg>-Djava.endorsed.dirs=${upgrade.mods}</arg>
</compilerArgs>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
</execution>
</executions>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArgs>
<compilerArg>-Xlint:all</compilerArg>
</compilerArgs>
Expand Down Expand Up @@ -217,77 +257,29 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalJOptions>
<additionalJOption>--upgrade-module-path</additionalJOption>
<additionalJOption>${upgrade.mods}</additionalJOption>
<additionalJOption>--module-path</additionalJOption>
<additionalJOption>${mods}</additionalJOption>
</additionalJOptions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${proxyOpts} --add-modules java.xml.soap --upgrade-module-path ${upgrade.mods}</argLine>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>endorsed-dirs</id>
<activation>
<jdk>[1.6,9)</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<compilerArg>-Djava.endorsed.dirs=${endorsed.dir}</compilerArg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${proxyOpts} -Djava.endorsed.dirs="${endorsed.dir}"</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalJOption>-J-Djava.endorsed.dirs=${endorsed.dir}</additionalJOption>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jdk9-setup</id>
<activation>
<jdk>9</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>7</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${proxyOpts} --add-modules java.xml.soap --upgrade-module-path ${endorsed.dir}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalJOptions>
<additionalJOption>--add-modules</additionalJOption>
<additionalJOption>java.xml.soap,java.xml.bind</additionalJOption>
<additionalJOption>--upgrade-module-path</additionalJOption>
<additionalJOption>${endorsed.dir}</additionalJOption>
</additionalJOptions>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jvnet-release</id>
<build>
Expand Down Expand Up @@ -464,6 +456,19 @@
</license>
</licenses>

<repositories>
<repository>
<id>promoted.java.net</id>
<url>https://maven.java.net/content/repositories/promoted/</url>
<layout>default</layout>
</repository>
<repository>
<id>jvnet-nexus-staging</id>
<url>https://maven.java.net/content/repositories/staging/</url>
<layout>default</layout>
</repository>
</repositories>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -522,7 +527,8 @@
<properties>
<findbugs.exclude>${project.basedir}/exclude.xml</findbugs.exclude>
<findbugs.threshold>Low</findbugs.threshold>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<upgrade.mods>${project.build.directory}/upgrade-mods</upgrade.mods>
<mods>${project.build.directory}/mods</mods>
<proxyOpts />
</properties>

Expand Down
54 changes: 54 additions & 0 deletions saaj-ri/src/java/module-info.java
@@ -0,0 +1,54 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
* or LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/

/**
* Reference Implementation of JSR-67: SOAP with Attachments API for Java.
*/
module com.sun.xml.messaging.saaj {
requires org.jvnet.mimepull;
requires transitive java.xml.bind;
requires org.jvnet.staxex;
requires transitive java.xml.soap;
requires java.logging;
requires java.desktop;

exports com.sun.xml.messaging.saaj;
exports com.sun.xml.messaging.saaj.soap;
}

0 comments on commit 1c19bf8

Please sign in to comment.