This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-email.git
commit a258c7f116155d14ff1f662a43c4b4ca87452b27 Author: Gary Gregory <[email protected]> AuthorDate: Mon Dec 25 19:39:33 2023 -0500 Add module for src and bin distributions --- commons-email2-distribution/pom.xml | 211 +++++++++++++++++++++++ commons-email2-distribution/src/assembly/bin.xml | 47 +++++ commons-email2-distribution/src/assembly/src.xml | 71 ++++++++ pom.xml | 36 ++-- 4 files changed, 340 insertions(+), 25 deletions(-) diff --git a/commons-email2-distribution/pom.xml b/commons-email2-distribution/pom.xml new file mode 100644 index 0000000..a6c7d8f --- /dev/null +++ b/commons-email2-distribution/pom.xml @@ -0,0 +1,211 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> +<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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <name>Apache Commons Email Distribution</name> + <artifactId>commons-email2-distribution</artifactId> + <packaging>pom</packaging> + <description>Apache Commons Email Distribution archives.</description> + + <parent> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-parent</artifactId> + <version>2.0.0-M1-SNAPSHOT</version> + <relativePath>../</relativePath> + </parent> + + <properties> + <!-- dist module contains no code and no checkstyle config --> + <checkstyle.skip>true</checkstyle.skip> + <commons.parent.dir>${basedir}/..</commons.parent.dir> + <commons.release.isDistModule>true</commons.release.isDistModule> + </properties> + + <build> + <resources> + <resource> + <directory>${basedir}/src/main/resources</directory> + </resource> + <!-- include NOTICE/LICENSE in generated jar --> + <resource> + <directory>${commons.parent.dir}</directory> + <targetPath>META-INF</targetPath> + <includes> + <include>NOTICE.txt</include> + <include>LICENSE.txt</include> + </includes> + </resource> + </resources> + + <testResources> + <testResource> + <directory>src/test/resources</directory> + </testResource> + <!-- include NOTICE/LICENSE in generated test jar --> + <testResource> + <directory>${commons.parent.dir}</directory> + <targetPath>META-INF</targetPath> + <includes> + <include>NOTICE.txt</include> + <include>LICENSE.txt</include> + </includes> + </testResource> + </testResources> + </build> + + <profiles> + <profile> + <id>release</id> + <dependencies> + <!-- commons-email2-core --> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-core</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-core</artifactId> + <version>${project.version}</version> + <classifier>sources</classifier> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-core</artifactId> + <version>${project.version}</version> + <classifier>javadoc</classifier> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-core</artifactId> + <version>${project.version}</version> + <classifier>tests</classifier> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-core</artifactId> + <version>${project.version}</version> + <classifier>test-sources</classifier> + </dependency> + <!-- commons-email2-jakarta --> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-jakarta</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-jakarta</artifactId> + <version>${project.version}</version> + <classifier>sources</classifier> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-jakarta</artifactId> + <version>${project.version}</version> + <classifier>javadoc</classifier> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-jakarta</artifactId> + <version>${project.version}</version> + <classifier>tests</classifier> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-jakarta</artifactId> + <version>${project.version}</version> + <classifier>test-sources</classifier> + </dependency> + <!-- commons-email2-javax --> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-javax</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-javax</artifactId> + <version>${project.version}</version> + <classifier>sources</classifier> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-javax</artifactId> + <version>${project.version}</version> + <classifier>javadoc</classifier> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-javax</artifactId> + <version>${project.version}</version> + <classifier>tests</classifier> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-email2-javax</artifactId> + <version>${project.version}</version> + <classifier>test-sources</classifier> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <!-- As the main Apache POM only builds source zip archives but + commons wants both zip and tar.gz and because this is configured + in the assembly, we need to use a specific assembly. That also allows + naming the final artifact as -src not -source-release. + --> + <execution> + <id>email2-source-release-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <finalName>commons-email2-${project.version}</finalName> + <descriptors> + <descriptor>src/assembly/src.xml</descriptor> + </descriptors> + <tarLongFileMode>gnu</tarLongFileMode> + </configuration> + </execution> + <execution> + <id>binary</id> + <configuration> + <finalName>commons-email2-${project.version}</finalName> + <descriptors> + <descriptor>src/assembly/bin.xml</descriptor> + </descriptors> + <tarLongFileMode>gnu</tarLongFileMode> + </configuration> + <goals> + <goal>single</goal> + </goals> + <phase>package</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> +</project> diff --git a/commons-email2-distribution/src/assembly/bin.xml b/commons-email2-distribution/src/assembly/bin.xml new file mode 100644 index 0000000..8877519 --- /dev/null +++ b/commons-email2-distribution/src/assembly/bin.xml @@ -0,0 +1,47 @@ +<!-- + 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. +--> +<assembly> + <id>bin</id> + <formats> + <format>tar.gz</format> + <format>zip</format> + </formats> + <includeSiteDirectory>false</includeSiteDirectory> + + <dependencySets> + <dependencySet> + <includes> + <include>org.apache.commons:commons-email2-core</include> + <include>org.apache.commons:commons-email2-jakarta</include> + <include>org.apache.commons:commons-email2-javax</include> + </includes> + <useProjectArtifact>false</useProjectArtifact> + </dependencySet> + </dependencySets> + + <fileSets> + <fileSet> + <directory>..</directory> + <includes> + <include>LICENSE.txt</include> + <include>NOTICE.txt</include> + <include>RELEASE-NOTES.txt</include> + </includes> + </fileSet> + </fileSets> + +</assembly> diff --git a/commons-email2-distribution/src/assembly/src.xml b/commons-email2-distribution/src/assembly/src.xml new file mode 100644 index 0000000..1f7cb13 --- /dev/null +++ b/commons-email2-distribution/src/assembly/src.xml @@ -0,0 +1,71 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- + 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. +--> + +<assembly> + <id>src</id> + <formats> + <format>zip</format> + <format>tar.gz</format> + </formats> + <fileSets> + <!-- main project directory structure --> + <fileSet> + <directory>..</directory> + <useDefaultExcludes>true</useDefaultExcludes> + <excludes> + <!-- build output --> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude> + + <!-- NOTE: Most of the following excludes should not be required + if the standard release process is followed. This is because the + release plugin checks out project sources into a location like + target/checkout, then runs the build from there. The result is + a source-release archive that comes from a pretty clean directory + structure. + + HOWEVER, if the release plugin is configured to run extra goals + or generate a project website, it's definitely possible that some + of these files will be present. So, it's safer to exclude them. + --> + + <!-- IDEs --> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.idea(/.*)?]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude> + + <!-- misc --> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?doap_vfs\.rdf]</exclude> + + <!-- release-plugin temp files --> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude> + <exclude>**/*.log_IS_UNDEFINED</exclude> + </excludes> + </fileSet> + </fileSets> +</assembly> diff --git a/pom.xml b/pom.xml index 21e426b..5a99883 100644 --- a/pom.xml +++ b/pom.xml @@ -92,6 +92,16 @@ <defaultGoal>clean verify apache-rat:check checkstyle:check pmd:check pmd:cpd-check spotbugs:check javadoc:javadoc</defaultGoal> <pluginManagement> <plugins> + <plugin> + <groupId>org.apache.rat</groupId> + <artifactId>apache-rat-plugin</artifactId> + <configuration> + <excludes> + <exclude>src/test/resources/eml/**</exclude> + <exclude>src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker</exclude> + </excludes> + </configuration> + </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> @@ -144,12 +154,6 @@ <plugin> <groupId>org.apache.rat</groupId> <artifactId>apache-rat-plugin</artifactId> - <configuration> - <excludes> - <exclude>src/test/resources/eml/**</exclude> - <exclude>src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker</exclude> - </excludes> - </configuration> </plugin> <!-- Declaration place matters must be after gpg. --> <plugin> @@ -207,16 +211,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changes-plugin</artifactId> - <configuration> - <issueLinkTemplate>%URL%/%ISSUE%</issueLinkTemplate> - </configuration> - <reportSets> - <reportSet> - <reports> - <report>changes-report</report> - </reports> - </reportSet> - </reportSets> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -229,15 +223,6 @@ <targetJdk>${maven.compiler.target}</targetJdk> </configuration> </plugin> - <plugin> - <groupId>org.apache.rat</groupId> - <artifactId>apache-rat-plugin</artifactId> - <configuration> - <excludes> - <exclude>src/test/resources/eml/**</exclude> - </excludes> - </configuration> - </plugin> <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> @@ -250,6 +235,7 @@ <module>commons-email2-jakarta</module> <module>commons-email2-javax</module> <module>commons-email2-bom</module> + <module>commons-email2-distribution</module> </modules> <profiles>
