Skip to content

Commit

Permalink
use resources the maven way (3.8.2)
Browse files Browse the repository at this point in the history
...to avoid depending on maven internals

Signed-off-by: Lukas Jungmann <[email protected]>
  • Loading branch information
lukasj committed Oct 1, 2021
1 parent cef99c3 commit c60c3d8
Show file tree
Hide file tree
Showing 8 changed files with 274 additions and 106 deletions.
28 changes: 0 additions & 28 deletions jaxb-ri/LICENSE.md

This file was deleted.

56 changes: 0 additions & 56 deletions jaxb-ri/License.html

This file was deleted.

61 changes: 54 additions & 7 deletions jaxb-ri/codemodel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@
</mailingLists>

<properties>
<copyright.exclude>tools/config/copyright-exclude</copyright.exclude>
<project.build.commonResourcesDirectory>${project.build.directory}/common-resources</project.build.commonResourcesDirectory>
<legal.doc.source>${project.build.commonResourcesDirectory}/legal</legal.doc.source>
<copyright.exclude>${project.build.commonResourcesDirectory}/config/copyright-exclude</copyright.exclude>
<copyright.ignoreyear>false</copyright.ignoreyear>
<copyright.scmonly>true</copyright.scmonly>
<copyright.template>tools/config/copyright.txt</copyright.template>
<copyright.template>${project.build.commonResourcesDirectory}/config/copyright.txt</copyright.template>
<copyright.update>false</copyright.update>
<spotbugs.exclude/>
<spotbugs.skip>false</spotbugs.skip>
Expand Down Expand Up @@ -130,6 +132,11 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
Expand Down Expand Up @@ -191,6 +198,50 @@
</rules>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>common-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>single</goal>
</goals>
<inherited>false</inherited>
<configuration>
<descriptors>
<descriptor>src/main/assembly/resources.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.sun.xml.bind.mvn</groupId>
<artifactId>jaxb-codemodel-parent</artifactId>
<version>${project.version}</version>
<classifier>resources</classifier>
<type>zip</type>
<outputDirectory>${project.build.commonResourcesDirectory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
Expand Down Expand Up @@ -222,12 +273,8 @@
<configuration>
<resources>
<resource>
<directory>${basedir}/../../../</directory>
<directory>${legal.doc.source}</directory>
<targetPath>META-INF</targetPath>
<includes>
<include>LICENSE.md</include>
<include>NOTICE.md</include>
</includes>
</resource>
</resources>
</configuration>
Expand Down
39 changes: 39 additions & 0 deletions jaxb-ri/codemodel/src/main/assembly/resources.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Distribution License v. 1.0, which is available at
http://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: BSD-3-Clause
-->

<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>resources</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.basedir}/../..</directory>
<outputDirectory>legal</outputDirectory>
<includes>
<include>LICENSE.md</include>
<include>NOTICE.md</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../tools/config</directory>
<outputDirectory>config</outputDirectory>
<includes>
<include>*</include>
</includes>
</fileSet>
</fileSets>
</assembly>
61 changes: 54 additions & 7 deletions jaxb-ri/external/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@
</mailingLists>

<properties>
<copyright.exclude>tools/config/copyright-exclude</copyright.exclude>
<project.build.commonResourcesDirectory>${project.build.directory}/common-resources</project.build.commonResourcesDirectory>
<legal.doc.source>${project.build.commonResourcesDirectory}/legal</legal.doc.source>
<copyright.exclude>${project.build.commonResourcesDirectory}/config/copyright-exclude</copyright.exclude>
<copyright.ignoreyear>false</copyright.ignoreyear>
<copyright.scmonly>true</copyright.scmonly>
<copyright.template>tools/config/copyright.txt</copyright.template>
<copyright.template>${project.build.commonResourcesDirectory}/config/copyright.txt</copyright.template>
<copyright.update>false</copyright.update>
<spotbugs.exclude/>
<spotbugs.skip>false</spotbugs.skip>
Expand Down Expand Up @@ -154,6 +156,11 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
Expand Down Expand Up @@ -215,6 +222,50 @@
</rules>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>common-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>single</goal>
</goals>
<inherited>false</inherited>
<configuration>
<descriptors>
<descriptor>src/main/assembly/resources.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.sun.xml.bind.mvn</groupId>
<artifactId>jaxb-external-parent</artifactId>
<version>${project.version}</version>
<classifier>resources</classifier>
<type>zip</type>
<outputDirectory>${project.build.commonResourcesDirectory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
Expand Down Expand Up @@ -246,12 +297,8 @@
<configuration>
<resources>
<resource>
<directory>${basedir}/../../../</directory>
<directory>${legal.doc.source}</directory>
<targetPath>META-INF</targetPath>
<includes>
<include>LICENSE.md</include>
<include>NOTICE.md</include>
</includes>
</resource>
</resources>
</configuration>
Expand Down
39 changes: 39 additions & 0 deletions jaxb-ri/external/src/main/assembly/resources.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Distribution License v. 1.0, which is available at
http://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: BSD-3-Clause
-->

<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>resources</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.basedir}/../..</directory>
<outputDirectory>legal</outputDirectory>
<includes>
<include>LICENSE.md</include>
<include>NOTICE.md</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../tools/config</directory>
<outputDirectory>config</outputDirectory>
<includes>
<include>*</include>
</includes>
</fileSet>
</fileSets>
</assembly>
Loading

0 comments on commit c60c3d8

Please sign in to comment.