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

[MINSTALL-187] Switch to the Maven 4 API #35

Merged
merged 2 commits into from
Jun 24, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/maven-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ jobs:
name: Verify
uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v4
with:
maven4-enabled: true

ff-maven: "4.0.0-beta-3" # Maven version for fail-fast-build
maven-matrix: '[ "4.0.0-beta-3" ]'
jdk-matrix: '[ "17", "21" ]'
146 changes: 78 additions & 68 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</parent>

<artifactId>maven-install-plugin</artifactId>
<version>3.1.3-SNAPSHOT</version>
<version>4.0.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>

<name>Apache Maven Install Plugin</name>
Expand All @@ -46,7 +46,7 @@
</contributors>

<prerequisites>
<maven>3.6.3</maven>
<maven>${mavenVersion}</maven>
</prerequisites>

<scm>
Expand All @@ -71,134 +71,144 @@
</distributionManagement>

<properties>
<javaVersion>8</javaVersion>
<mavenVersion>3.9.6</mavenVersion>
<javaVersion>17</javaVersion>
<mavenVersion>4.0.0-beta-3</mavenVersion>
<!-- Maven bound -->
<resolverVersion>1.9.18</resolverVersion>
<!-- Maven bound -->
<slf4jVersion>1.7.36</slf4jVersion>
<slf4jVersion>2.0.13</slf4jVersion>

<!-- plugin versions used in IT tests -->
<mavenAntrunPluginVersion>${version.maven-antrun-plugin}</mavenAntrunPluginVersion>
<mavenCompilerPluginVersion>${version.maven-compiler-plugin}</mavenCompilerPluginVersion>
<mavenEnforcerPluginVersion>${version.maven-enforcer-plugin}</mavenEnforcerPluginVersion>
<mavenJarPluginVersion>${version.maven-jar-plugin}</mavenJarPluginVersion>
<mavenPluginPluginVersion>${version.maven-plugin-tools}</mavenPluginPluginVersion>
<mavenResourcesPluginVersion>${version.maven-resources-plugin}</mavenResourcesPluginVersion>
<mavenSourcePluginVersion>${version.maven-source-plugin}</mavenSourcePluginVersion>
<mavenSurefirePluginVersion>${version.maven-surefire}</mavenSurefirePluginVersion>
<guiceVersion>6.0.0</guiceVersion>
<junitVersion>5.10.2</junitVersion>
<mavenAntrunPluginVersion>3.1.0</mavenAntrunPluginVersion>
<mavenCompilerPluginVersion>3.10.1</mavenCompilerPluginVersion>
<mavenEnforcerPluginVersion>3.1.0</mavenEnforcerPluginVersion>
<mavenJarPluginVersion>3.3.0</mavenJarPluginVersion>
<mavenPluginPluginVersion>4.0.0-SNAPSHOT</mavenPluginPluginVersion>
<mavenPluginTestingVersion>4.0.0-alpha-3-SNAPSHOT</mavenPluginTestingVersion>
<mavenResourcesPluginVersion>3.3.0</mavenResourcesPluginVersion>
<mavenSourcePluginVersion>3.2.1</mavenSourcePluginVersion>
<mavenSurefirePluginVersion>3.2.2</mavenSurefirePluginVersion>
<mockitoVersion>5.12.0</mockitoVersion>
<version.plexus-xml>4.0.1</version.plexus-xml>
<version.maven-plugin-tools>${mavenPluginPluginVersion}</version.maven-plugin-tools>
<version.maven-invoker-plugin>3.7.0</version.maven-invoker-plugin>

<project.build.outputTimestamp>2024-04-26T10:23:20Z</project.build.outputTimestamp>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.0.1-jre</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<artifactId>maven-api-core</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<artifactId>maven-api-di</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<!-- This is here to override 3.0 coming with maven-artifact-transfer -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<artifactId>maven-api-meta</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<artifactId>maven-api-model</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-api</artifactId>
<version>${resolverVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-util</artifactId>
<version>${resolverVersion}</version>
<!-- To work in Maven versions older than 3.9.0 -->
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-xml</artifactId>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>${mavenPluginTestingVersion}</version>
<scope>test</scope>
</dependency>

<!-- dependencies to annotations -->
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<scope>provided</scope>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${mavenVersion}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-impl</artifactId>
<version>${mavenVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>3.3.0</version>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<!-- used by maven-plugin-testing-harness, don't give it compile scope! -->
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>${mavenVersion}</version>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>${guiceVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.8.1</version>
<version>${mockitoVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4jVersion}</version>
<scope>provided</scope>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-api</artifactId>
<version>2.0.0-alpha-11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4jVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-impl</artifactId>
<version>${resolverVersion}</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junitVersion}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<scope>none</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<configuration>
<proc>none</proc>
<showDeprecation>true</showDeprecation>
<java>
<includes>
<include>src/**/*.java</include>
</includes>
</java>
<pom>
<includes>
<include>**/pom.xml</include>
</includes>
</pom>
</configuration>
</plugin>
</plugins>
Expand Down
5 changes: 1 addition & 4 deletions src/it/MINSTALL-108/module1/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?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
Expand All @@ -10,9 +9,7 @@
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/xsd/maven-4.0.0.xsd">
<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>
Expand Down
17 changes: 6 additions & 11 deletions src/it/MINSTALL-108/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?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
Expand All @@ -18,19 +17,19 @@ 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/xsd/maven-4.0.0.xsd">
<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>

<groupId>org.apache.maven.its.install.iae.pass</groupId>
<artifactId>iae</artifactId>
<version>1.0</version>
<packaging>pom</packaging>

<description>
Tests installation at end override.
</description>
<description>Tests installation at end override.</description>

<modules>
<module>module1</module>
</modules>

<properties>
<maven.test.skip>true</maven.test.skip>
Expand Down Expand Up @@ -69,8 +68,4 @@ under the License.
</plugins>
</build>

<modules>
<module>module1</module>
</modules>

</project>
9 changes: 2 additions & 7 deletions src/it/MINSTALL-52/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?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
Expand All @@ -18,18 +17,14 @@ 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/xsd/maven-4.0.0.xsd">
<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>

<groupId>org.apache.maven.plugins.install.its</groupId>
<artifactId>minstall52</artifactId>
<version>1.0-SNAPSHOT</version>

<description>
Test to verify that the pom inside the jar in used when installing the file
</description>
<description>Test to verify that the pom inside the jar in used when installing the file</description>

<build>
<plugins>
Expand Down
47 changes: 22 additions & 25 deletions src/it/MINSTALL-98/module1/pom.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache.maven.its.minstall-98</groupId>
<artifactId>multithread</artifactId>
<version>1.0</version>
</parent>
<artifactId>module1</artifactId>

</project>
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache.maven.its.minstall-98</groupId>
<artifactId>multithread</artifactId>
<version>1.0</version>
</parent>
<artifactId>module1</artifactId>

</project>
Loading