Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump parent to 74 and cleanups #465

Merged
merged 1 commit into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is the [license-maven-plugin](http://www.mojohaus.org/license-maven-plugin/).

[![Build Status](https://travis-ci.org/mojohaus/license-maven-plugin.svg?branch=master)](https://travis-ci.org/mojohaus/license-maven-plugin)
[![GitHub CI](https://github.com/mojohaus/license-maven-plugin/actions/workflows/maven.yml/badge.svg)](https://github.com/mojohaus/license-maven-plugin/actions/workflows/maven.yml)
[![Maven Central](https://img.shields.io/maven-central/v/org.codehaus.mojo/license-maven-plugin.svg?label=Maven%20Central)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.codehaus.mojo%22%20a%3A%license-maven-plugin%22)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mojohaus/license-maven-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![The GNU Lesser General Public License, Version 3.0](https://img.shields.io/badge/license-LGPL3-blue.svg)](http://www.gnu.org/licenses/lgpl-3.0.txt)
Expand Down
198 changes: 57 additions & 141 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.codehaus.mojo</groupId>
<artifactId>mojo-parent</artifactId>
<version>65</version>
<version>74</version>
</parent>

<artifactId>license-maven-plugin</artifactId>
Expand All @@ -37,12 +37,12 @@

<name>License Maven Plugin</name>
<description>Maven plugin to download and collect license files from project dependencies.</description>
<url>http://www.mojohaus.org/license-maven-plugin</url>
<url>https://www.mojohaus.org/license-maven-plugin</url>
<inceptionYear>2010</inceptionYear>
<licenses>
<license>
<name>The GNU Lesser General Public License, Version 3.0</name>
<url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
<url>https://www.gnu.org/licenses/lgpl-3.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
Expand Down Expand Up @@ -92,27 +92,22 @@
<scm>
<connection>scm:git:https://github.com/mojohaus/license-maven-plugin.git</connection>
<developerConnection>scm:git:ssh://git@github.com/mojohaus/license-maven-plugin.git</developerConnection>
<url>https://github.com/mojohaus/license-maven-plugin</url>
<url>https://github.com/mojohaus/license-maven-plugin/tree/master</url>
<tag>HEAD</tag>
</scm>
<issueManagement>
<system>github</system>
<url>https://github.com/mojohaus/license-maven-plugin/issues/</url>
</issueManagement>
<ciManagement>
<system>Travis CI</system>
<url>https://travis-ci.org/mojohaus/license-maven-plugin</url>
<system>github</system>
<url>https://github.com/mojohaus/license-maven-plugin/actions</url>
</ciManagement>
<distributionManagement>
<site>
<id>github</id>
<url>scm:git:git@github.com:mojohaus/license-maven-plugin.git</url>
</site>
</distributionManagement>

<properties>
<mavenVersion>3.5.4</mavenVersion>
<mojo.java.target>1.7</mojo.java.target>
<mojo.java.target>7</mojo.java.target>
<minimalJavaBuildVersion>1.7</minimalJavaBuildVersion>

<processorVersion>1.3</processorVersion>

Expand All @@ -130,19 +125,13 @@
<license.licenseName>lgpl_v3</license.licenseName>
<licensePluginVersion>1.14</licensePluginVersion>

<pluginPluginVersion>3.5.1</pluginPluginVersion>
<plexusComponentVersion>1.7.1</plexusComponentVersion>
<maven-resolver.version>1.3.3</maven-resolver.version>
<project.build.outputTimestamp>2022-01-18T09:14:02Z</project.build.outputTimestamp>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>${pluginPluginVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
Expand All @@ -165,11 +154,14 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand All @@ -180,24 +172,13 @@
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
<exclusions>

<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</exclusion>

</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -325,15 +306,6 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<configuration>
<!-- Temporary solution to get a release out using gpg version 1 -->
<useAgent>false</useAgent>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand All @@ -348,36 +320,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<quiet>true</quiet>
<tagletArtifacts>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-javadoc</artifactId>
<version>${pluginPluginVersion}</version>
</tagletArtifact>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-javadoc</artifactId>
<version>${plexusComponentVersion}</version>
</tagletArtifact>
</tagletArtifacts>
</configuration>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>${pluginPluginVersion}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<scriptVariables>
<projectVersion>${project.version}</projectVersion>
</scriptVariables>
<environmentVariables>
<MAVEN_OPTS>-Duser.country=US -Duser.language=en</MAVEN_OPTS>
</environmentVariables>
<doclint>none</doclint>
</configuration>
</plugin>
<plugin>
Expand All @@ -402,6 +345,8 @@
</execution>
</executions>
<configuration>
<!-- TODO enable with spotless -->
<skip>true</skip>
<headerLocation>config/checkstyle-header.txt</headerLocation>
<excludes>**/HelpMojo.java,**/SpdxLicenseListData.java</excludes><!-- these are generated -->
</configuration>
Expand Down Expand Up @@ -436,53 +381,6 @@
</executions>
</plugin>

<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<configuration>
<goalPrefix>license</goalPrefix>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>

<!--
To test reading third party data from an artifact, we need an artifact.
In the aggregate case, we can't depend on it in the reactor, since
there's no way to get any other reactor execution to create it
in the forked execution of aggregate-add-third-party, not unless
we want involved in a custom lifecycle. So this barnicle exists
so that the tests can use it. It's a pity it will end up on Central.
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>src/license-test/test.license.properties</file>
<type>license.properties</type>
<classifier>test-third-party</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
Expand Down Expand Up @@ -515,15 +413,40 @@
<profiles>
<profile>
<id>run-its</id>
<activation>
<property>
<name>skipITs</name>
<value>!true</value>
</property>
</activation>
<build>
<defaultGoal>verify</defaultGoal>
<plugins>
<!--
To test reading third party data from an artifact, we need an artifact.
In the aggregate case, we can't depend on it in the reactor, since
there's no way to get any other reactor execution to create it
in the forked execution of aggregate-add-third-party, not unless
we want involved in a custom lifecycle. So this barnicle exists
so that the tests can use it. It's a pity it will end up on Central.
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>src/license-test/test.license.properties</file>
<type>license.properties</type>
<classifier>test-third-party</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
Expand All @@ -545,7 +468,7 @@
</goals>
<phase>post-integration-test</phase>
<configuration>
<source>System.setProperty('LittleProxy.stop', 'true')</source>
<source>System.setProperty('LittleProxy.stop', 'true'); Thread.sleep(250)</source>
</configuration>
</execution>
</executions>
Expand All @@ -563,6 +486,12 @@
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<settingsFile>src/it/settings.xml</settingsFile>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<environmentVariables>
<MAVEN_OPTS>-Duser.country=US -Duser.language=en</MAVEN_OPTS>
</environmentVariables>
<scriptVariables>
<projectVersion>${project.version}</projectVersion>
</scriptVariables>
</configuration>
<executions>
<execution>
Expand All @@ -579,6 +508,9 @@
<pomExcludes>
<pomExclude>MLICENSE-4/pom.xml</pomExclude>
<pomExclude>download-licenses-proxy/pom.xml</pomExclude>
<!-- failed test on GH use remote resources -->
<pomExclude>download-licenses-basic/pom.xml</pomExclude>
<pomExclude>download-licenses-force/pom.xml</pomExclude>
</pomExcludes>
</configuration>
</execution>
Expand Down Expand Up @@ -651,9 +583,6 @@

<profile>
<id>mojo-release</id>
<properties>
<invoker.skip>true</invoker.skip>
</properties>
<build>
<plugins>
<plugin>
Expand All @@ -668,13 +597,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Expand All @@ -689,15 +611,10 @@

<reporting>
<plugins>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>2.0.0</version>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>1.13</version>
<version>2.0.0</version>
<reportSets>
<reportSet>
<reports>
Expand All @@ -706,7 +623,6 @@
</reportSet>
</reportSets>
</plugin>

</plugins>
</reporting>
</profile>
Expand Down
4 changes: 2 additions & 2 deletions src/it/ISSUE-197/postbuild.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ assert Files.exists(licensesXmlPath)
assert Files.exists(aslPath20)
assert Files.exists(aslPath11)

assert aslPath20.text.contains(' Version 2.0, January 2004')
assert aslPath11.text.contains('The Apache Software License, Version 1.1')
assert aslPath20.toFile().text.contains(' Version 2.0, January 2004')
assert aslPath11.toFile().text.contains('The Apache Software License, Version 1.1')
2 changes: 1 addition & 1 deletion src/it/ISSUE-197/prebuild.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import java.nio.file.Files;

Path basePath = basedir.toPath()

basePath.resolve('target').deleteDir()
basePath.resolve('target').toFile().deleteDir()

Path src = basePath.resolve('src/license/licenses.xml')
Path dest = basePath.resolve('target/generated-resources/licenses.xml')
Expand Down