Add maven4-build-vs-consumer-pom: Maven 4.0.0-rc-7 build POM vs consumer POM, lifecycle hooks, mvnup, mvnd
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4XrpfdpsacrvqnrBM
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
$ curl -s https://repo1.maven.org/maven2/org/apache/maven/apache-maven/maven-metadata.xml | grep -E "<(latest|release|lastUpdated)>"
|
||||
<latest>4.0.0-rc-7</latest>
|
||||
<release>4.0.0-rc-7</release>
|
||||
<lastUpdated>20261122115858</lastUpdated>
|
||||
|
||||
$ ... | grep -E "<version>(4\.0\.0-rc|3\.10)" (4.x release candidates and the newest 3.x line)
|
||||
<version>3.10.0-rc-1</version>
|
||||
<version>3.10.0</version>
|
||||
<version>3.10.1</version>
|
||||
<version>3.10.2</version>
|
||||
<version>4.0.0-rc-1</version>
|
||||
<version>4.0.0-rc-2</version>
|
||||
<version>4.0.0-rc-3</version>
|
||||
<version>4.0.0-rc-4</version>
|
||||
<version>4.0.0-rc-5</version>
|
||||
<version>4.0.0-rc-6</version>
|
||||
<version>4.0.0-rc-7</version>
|
||||
|
||||
$ mvn -v (Maven 4)
|
||||
Apache Maven 4.0.0-rc-7 (6d8f301b38af7399b36b862969d520974944f0b9)
|
||||
Maven home: <maven4>
|
||||
Java version: 25.0.5.1, vendor: Eclipse Adoptium, runtime: <jdk>
|
||||
Default locale: en_US, platform encoding: UTF-8, time zone: Asia/Calcutta
|
||||
OS name: "linux", version: "6.18.44-fc-v880", arch: "amd64", family: "unix"
|
||||
|
||||
$ mvn -v (Maven 3)
|
||||
Apache Maven 3.9.16 (2bdd9fddda4b155ebf8000e807eb73fd829a51d5)
|
||||
Maven home: <maven3>
|
||||
Java version: 25.0.5.1, vendor: Eclipse Adoptium, runtime: <jdk>
|
||||
@@ -0,0 +1,115 @@
|
||||
$ mvn install
|
||||
[INFO] Scanning for projects...
|
||||
[INFO] The packaging attribute of the 'm4-bom' project is configured as 'bom' and changed to 'pom'
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] Reactor Build Order:
|
||||
[INFO]
|
||||
[INFO] m4-demo [pom]
|
||||
[INFO] m4-bom [pom]
|
||||
[INFO] m4-lib [jar]
|
||||
[INFO] m4-app [jar]
|
||||
[INFO]
|
||||
[INFO] -----------------------< com.ankurm.m4:m4-demo >------------------------
|
||||
[INFO] Building m4-demo 1.0.0-SNAPSHOT [1/4]
|
||||
[INFO] from pom.xml
|
||||
[INFO] --------------------------------[ pom ]---------------------------------
|
||||
[INFO]
|
||||
[INFO] --- install:3.1.4:install (default-install) @ m4-demo ---
|
||||
[INFO] Installing <module>/reactor/pom.xml to <module>/.m2repo/com/ankurm/m4/m4-demo/1.0.0-SNAPSHOT/m4-demo-1.0.0-SNAPSHOT-build.pom
|
||||
[INFO] Installing <module>/reactor/target/consumer-1116901588741584337.pom to <module>/.m2repo/com/ankurm/m4/m4-demo/1.0.0-SNAPSHOT/m4-demo-1.0.0-SNAPSHOT.pom
|
||||
[INFO]
|
||||
[INFO] ------------------------< com.ankurm.m4:m4-bom >------------------------
|
||||
[INFO] Building m4-bom 1.0.0-SNAPSHOT [2/4]
|
||||
[INFO] from bom/pom.xml
|
||||
[INFO] --------------------------------[ pom ]---------------------------------
|
||||
[INFO]
|
||||
[INFO] --- install:3.1.4:install (default-install) @ m4-bom ---
|
||||
[INFO] Installing <module>/reactor/bom/pom.xml to <module>/.m2repo/com/ankurm/m4/m4-bom/1.0.0-SNAPSHOT/m4-bom-1.0.0-SNAPSHOT-build.pom
|
||||
[INFO] Installing <module>/reactor/bom/target/consumer-16063290251144019470.pom to <module>/.m2repo/com/ankurm/m4/m4-bom/1.0.0-SNAPSHOT/m4-bom-1.0.0-SNAPSHOT.pom
|
||||
[INFO]
|
||||
[INFO] ------------------------< com.ankurm.m4:m4-lib >------------------------
|
||||
[INFO] Building m4-lib 1.0.0-SNAPSHOT [3/4]
|
||||
[INFO] from lib/pom.xml
|
||||
[INFO] --------------------------------[ jar ]---------------------------------
|
||||
[INFO]
|
||||
[INFO] --- resources:3.3.1:resources (default-resources) @ m4-lib ---
|
||||
[INFO] skip non existing resourceDirectory <module>/reactor/lib/src/main/resources
|
||||
[INFO] skip non existing resourceDirectory <module>/reactor/lib/src/main/resources-filtered
|
||||
[INFO]
|
||||
[INFO] --- compiler:3.14.1:compile (default-compile) @ m4-lib ---
|
||||
[INFO] Recompiling the module because of changed source code.
|
||||
[INFO] Compiling 1 source file with javac [debug release 21] to target/classes
|
||||
[INFO]
|
||||
[INFO] --- resources:3.3.1:testResources (default-testResources) @ m4-lib ---
|
||||
[INFO] skip non existing resourceDirectory <module>/reactor/lib/src/test/resources
|
||||
[INFO] skip non existing resourceDirectory <module>/reactor/lib/src/test/resources-filtered
|
||||
[INFO]
|
||||
[INFO] --- compiler:3.14.1:testCompile (default-testCompile) @ m4-lib ---
|
||||
[INFO] Recompiling the module because of changed dependency.
|
||||
[INFO] Compiling 1 source file with javac [debug release 21] to target/test-classes
|
||||
[INFO]
|
||||
[INFO] --- surefire:3.5.4:test (default-test) @ m4-lib ---
|
||||
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
|
||||
[INFO]
|
||||
[INFO] -------------------------------------------------------
|
||||
[INFO] T E S T S
|
||||
[INFO] -------------------------------------------------------
|
||||
[WARNING] [stderr] Picked up JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42639 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
[WARNING] [stderr] Picked up _JAVA_OPTIONS: -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_base64_encodeBlock,_base64_decodeBlock
|
||||
[INFO] Running com.ankurm.m4.GreeterTest
|
||||
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.179 s -- in com.ankurm.m4.GreeterTest
|
||||
[INFO]
|
||||
[INFO] Results:
|
||||
[INFO]
|
||||
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
|
||||
[INFO]
|
||||
[INFO]
|
||||
[INFO] --- jar:3.4.2:jar (default-jar) @ m4-lib ---
|
||||
[INFO] Building jar: <module>/reactor/lib/target/m4-lib-1.0.0-SNAPSHOT.jar
|
||||
[INFO]
|
||||
[INFO] --- install:3.1.4:install (default-install) @ m4-lib ---
|
||||
[INFO] Installing <module>/reactor/lib/target/m4-lib-1.0.0-SNAPSHOT.jar to <module>/.m2repo/com/ankurm/m4/m4-lib/1.0.0-SNAPSHOT/m4-lib-1.0.0-SNAPSHOT.jar
|
||||
[INFO] Installing <module>/reactor/lib/pom.xml to <module>/.m2repo/com/ankurm/m4/m4-lib/1.0.0-SNAPSHOT/m4-lib-1.0.0-SNAPSHOT-build.pom
|
||||
[INFO] Installing <module>/reactor/lib/target/consumer-2827804096093025405.pom to <module>/.m2repo/com/ankurm/m4/m4-lib/1.0.0-SNAPSHOT/m4-lib-1.0.0-SNAPSHOT.pom
|
||||
[INFO]
|
||||
[INFO] ------------------------< com.ankurm.m4:m4-app >------------------------
|
||||
[INFO] Building m4-app 1.0.0-SNAPSHOT [4/4]
|
||||
[INFO] from app/pom.xml
|
||||
[INFO] --------------------------------[ jar ]---------------------------------
|
||||
[INFO]
|
||||
[INFO] --- resources:3.3.1:resources (default-resources) @ m4-app ---
|
||||
[INFO] skip non existing resourceDirectory <module>/reactor/app/src/main/resources
|
||||
[INFO] skip non existing resourceDirectory <module>/reactor/app/src/main/resources-filtered
|
||||
[INFO]
|
||||
[INFO] --- compiler:3.14.1:compile (default-compile) @ m4-app ---
|
||||
[INFO] Recompiling the module because of changed dependency.
|
||||
[INFO] Compiling 1 source file with javac [debug release 21] to target/classes
|
||||
[INFO]
|
||||
[INFO] --- resources:3.3.1:testResources (default-testResources) @ m4-app ---
|
||||
[INFO] skip non existing resourceDirectory <module>/reactor/app/src/test/resources
|
||||
[INFO] skip non existing resourceDirectory <module>/reactor/app/src/test/resources-filtered
|
||||
[INFO]
|
||||
[INFO] --- compiler:3.14.1:testCompile (default-testCompile) @ m4-app ---
|
||||
[INFO] No sources to compile
|
||||
[INFO]
|
||||
[INFO] --- surefire:3.5.4:test (default-test) @ m4-app ---
|
||||
[INFO] No tests to run.
|
||||
[INFO]
|
||||
[INFO] --- jar:3.4.2:jar (default-jar) @ m4-app ---
|
||||
[INFO] Building jar: <module>/reactor/app/target/m4-app-1.0.0-SNAPSHOT.jar
|
||||
[INFO]
|
||||
[INFO] --- install:3.1.4:install (default-install) @ m4-app ---
|
||||
[INFO] Installing <module>/reactor/app/target/m4-app-1.0.0-SNAPSHOT.jar to <module>/.m2repo/com/ankurm/m4/m4-app/1.0.0-SNAPSHOT/m4-app-1.0.0-SNAPSHOT.jar
|
||||
[INFO] Installing <module>/reactor/app/pom.xml to <module>/.m2repo/com/ankurm/m4/m4-app/1.0.0-SNAPSHOT/m4-app-1.0.0-SNAPSHOT-build.pom
|
||||
[INFO] Installing <module>/reactor/app/target/consumer-10425969277783569583.pom to <module>/.m2repo/com/ankurm/m4/m4-app/1.0.0-SNAPSHOT/m4-app-1.0.0-SNAPSHOT.pom
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] Reactor Summary for m4-demo 1.0.0-SNAPSHOT:
|
||||
[INFO]
|
||||
[INFO] m4-demo ............................................ SUCCESS [ x.xxx s]
|
||||
[INFO] m4-bom ............................................. SUCCESS [ x.xxx s]
|
||||
[INFO] m4-lib ............................................. SUCCESS [ x.xxx s]
|
||||
[INFO] m4-app ............................................. SUCCESS [ x.xxx s]
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] BUILD SUCCESS
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
@@ -0,0 +1,49 @@
|
||||
$ ls m4-lib/1.0.0-SNAPSHOT
|
||||
_remote.repositories
|
||||
m4-lib-1.0.0-SNAPSHOT-build.pom
|
||||
m4-lib-1.0.0-SNAPSHOT.jar
|
||||
m4-lib-1.0.0-SNAPSHOT.pom
|
||||
maven-metadata-local.xml
|
||||
|
||||
$ diff -u m4-lib-1.0.0-SNAPSHOT-build.pom m4-lib-1.0.0-SNAPSHOT.pom
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
-<project xmlns="http://maven.apache.org/POM/4.1.0">
|
||||
- <modelVersion>4.1.0</modelVersion>
|
||||
-
|
||||
- <parent/>
|
||||
-
|
||||
+<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
+ <modelVersion>4.0.0</modelVersion>
|
||||
+ <parent>
|
||||
+ <groupId>com.ankurm.m4</groupId>
|
||||
+ <artifactId>m4-demo</artifactId>
|
||||
+ <version>1.0.0-SNAPSHOT</version>
|
||||
+ </parent>
|
||||
<artifactId>m4-lib</artifactId>
|
||||
- <packaging>jar</packaging>
|
||||
-
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
@@ -26,18 +26,4 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
-
|
||||
- <build>
|
||||
- <!-- 4.1.0: <sources> replaces <sourceDirectory>/<testSourceDirectory> -->
|
||||
- <sources>
|
||||
- <source>
|
||||
- <scope>main</scope>
|
||||
- <directory>src/main/java</directory>
|
||||
- </source>
|
||||
- <source>
|
||||
- <scope>test</scope>
|
||||
- <directory>src/test/java</directory>
|
||||
- </source>
|
||||
- </sources>
|
||||
- </build>
|
||||
-</project>
|
||||
+</project>
|
||||
\ No newline at end of file
|
||||
@@ -0,0 +1,77 @@
|
||||
$ cat m4-app-1.0.0-SNAPSHOT.pom (consumer POM)
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.ankurm.m4</groupId>
|
||||
<artifactId>m4-demo</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>m4-app</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.ankurm.m4</groupId>
|
||||
<artifactId>m4-lib</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
$ cat m4-bom-1.0.0-SNAPSHOT.pom (consumer POM of the bom-packaged subproject)
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.ankurm.m4</groupId>
|
||||
<artifactId>m4-bom</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.ankurm.m4</groupId>
|
||||
<artifactId>m4-lib</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</project>
|
||||
|
||||
$ cat m4-demo-1.0.0-SNAPSHOT.pom (consumer POM of the root: properties and pluginManagement are still there)
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.ankurm.m4</groupId>
|
||||
<artifactId>m4-demo</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<properties>
|
||||
<maven.compiler.release>21</maven.compiler.release>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.14.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.5.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.4.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>3.1.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.3.1</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,18 @@
|
||||
$ mvn package (Maven 3.9.16, same reactor)
|
||||
[INFO] Scanning for projects...
|
||||
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
|
||||
[ERROR] Malformed POM <module>/reactor/pom.xml: Unknown attribute 'root' for tag 'project' (position: START_TAG seen ...->\n<project xmlns="http://maven.apache.org/POM/4.1.0" root="true">... @3:64) @ <module>/reactor/pom.xml, line 3, column 64
|
||||
[FATAL] 'modelVersion' of '4.1.0' is newer than the versions supported by this version of Maven: [4.0.0]. Building this project requires a newer version of Maven. @ line 4, column 17
|
||||
@
|
||||
[ERROR] The build could not read 1 project -> [Help 1]
|
||||
[ERROR]
|
||||
[ERROR] The project com.ankurm.m4:m4-demo:${revision} (<module>/reactor/pom.xml) has 2 errors
|
||||
[ERROR] Malformed POM <module>/reactor/pom.xml: Unknown attribute 'root' for tag 'project' (position: START_TAG seen ...->\n<project xmlns="http://maven.apache.org/POM/4.1.0" root="true">... @3:64) @ <module>/reactor/pom.xml, line 3, column 64 -> [Help 2]
|
||||
[ERROR] 'modelVersion' of '4.1.0' is newer than the versions supported by this version of Maven: [4.0.0]. Building this project requires a newer version of Maven. @ line 4, column 17
|
||||
[ERROR]
|
||||
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
|
||||
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
|
||||
[ERROR]
|
||||
[ERROR] For more information about the errors and possible solutions, please read the following articles:
|
||||
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
|
||||
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException
|
||||
@@ -0,0 +1,12 @@
|
||||
$ mvn dependency:tree (Maven 3.9.16, model 4.0.0 project, depends on m4-app)
|
||||
[INFO] ---------------------< com.ankurm.m3:m3-consumer >----------------------
|
||||
[INFO] --- compiler:3.15.0:compile (default-compile) @ m3-consumer ---
|
||||
[INFO] --- dependency:3.7.0:tree (default-cli) @ m3-consumer ---
|
||||
[INFO] com.ankurm.m3:m3-consumer:jar:1.0.0
|
||||
[INFO] \- com.ankurm.m4:m4-app:jar:1.0.0-SNAPSHOT:compile
|
||||
[INFO] \- com.ankurm.m4:m4-lib:jar:1.0.0-SNAPSHOT:compile
|
||||
[INFO] \- org.slf4j:slf4j-api:jar:2.0.17:compile
|
||||
[INFO] BUILD SUCCESS
|
||||
|
||||
$ java -cp target/classes:... demo.UsesLib
|
||||
Hello, a Maven 3 consumer (built with Maven 4)
|
||||
@@ -0,0 +1,31 @@
|
||||
$ mvn install -Dmaven.consumer.pom.flatten=true (separate local repository)
|
||||
[INFO] Reactor Summary for m4-demo 1.0.0-SNAPSHOT:
|
||||
[INFO] m4-demo ............................................ SUCCESS [ x.xxx s]
|
||||
[INFO] m4-bom ............................................. SUCCESS [ x.xxx s]
|
||||
[INFO] m4-lib ............................................. SUCCESS [ x.xxx s]
|
||||
[INFO] m4-app ............................................. SUCCESS [ x.xxx s]
|
||||
[INFO] BUILD SUCCESS
|
||||
|
||||
$ cat m4-lib-1.0.0-SNAPSHOT.pom (flattened consumer POM)
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.ankurm.m4</groupId>
|
||||
<artifactId>m4-lib</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>2.0.17</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
$ ls m4-lib/1.0.0-SNAPSHOT (flattened)
|
||||
_remote.repositories
|
||||
m4-lib-1.0.0-SNAPSHOT-build.pom
|
||||
m4-lib-1.0.0-SNAPSHOT.jar
|
||||
m4-lib-1.0.0-SNAPSHOT.pom
|
||||
maven-metadata-local.xml
|
||||
@@ -0,0 +1,22 @@
|
||||
$ mvn package (Maven 4)
|
||||
[INFO] --- resources:3.3.1:resources (default-resources) @ lifecycle-demo ---
|
||||
[INFO] --- antrun:3.2.0:run (before-compile) @ lifecycle-demo ---
|
||||
[WARNING] [echo] HOOK before:compile
|
||||
[INFO] --- compiler:3.14.1:compile (default-compile) @ lifecycle-demo ---
|
||||
[INFO] --- antrun:3.2.0:run (after-compile) @ lifecycle-demo ---
|
||||
[WARNING] [echo] HOOK after:compile
|
||||
[INFO] --- resources:3.3.1:testResources (default-testResources) @ lifecycle-demo ---
|
||||
[INFO] --- compiler:3.14.1:testCompile (default-testCompile) @ lifecycle-demo ---
|
||||
[INFO] --- surefire:3.5.4:test (default-test) @ lifecycle-demo ---
|
||||
[INFO] --- antrun:3.2.0:run (before-package-first) @ lifecycle-demo ---
|
||||
[WARNING] [echo] HOOK before:package[100]
|
||||
[INFO] --- antrun:3.2.0:run (before-package-second) @ lifecycle-demo ---
|
||||
[WARNING] [echo] HOOK before:package[200]
|
||||
[INFO] --- jar:3.4.2:jar (default-jar) @ lifecycle-demo ---
|
||||
[INFO] BUILD SUCCESS
|
||||
|
||||
$ mvn clean (Maven 4)
|
||||
[INFO] --- clean:3.5.0:clean (default-clean) @ lifecycle-demo ---
|
||||
[INFO] --- antrun:3.2.0:run (after-clean) @ lifecycle-demo ---
|
||||
[WARNING] [echo] HOOK after:clean
|
||||
[INFO] BUILD SUCCESS
|
||||
@@ -0,0 +1,18 @@
|
||||
$ mvn package (Maven 3.9.16, same POM)
|
||||
[INFO] Scanning for projects...
|
||||
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
|
||||
[ERROR] Malformed POM <module>/lifecycle/pom.xml: Unknown attribute 'root' for tag 'project' (position: START_TAG seen ...->\n<project xmlns="http://maven.apache.org/POM/4.1.0" root="true">... @3:64) @ <module>/lifecycle/pom.xml, line 3, column 64
|
||||
[FATAL] 'modelVersion' of '4.1.0' is newer than the versions supported by this version of Maven: [4.0.0]. Building this project requires a newer version of Maven. @ line 4, column 17
|
||||
@
|
||||
[ERROR] The build could not read 1 project -> [Help 1]
|
||||
[ERROR]
|
||||
[ERROR] The project com.ankurm.m4:lifecycle-demo:1.0.0 (<module>/lifecycle/pom.xml) has 2 errors
|
||||
[ERROR] Malformed POM <module>/lifecycle/pom.xml: Unknown attribute 'root' for tag 'project' (position: START_TAG seen ...->\n<project xmlns="http://maven.apache.org/POM/4.1.0" root="true">... @3:64) @ <module>/lifecycle/pom.xml, line 3, column 64 -> [Help 2]
|
||||
[ERROR] 'modelVersion' of '4.1.0' is newer than the versions supported by this version of Maven: [4.0.0]. Building this project requires a newer version of Maven. @ line 4, column 17
|
||||
[ERROR]
|
||||
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
|
||||
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
|
||||
[ERROR]
|
||||
[ERROR] For more information about the errors and possible solutions, please read the following articles:
|
||||
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
|
||||
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException
|
||||
@@ -0,0 +1,22 @@
|
||||
$ mvn package (Maven 4, untouched Maven 3 style project)
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] ------------------< com.ankurm.legacy:legacy-parent >-------------------
|
||||
[INFO] --------------------------------[ pom ]---------------------------------
|
||||
[INFO] -------------------< com.ankurm.legacy:legacy-core >--------------------
|
||||
[INFO] --------------------------------[ jar ]---------------------------------
|
||||
[WARNING] Version not locked for default bindings plugins [maven-resources-plugin, maven-compiler-plugin, maven-surefire-plugin, maven-jar-plugin], you should define versions in pluginManagement section of your pom.xml or parent
|
||||
[INFO] --- resources:3.5.0:resources (default-resources) @ legacy-core ---
|
||||
[INFO] --- compiler:3.16.0:compile (default-compile) @ legacy-core ---
|
||||
[INFO] Compiling 1 source file with javac [debug target 17] to target/classes
|
||||
[WARNING] location of system modules is not set in conjunction with -source 17
|
||||
not setting the location of system modules may lead to class files that cannot run on JDK 17
|
||||
--release 17 is recommended instead of -source 17 -target 17 because it sets the location of system modules automatically
|
||||
[INFO] --- resources:3.5.0:testResources (default-testResources) @ legacy-core ---
|
||||
[INFO] --- compiler:3.16.0:testCompile (default-testCompile) @ legacy-core ---
|
||||
[INFO] --- surefire:3.6.0:test (default-test) @ legacy-core ---
|
||||
[INFO] --- jar:3.5.1:jar (default-jar) @ legacy-core ---
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] BUILD SUCCESS
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
@@ -0,0 +1,11 @@
|
||||
$ mvn -fos WARN package (Maven 4: fail the build on any WARN)
|
||||
[INFO] Enabled to break the build on log level WARN.
|
||||
[WARNING] Version not locked for default bindings plugins [maven-resources-plugin, maven-compiler-plugin, maven-surefire-plugin, maven-jar-plugin], you should define versions in pluginManagement section of your pom.xml or parent
|
||||
[INFO] Reactor Summary for legacy-parent 1.0.0-SNAPSHOT:
|
||||
[INFO] legacy-parent ...................................... SUCCESS [ x.xxx s]
|
||||
[INFO] legacy-core ........................................ SUCCESS [ x.xxx s]
|
||||
[ERROR] BUILD FAILURE
|
||||
[ERROR] Build failed due to log statements with a higher severity than allowed. Fix the logged issues or remove flag --fail-on-severity (-fos).
|
||||
[ERROR]
|
||||
[ERROR] To see the full stack trace of the errors, re-run Maven with the '-e' switch
|
||||
[ERROR] Re-run Maven using the '-X' switch to enable verbose output
|
||||
@@ -0,0 +1,173 @@
|
||||
$ mvnup check
|
||||
[INFO] Maven Upgrade Tool - Check
|
||||
[INFO]
|
||||
[INFO] Discovering POM files...
|
||||
[INFO] Found 2 POM file(s)
|
||||
[INFO]
|
||||
[INFO] Maven Upgrade Tool
|
||||
[INFO] Options:
|
||||
[INFO]
|
||||
[INFO] Executing 11 upgrade strategy(ies):
|
||||
[INFO] - Applying Maven inference optimizations
|
||||
[INFO] - Removing duplicate XML elements
|
||||
[INFO] - Applying Maven 4 compatibility fixes
|
||||
[INFO] - Deduplicating dependency and plugin declarations
|
||||
[INFO] - Injecting standalone Nashorn for antrun JavaScript compatibility
|
||||
[INFO] - Widening RequireMavenVersion ranges to allow Maven 4
|
||||
[INFO] - Adding binary file extension exclusions to resource filtering
|
||||
[INFO] - Adding maven-toolchains-plugin for JDK source level compatibility
|
||||
[INFO] - Upgrading HTTP repository URLs to HTTPS
|
||||
[INFO] - Fixing invalid Automatic-Module-Name manifest entries
|
||||
[INFO] - Upgrading Maven plugins to recommended versions
|
||||
[INFO]
|
||||
[INFO] === Applying Maven inference optimizations ===
|
||||
[INFO] Applying Maven inference optimizations
|
||||
[INFO] Computing artifacts for inference from 2 POM(s)...
|
||||
[INFO] Computed 2 unique artifact(s) for inference
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (current: 4.0.0)
|
||||
[INFO] ? No inference optimizations needed
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (current: 4.0.0)
|
||||
[INFO] ? No inference optimizations needed
|
||||
[INFO]
|
||||
[INFO] Applying Maven inference optimizations Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Removing duplicate XML elements ===
|
||||
[INFO] Removing duplicate XML elements
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for duplicate XML elements)
|
||||
[INFO] ? No duplicate XML elements found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for duplicate XML elements)
|
||||
[INFO] ? No duplicate XML elements found
|
||||
[INFO]
|
||||
[INFO] Removing duplicate XML elements Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Applying Maven 4 compatibility fixes ===
|
||||
[INFO] Applying Maven 4 compatibility fixes
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for Maven 4 compatibility issues)
|
||||
[INFO] ? No Maven 4 compatibility issues found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for Maven 4 compatibility issues)
|
||||
[INFO] ? No Maven 4 compatibility issues found
|
||||
[INFO]
|
||||
[INFO] Applying Maven 4 compatibility fixes Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Deduplicating dependency and plugin declarations ===
|
||||
[INFO] Deduplicating dependency and plugin declarations
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for duplicate declarations)
|
||||
[INFO] ? No duplicate declarations found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for duplicate declarations)
|
||||
[INFO] ? No duplicate declarations found
|
||||
[INFO]
|
||||
[INFO] Deduplicating dependency and plugin declarations Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Injecting standalone Nashorn for antrun JavaScript compatibility ===
|
||||
[INFO] Injecting standalone Nashorn for antrun JavaScript compatibility
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for antrun JavaScript usage)
|
||||
[INFO] ? No antrun JavaScript usage found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for antrun JavaScript usage)
|
||||
[INFO] ? No antrun JavaScript usage found
|
||||
[INFO]
|
||||
[INFO] Injecting standalone Nashorn for antrun JavaScript compatibility Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Widening RequireMavenVersion ranges to allow Maven 4 ===
|
||||
[INFO] Widening RequireMavenVersion ranges to allow Maven 4
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for RequireMavenVersion range restrictions)
|
||||
[INFO] ? No RequireMavenVersion range restrictions found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for RequireMavenVersion range restrictions)
|
||||
[INFO] ? No RequireMavenVersion range restrictions found
|
||||
[INFO]
|
||||
[INFO] Widening RequireMavenVersion ranges to allow Maven 4 Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Adding binary file extension exclusions to resource filtering ===
|
||||
[INFO] Adding binary file extension exclusions to resource filtering
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for resource filtering of binary files)
|
||||
[INFO] ? No resource filtering issues found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for resource filtering of binary files)
|
||||
[INFO] ? No resource filtering issues found
|
||||
[INFO]
|
||||
[INFO] Adding binary file extension exclusions to resource filtering Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Adding maven-toolchains-plugin for JDK source level compatibility ===
|
||||
[INFO] Adding maven-toolchains-plugin for JDK source level compatibility
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking JDK source level compatibility)
|
||||
[INFO] ? --source 17 is supported by all current JDKs
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking JDK source level compatibility)
|
||||
[INFO] ? --source 17 is supported by all current JDKs
|
||||
[INFO]
|
||||
[INFO] Adding maven-toolchains-plugin for JDK source level compatibility Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Upgrading HTTP repository URLs to HTTPS ===
|
||||
[INFO] Upgrading HTTP repository URLs to HTTPS
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for HTTP repository URLs)
|
||||
[INFO] ? No HTTP repository URLs found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for HTTP repository URLs)
|
||||
[INFO] ? No HTTP repository URLs found
|
||||
[INFO]
|
||||
[INFO] Upgrading HTTP repository URLs to HTTPS Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Fixing invalid Automatic-Module-Name manifest entries ===
|
||||
[INFO] Fixing invalid Automatic-Module-Name manifest entries
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking Automatic-Module-Name entries)
|
||||
[INFO] ? No invalid Automatic-Module-Name entries found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking Automatic-Module-Name entries)
|
||||
[INFO] ? No invalid Automatic-Module-Name entries found
|
||||
[INFO]
|
||||
[INFO] Fixing invalid Automatic-Module-Name manifest entries Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Upgrading Maven plugins to recommended versions ===
|
||||
[INFO] Upgrading Maven plugins to recommended versions
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for plugin upgrades)
|
||||
[INFO] ? No plugin upgrades needed
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for plugin upgrades)
|
||||
[INFO] ? No plugin upgrades needed
|
||||
[INFO]
|
||||
[INFO] Upgrading Maven plugins to recommended versions Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Overall Results ===
|
||||
[INFO] Total POMs processed: 2
|
||||
[INFO] No POMs required modifications
|
||||
[INFO]
|
||||
[INFO] Creating .mvn directory if needed to avoid root directory warnings...
|
||||
[INFO] ? .mvn directory already exists at <module>/.work/legacy-upgraded/.mvn
|
||||
@@ -0,0 +1,228 @@
|
||||
$ mvnup apply --all
|
||||
[INFO] Maven Upgrade Tool - Apply
|
||||
[INFO]
|
||||
[INFO] Discovering POM files...
|
||||
[INFO] Found 2 POM file(s)
|
||||
[INFO]
|
||||
[INFO] Maven Upgrade Tool
|
||||
[INFO] Options:
|
||||
[INFO] all: true (applying all available upgrades)
|
||||
[INFO]
|
||||
[INFO] Executing 13 upgrade strategy(ies):
|
||||
[INFO] - Upgrading POM model version
|
||||
[INFO] - Applying Maven inference optimizations
|
||||
[INFO] - Removing duplicate XML elements
|
||||
[INFO] - Applying Maven 4 compatibility fixes
|
||||
[INFO] - Migrating source configuration to <source> elements
|
||||
[INFO] - Deduplicating dependency and plugin declarations
|
||||
[INFO] - Injecting standalone Nashorn for antrun JavaScript compatibility
|
||||
[INFO] - Widening RequireMavenVersion ranges to allow Maven 4
|
||||
[INFO] - Adding binary file extension exclusions to resource filtering
|
||||
[INFO] - Adding maven-toolchains-plugin for JDK source level compatibility
|
||||
[INFO] - Upgrading HTTP repository URLs to HTTPS
|
||||
[INFO] - Fixing invalid Automatic-Module-Name manifest entries
|
||||
[INFO] - Upgrading Maven plugins to recommended versions
|
||||
[INFO]
|
||||
[INFO] === Upgrading POM model version ===
|
||||
[INFO] Upgrading POM model version
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (current: 4.0.0)
|
||||
[INFO] ? Upgrading from 4.0.0 to 4.1.0
|
||||
[INFO] ? Updated modelVersion to 4.1.0
|
||||
[INFO] ? Updated namespace to http://maven.apache.org/POM/4.1.0
|
||||
[INFO] ? Updated xsi:schemaLocation
|
||||
[INFO] ? Converted <modules> to <subprojects>
|
||||
[INFO] ? Converted 1 <module> elements to <subproject>
|
||||
[INFO] ? Model upgrade completed
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (current: 4.0.0)
|
||||
[INFO] ? Upgrading from 4.0.0 to 4.1.0
|
||||
[INFO] ? Updated modelVersion to 4.1.0
|
||||
[INFO] ? Updated namespace to http://maven.apache.org/POM/4.1.0
|
||||
[INFO] ? Updated xsi:schemaLocation
|
||||
[INFO] ? Model upgrade completed
|
||||
[INFO]
|
||||
[INFO] Upgrading POM model version Summary:
|
||||
[INFO] 2 POM(s) modified
|
||||
[INFO] 0 POM(s) needed no changes
|
||||
[INFO] ? Strategy completed successfully
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO] ? Modified: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Applying Maven inference optimizations ===
|
||||
[INFO] Applying Maven inference optimizations
|
||||
[INFO] Computing artifacts for inference from 2 POM(s)...
|
||||
[INFO] Computed 2 unique artifact(s) for inference
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (current: 4.1.0)
|
||||
[INFO] ? Removed: redundant subprojects list (matches direct children)
|
||||
[INFO] ? Removed: modelVersion element (can be inferred from namespace)
|
||||
[INFO] ? Full inference optimizations applied
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (current: 4.1.0)
|
||||
[INFO] ? Removed: parent groupId (child has no explicit groupId)
|
||||
[INFO] ? Removed: parent version (child has no explicit version)
|
||||
[INFO] ? Removed: parent artifactId (can be inferred from relativePath)
|
||||
[INFO] ? Removed: modelVersion element (can be inferred from namespace)
|
||||
[INFO] ? Full inference optimizations applied
|
||||
[INFO]
|
||||
[INFO] Applying Maven inference optimizations Summary:
|
||||
[INFO] 2 POM(s) modified
|
||||
[INFO] 0 POM(s) needed no changes
|
||||
[INFO] ? Strategy completed successfully
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO] ? Modified: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Removing duplicate XML elements ===
|
||||
[INFO] Removing duplicate XML elements
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for duplicate XML elements)
|
||||
[INFO] ? No duplicate XML elements found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for duplicate XML elements)
|
||||
[INFO] ? No duplicate XML elements found
|
||||
[INFO]
|
||||
[INFO] Removing duplicate XML elements Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Applying Maven 4 compatibility fixes ===
|
||||
[INFO] Applying Maven 4 compatibility fixes
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for Maven 4 compatibility issues)
|
||||
[INFO] ? No Maven 4 compatibility issues found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for Maven 4 compatibility issues)
|
||||
[INFO] ? No Maven 4 compatibility issues found
|
||||
[INFO]
|
||||
[INFO] Applying Maven 4 compatibility fixes Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Migrating source configuration to <source> elements ===
|
||||
[INFO] Migrating source configuration to <source> elements
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (current: 4.1.0)
|
||||
[INFO] ? Migrated properties: maven.compiler.source = maven.compiler.target = 17
|
||||
[INFO] ? Set targetVersion: 17
|
||||
[INFO] ? Source configuration migrated to <source> elements
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (current: 4.1.0)
|
||||
[INFO] ? No source configuration to migrate
|
||||
[INFO]
|
||||
[INFO] Migrating source configuration to <source> elements Summary:
|
||||
[INFO] 1 POM(s) modified
|
||||
[INFO] 1 POM(s) needed no changes
|
||||
[INFO] ? Strategy completed successfully
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO] ? Modified: 1 POMs
|
||||
[INFO]
|
||||
[INFO] === Deduplicating dependency and plugin declarations ===
|
||||
[INFO] Deduplicating dependency and plugin declarations
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for duplicate declarations)
|
||||
[INFO] ? No duplicate declarations found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for duplicate declarations)
|
||||
[INFO] ? No duplicate declarations found
|
||||
[INFO]
|
||||
[INFO] Deduplicating dependency and plugin declarations Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Injecting standalone Nashorn for antrun JavaScript compatibility ===
|
||||
[INFO] Injecting standalone Nashorn for antrun JavaScript compatibility
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for antrun JavaScript usage)
|
||||
[INFO] ? No antrun JavaScript usage found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for antrun JavaScript usage)
|
||||
[INFO] ? No antrun JavaScript usage found
|
||||
[INFO]
|
||||
[INFO] Injecting standalone Nashorn for antrun JavaScript compatibility Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Widening RequireMavenVersion ranges to allow Maven 4 ===
|
||||
[INFO] Widening RequireMavenVersion ranges to allow Maven 4
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for RequireMavenVersion range restrictions)
|
||||
[INFO] ? No RequireMavenVersion range restrictions found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for RequireMavenVersion range restrictions)
|
||||
[INFO] ? No RequireMavenVersion range restrictions found
|
||||
[INFO]
|
||||
[INFO] Widening RequireMavenVersion ranges to allow Maven 4 Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Adding binary file extension exclusions to resource filtering ===
|
||||
[INFO] Adding binary file extension exclusions to resource filtering
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for resource filtering of binary files)
|
||||
[INFO] ? No resource filtering issues found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for resource filtering of binary files)
|
||||
[INFO] ? No resource filtering issues found
|
||||
[INFO]
|
||||
[INFO] Adding binary file extension exclusions to resource filtering Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Adding maven-toolchains-plugin for JDK source level compatibility ===
|
||||
[INFO] Adding maven-toolchains-plugin for JDK source level compatibility
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking JDK source level compatibility)
|
||||
[INFO] ? --source 17 is supported by all current JDKs
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking JDK source level compatibility)
|
||||
[INFO] ? --source 17 is supported by all current JDKs
|
||||
[INFO]
|
||||
[INFO] Adding maven-toolchains-plugin for JDK source level compatibility Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Upgrading HTTP repository URLs to HTTPS ===
|
||||
[INFO] Upgrading HTTP repository URLs to HTTPS
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for HTTP repository URLs)
|
||||
[INFO] ? No HTTP repository URLs found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for HTTP repository URLs)
|
||||
[INFO] ? No HTTP repository URLs found
|
||||
[INFO]
|
||||
[INFO] Upgrading HTTP repository URLs to HTTPS Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Fixing invalid Automatic-Module-Name manifest entries ===
|
||||
[INFO] Fixing invalid Automatic-Module-Name manifest entries
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking Automatic-Module-Name entries)
|
||||
[INFO] ? No invalid Automatic-Module-Name entries found
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking Automatic-Module-Name entries)
|
||||
[INFO] ? No invalid Automatic-Module-Name entries found
|
||||
[INFO]
|
||||
[INFO] Fixing invalid Automatic-Module-Name manifest entries Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Upgrading Maven plugins to recommended versions ===
|
||||
[INFO] Upgrading Maven plugins to recommended versions
|
||||
[INFO] <module>/.work/legacy-upgraded/pom.xml (checking for plugin upgrades)
|
||||
[INFO] ? No plugin upgrades needed
|
||||
[INFO] <module>/.work/legacy-upgraded/core/pom.xml (checking for plugin upgrades)
|
||||
[INFO] ? No plugin upgrades needed
|
||||
[INFO]
|
||||
[INFO] Upgrading Maven plugins to recommended versions Summary:
|
||||
[INFO] 0 POM(s) modified
|
||||
[INFO] 2 POM(s) needed no changes
|
||||
[INFO] Strategy completed (no changes needed)
|
||||
[INFO] Processed: 2 POMs
|
||||
[INFO]
|
||||
[INFO] === Overall Results ===
|
||||
[INFO] Total POMs processed: 2
|
||||
[INFO] ? Total POMs modified: 2
|
||||
[INFO]
|
||||
[INFO] Creating .mvn directory if needed to avoid root directory warnings...
|
||||
[INFO] ? .mvn directory already exists at <module>/.work/legacy-upgraded/.mvn
|
||||
[INFO]
|
||||
[INFO] Saving modified POMs...
|
||||
[INFO] ? Saved: <module>/.work/legacy-upgraded/pom.xml
|
||||
[INFO] ? Saved: <module>/.work/legacy-upgraded/core/pom.xml
|
||||
[INFO] ? All modifications saved successfully
|
||||
@@ -0,0 +1,55 @@
|
||||
$ diff -u legacy-m3/pom.xml (before) .../pom.xml (after)
|
||||
@@ -1,9 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- A deliberately "Maven 3 style" project: model 4.0.0, <modules>, no plugin versions, ${pom.version}. -->
|
||||
-<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
+<project xmlns="http://maven.apache.org/POM/4.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
- <modelVersion>4.0.0</modelVersion>
|
||||
+ xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 https://maven.apache.org/xsd/maven-4.1.0.xsd">
|
||||
|
||||
<groupId>com.ankurm.legacy</groupId>
|
||||
<artifactId>legacy-parent</artifactId>
|
||||
@@ -11,13 +10,16 @@
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
- <maven.compiler.source>17</maven.compiler.source>
|
||||
- <maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<banner>legacy ${pom.version}</banner>
|
||||
</properties>
|
||||
|
||||
- <modules>
|
||||
- <module>core</module>
|
||||
- </modules>
|
||||
+ <build>
|
||||
+ <sources>
|
||||
+ <source>
|
||||
+ <targetVersion>17</targetVersion>
|
||||
+ </source>
|
||||
+ </sources>
|
||||
+
|
||||
+ </build>
|
||||
</project>
|
||||
|
||||
$ diff -u core/pom.xml
|
||||
@@ -1,14 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
-<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
+<project xmlns="http://maven.apache.org/POM/4.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
- <modelVersion>4.0.0</modelVersion>
|
||||
+ xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 https://maven.apache.org/xsd/maven-4.1.0.xsd">
|
||||
|
||||
<parent>
|
||||
- <groupId>com.ankurm.legacy</groupId>
|
||||
- <artifactId>legacy-parent</artifactId>
|
||||
- <version>1.0.0-SNAPSHOT</version>
|
||||
- </parent>
|
||||
+</parent>
|
||||
|
||||
<artifactId>legacy-core</artifactId>
|
||||
</project>
|
||||
@@ -0,0 +1,25 @@
|
||||
$ mvn package (Maven 4, after mvnup apply --all)
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] ------------------< com.ankurm.legacy:legacy-parent >-------------------
|
||||
[INFO] --------------------------------[ pom ]---------------------------------
|
||||
[INFO] -------------------< com.ankurm.legacy:legacy-core >--------------------
|
||||
[INFO] --------------------------------[ jar ]---------------------------------
|
||||
[WARNING] Version not locked for default bindings plugins [maven-resources-plugin, maven-compiler-plugin, maven-surefire-plugin, maven-jar-plugin], you should define versions in pluginManagement section of your pom.xml or parent
|
||||
[INFO] --- resources:3.5.0:resources (default-resources) @ legacy-core ---
|
||||
[INFO] --- compiler:3.16.0:compile (default-compile) @ legacy-core ---
|
||||
[INFO] Compiling 1 source file with javac [debug target 1.8] to target/classes
|
||||
[WARNING] bootstrap class path is not set in conjunction with -source 8
|
||||
not setting the bootstrap class path may lead to class files that cannot run on JDK 8
|
||||
--release 8 is recommended instead of -source 8 -target 1.8 because it sets the bootstrap class path automatically
|
||||
[WARNING] source value 8 is obsolete and will be removed in a future release
|
||||
[WARNING] target value 8 is obsolete and will be removed in a future release
|
||||
[WARNING] To suppress warnings about obsolete options, use -Xlint:-options.
|
||||
[INFO] --- resources:3.5.0:testResources (default-testResources) @ legacy-core ---
|
||||
[INFO] --- compiler:3.16.0:testCompile (default-testCompile) @ legacy-core ---
|
||||
[INFO] --- surefire:3.6.0:test (default-test) @ legacy-core ---
|
||||
[INFO] --- jar:3.5.1:jar (default-jar) @ legacy-core ---
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] BUILD SUCCESS
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
@@ -0,0 +1,24 @@
|
||||
$ mvnd --version
|
||||
Apache Maven Daemon (mvnd) 2.0.0-rc-3 linux-amd64 native client (f912362c18c9a75faf3e31a4e0e0b921206013b9)
|
||||
Apache Maven 4.0.0-rc-3 (3952d00ce65df6753b63a51e86b1f626c55a8df2)
|
||||
Maven home: <mvnd>/mvn
|
||||
Java version: 25.0.5.1, vendor: Eclipse Adoptium, runtime: <jdk>
|
||||
Default locale: en_US, platform encoding: UTF-8
|
||||
OS name: "linux", version: "6.18.44-fc-v880", arch: "amd64", family: "unix"
|
||||
|
||||
$ mvnd -o -DskipTests install (daemon starting)
|
||||
[INFO] Average project wall time: 1.00s
|
||||
[INFO] BUILD SUCCESS
|
||||
wall: 11.646 s
|
||||
|
||||
$ mvnd -o -DskipTests install (daemon already running)
|
||||
[INFO] Average project wall time: 0.75s
|
||||
[INFO] BUILD SUCCESS
|
||||
wall: 3.625 s
|
||||
Stopping 2 running daemons
|
||||
|
||||
$ mvn -o -DskipTests install (plain Maven 4.0.0-rc-7, new JVM each time)
|
||||
[INFO] BUILD SUCCESS
|
||||
wall: 8.670 s
|
||||
[INFO] BUILD SUCCESS
|
||||
wall: 13.017 s
|
||||
@@ -0,0 +1,84 @@
|
||||
$ mvnup --help
|
||||
|
||||
usage: mvnup [options] [<goal|phase> ...]
|
||||
|
||||
Options:
|
||||
-a,--all Apply all upgrades (equivalent to
|
||||
--model-version 4.1.0 --infer --model
|
||||
--plugins)
|
||||
-B,--batch-mode Run in non-interactive mode. Alias for
|
||||
--non-interactive (kept for backwards
|
||||
compatibility)
|
||||
--color <arg> Defines the color mode of the output.
|
||||
Supported are 'auto', 'always', 'never'.
|
||||
-D,--define <arg> Define a user property
|
||||
-d,--directory <path> Directory to use as starting point for
|
||||
POM discovery
|
||||
--debug Launch the JVM in debug mode (script
|
||||
option).
|
||||
-e,--errors Produce execution error messages
|
||||
--enc Launch the Maven Encryption tool (script
|
||||
option).
|
||||
--force-interactive Run in interactive mode. Overrides, if
|
||||
applicable, the CI environment variable
|
||||
and --non-interactive/--batch-mode
|
||||
options
|
||||
-fos,--fail-on-severity <arg> Configure which severity of logging
|
||||
should cause the build to fail
|
||||
-gs,--global-settings <arg> <deprecated> Alternate path for the
|
||||
global settings file.
|
||||
-gt,--global-toolchains <arg> <deprecated> Alternate path for the
|
||||
global toolchains file.
|
||||
-h,--help Display help information
|
||||
-i,--infer Use inference when upgrading (remove
|
||||
redundant information)
|
||||
-is,--install-settings <arg> Alternate path for the installation
|
||||
settings file
|
||||
-it,--install-toolchains <arg> Alternate path for the installation
|
||||
toolchains file
|
||||
-l,--log-file <arg> Log file where all build output will go
|
||||
(disables output color)
|
||||
-m,--model-version <version> Target POM model version (4.0.0 or
|
||||
4.1.0)
|
||||
-model,--model Fix Maven 4 compatibility issues in POM
|
||||
files
|
||||
--non-interactive Run in non-interactive mode. Alias for
|
||||
--batch-mode
|
||||
-o,--offline Work offline
|
||||
-plugins,--plugins Upgrade plugins known to fail with Maven
|
||||
4 to their minimum compatible versions
|
||||
-ps,--project-settings <arg> Alternate path for the project settings
|
||||
file
|
||||
-q,--quiet Quiet output - only show errors
|
||||
--raw-streams Do not decorate standard output and
|
||||
error streams
|
||||
-s,--settings <arg> Alternate path for the user settings
|
||||
file
|
||||
--shell Launch the Maven Shell tool (script
|
||||
option).
|
||||
-t,--toolchains <arg> Alternate path for the user toolchains
|
||||
file
|
||||
--up Launch the Maven Upgrade tool (script
|
||||
option).
|
||||
-v,--version Display version information
|
||||
-V,--show-version Display version information WITHOUT
|
||||
stopping build
|
||||
-X,--verbose Produce execution verbose output
|
||||
--yjp Launch the JVM with Yourkit profiler
|
||||
(script option).
|
||||
|
||||
Goals:
|
||||
help - display this help message
|
||||
check - check for available upgrades
|
||||
apply - apply available upgrades
|
||||
|
||||
Options:
|
||||
-m, --model-version <version> Target POM model version (4.0.0 or 4.1.0)
|
||||
-d, --directory <path> Directory to use as starting point for POM discovery
|
||||
-i, --infer Remove redundant information that can be inferred by Maven
|
||||
--model Fix Maven 4 compatibility issues in POM files
|
||||
--plugins Upgrade plugins known to fail with Maven 4
|
||||
-a, --all Apply all upgrades (equivalent to --model-version 4.1.0 --infer --model --plugins)
|
||||
|
||||
Default behavior: --model --plugins --infer are applied if no other options are specified
|
||||
|
||||
Reference in New Issue
Block a user