Skip to content

Commit

Permalink
[WFLY-15035] Use source code transformation to produce a native jakar…
Browse files Browse the repository at this point in the history
…ta namespace variant of the mail subsystem artifact
  • Loading branch information
bstansberry committed Aug 6, 2021
1 parent c53d3b0 commit 120db9a
Show file tree
Hide file tree
Showing 7 changed files with 427 additions and 13 deletions.
28 changes: 15 additions & 13 deletions ee-9/feature-pack/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@
<servlet.galleon-common.resources.directory>${basedir}/../../servlet-feature-pack/galleon-common/src/main/resources</servlet.galleon-common.resources.directory>
<full.ee-9-api.license.directory>${basedir}/src/license</full.ee-9-api.license.directory>


<version.com.sun.faces>3.0.0.SP04</version.com.sun.faces>
<version.com.sun.activation.jakarta.activation>2.0.0</version.com.sun.activation.jakarta.activation>
<version.jakarta.annotation.jakarta-annotation-api>2.0.0</version.jakarta.annotation.jakarta-annotation-api>
<version.com.sun.activation.jakarta.activation>2.0.0</version.com.sun.activation.jakarta.activation>
<version.jakarta.authentication.jakarta-authentication-api>2.0.0</version.jakarta.authentication.jakarta-authentication-api>
<version.jakarta.authorization.jakarta-authorization-api>2.0.0</version.jakarta.authorization.jakarta-authorization-api>
<version.jakarta.batch.jakarta.batch-api>2.0.0</version.jakarta.batch.jakarta.batch-api>
Expand All @@ -63,7 +62,6 @@
<version.jakarta.jms.jakarta-jms-api>3.0.0</version.jakarta.jms.jakarta-jms-api>
<version.jakarta.json.bind.api>2.0.0</version.jakarta.json.bind.api>
<version.jakarta.json.jakarta-json-api>2.0.0</version.jakarta.json.jakarta-json-api>
<version.jakarta.mail>2.0.0</version.jakarta.mail>
<version.jakarta.persistence>3.0.0</version.jakarta.persistence>
<version.jakarta.resource.jakarta-resource-api>2.0.0</version.jakarta.resource.jakarta-resource-api>
<version.jakarta.security.enterprise>2.0.0</version.jakarta.security.enterprise>
Expand All @@ -76,14 +74,14 @@
<version.jakarta.xml.bind.jakarta-xml-bind-api>3.0.0</version.jakarta.xml.bind.jakarta-xml-bind-api>
<version.org.bouncycastle>1.69</version.org.bouncycastle>
<version.org.eclipse.yasson>2.0.1</version.org.eclipse.yasson>
<version.org.glassfish.jakarta.el>4.0.0</version.org.glassfish.jakarta.el>
<version.org.glassfish.jakarta.enterprise.concurrent>2.0.0</version.org.glassfish.jakarta.enterprise.concurrent>
<!-- WFLY-14723 For XJC we use a jbossorg variant in WF Preview. Use the version expression from the root
<!-- WFLY-14723 For XJC we use a jbossorg variant in WF Preview. Use the version expression from the root
pom here so we detect if the base version changes there and we didn't do a -jbossorg of that version -->
<version.org.glassfish.jaxb.jaxb-xjc>${version.sun.jaxb}-jbossorg-1</version.org.glassfish.jaxb.jaxb-xjc>
<version.org.apache.activemq.artemis>2.17.0</version.org.apache.activemq.artemis>
<version.org.jboss.spec.jakarta.el.jboss-el-api_4.0_spec>3.0.0</version.org.jboss.spec.jakarta.el.jboss-el-api_4.0_spec>
<version.org.jboss.spec.jakarta.ws.rs.jboss-jaxrs-api_3.0_spec>1.0.1.Final</version.org.jboss.spec.jakarta.ws.rs.jboss-jaxrs-api_3.0_spec>
<version.org.glassfish.jakarta.el>4.0.0</version.org.glassfish.jakarta.el>
<version.org.glassfish.jakarta.enterprise.concurrent>2.0.0</version.org.glassfish.jakarta.enterprise.concurrent>
<version.org.glassfish.jakarta.json>2.0.0</version.org.glassfish.jakarta.json>
<version.org.hibernate.validator>7.0.1.Final</version.org.hibernate.validator>
<version.org.jboss.activemq.artemis.integration>1.0.4</version.org.jboss.activemq.artemis.integration>
Expand Down Expand Up @@ -440,6 +438,10 @@
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-xjc</artifactId>
</exclusion>
<exclusion>
<groupId>${project.groupId}</groupId>
<artifactId>wildfly-mail</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -722,14 +724,7 @@
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>${version.jakarta.mail}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -978,6 +973,7 @@
<groupId>org.glassfish</groupId>
<artifactId>jakarta.enterprise.concurrent</artifactId>
<version>${version.org.glassfish.jakarta.enterprise.concurrent}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>jakarta.enterprise.concurrent</groupId>
Expand Down Expand Up @@ -1479,6 +1475,12 @@
</exclusions>
</dependency>

<dependency>
<groupId>${ee.maven.groupId}</groupId>
<artifactId>wildfly-mail-jakarta</artifactId>
<scope>provided</scope>
</dependency>

</dependencies>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,5 +462,16 @@
</license>
</licenses>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>wildfly-mail-jakarta</artifactId>
<licenses>
<license>
<name>GNU Lesser General Public License v2.1 or later</name>
<url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html</url>
<distribution>repo</distribution>
</license>
</licenses>
</dependency>
</dependencies>
</licenseSummary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2010, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<module xmlns="urn:jboss:module:1.9" name="org.jboss.as.mail">

<properties>
<property name="jboss.api" value="private"/>
</properties>

<resources>
<!-- TODO implement WFGP-206 or use maven-resource-plugin filtering to drive this
value with an expression so we can use one source file for both javax and jakarta variants
of this module -->
<artifact name="${org.wildfly:wildfly-mail-jakarta}"/>
</resources>

<dependencies>
<!--WFLY-14219 Remove deprecated <module name="javax.api"/> -->
<module name="javax.mail.api">
<imports>
<include path="META-INF"/>
</imports>
</module>
<module name="org.jboss.as.network"/>
<module name="org.jboss.as.naming"/>
<module name="org.jboss.staxmapper"/>
<module name="org.jboss.as.controller"/>
<module name="org.jboss.as.server"/>
<module name="org.jboss.as.ee"/>
<module name="org.jboss.jandex"/>
<module name="org.jboss.metadata.common"/>
<module name="org.jboss.modules"/>
<module name="org.jboss.msc"/>
<module name="org.jboss.logging"/>
<module name="org.wildfly.common"/>
<module name="org.wildfly.security.elytron-private"/>
<module name="java.xml"/>
</dependencies>
</module>
35 changes: 35 additions & 0 deletions ee-9/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,42 @@
<preview.dist.product.release.name>WildFly Preview</preview.dist.product.release.name>
<preview.dist.product.slot>${full.dist.product.slot}</preview.dist.product.slot>
<preview.dist.product.release.version>${full.dist.product.release.version}</preview.dist.product.release.version>

<!-- Version properties for dependency management items -->
<version.jakarta.mail>2.0.0</version.jakarta.mail>

</properties>

<dependencyManagement>
<dependencies>

<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>${version.jakarta.mail}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>${ee.maven.groupId}</groupId>
<artifactId>wildfly-mail-jakarta</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

</dependencies>
</dependencyManagement>

<profiles>
<profile>
<id>skip.preview</id>
Expand All @@ -52,6 +86,7 @@
</activation>

<modules>
<module>source-transform</module>
<module>build</module>
<module>deployment-transformer</module>
<module>dist</module>
Expand Down
111 changes: 111 additions & 0 deletions ee-9/source-transform/mail/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2021, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-ee-9-source-transform-parent</artifactId>
<!--
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
<version>25.0.0.Beta1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>wildfly-mail-jakarta</artifactId>

<name>WildFly: Mail subsystem (Jakarta Namespace)</name>

<packaging>jar</packaging>

<properties>
<transformer-input-dir>${project.basedir}/../../../mail</transformer-input-dir>
</properties>

<dependencies>

<!-- Jakarta-namespace specific deps -->

<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
</dependency>

<!-- Other deps consistent with the javax.* mail module -->

<dependency>
<groupId>org.wildfly.core</groupId>
<artifactId>wildfly-controller</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>wildfly-ee</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.core</groupId>
<artifactId>wildfly-server</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>wildfly-naming</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.core</groupId>
<artifactId>wildfly-network</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.core</groupId>
<artifactId>wildfly-subsystem-test</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-annotations</artifactId>
<!-- This is a compile-time dependency of this project, but is not needed at compile or runtime by other
projects that depend on this project.-->
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-processor</artifactId>
<!-- This is a compile-time dependency of this project, but is not needed at compile or runtime by other
projects that depend on this project.-->
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit 120db9a

Please sign in to comment.