Skip to content

Commit

Permalink
fix the build for maven 3.8.2
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <[email protected]>
  • Loading branch information
lukasj committed Sep 30, 2021
1 parent 1820e42 commit 83cdc95
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 23 deletions.
2 changes: 1 addition & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ may have restrictions on the import, possession, and use, and/or re-export to
another country, of encryption software. BEFORE using any encryption software,
please check the country's laws, regulations and policies concerning the import,
possession, or use, and re-export of encryption software, to see if this is
permitted.ed.
permitted.
68 changes: 46 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@
<impl_version>${project.version}</impl_version>
<new_impl_version>1.1.0</new_impl_version>
<non.final>false</non.final>
<legal.doc.source>${maven.multiModuleProjectDirectory}</legal.doc.source>
<config.dir>${project.root.location}/etc/config</config.dir>
<project.build.commonResourcesDirectory>${project.build.directory}/common-resources</project.build.commonResourcesDirectory>
<legal.doc.source>${project.build.commonResourcesDirectory}/legal</legal.doc.source>
<config.dir>${project.build.commonResourcesDirectory}/config</config.dir>
<copyright.exclude>${config.dir}/copyright-exclude</copyright.exclude>
<copyright.templatefile>${config.dir}/copyright.txt</copyright.templatefile>
<copyright.ignoreyear>false</copyright.ignoreyear>
Expand Down Expand Up @@ -127,21 +128,49 @@
</executions>
</plugin>
<plugin>
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId>
<executions>
<execution>
<id>find-project-root</id>
<phase>validate</phase>
<goals>
<goal>highest-basedir</goal>
</goals>
<configuration>
<property>project.root.location</property>
</configuration>
</execution>
</executions>
</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>${project.groupId}</groupId>
<artifactId>project</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,10 +251,6 @@
<resources>
<resource>
<directory>${legal.doc.source}</directory>
<includes>
<include>NOTICE.md</include>
<include>LICENSE.md</include>
</includes>
<targetPath>META-INF</targetPath>
</resource>
</resources>
Expand Down Expand Up @@ -488,7 +513,6 @@
<configuration>
<skip>${spotbugs.skip}</skip>
<threshold>${spotbugs.threshold}</threshold>
<findbugsXmlWithMessages>true</findbugsXmlWithMessages>
<excludeFilterFile>
${spotbugs.exclude}
</excludeFilterFile>
Expand Down
45 changes: 45 additions & 0 deletions src/main/assembly/resources.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?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 Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->

<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}/etc/config</directory>
<outputDirectory>config</outputDirectory>
<includes>
<include>*</include>
</includes>
</fileSet>
</fileSets>
</assembly>

0 comments on commit 83cdc95

Please sign in to comment.