Skip to content

Instantly share code, notes, and snippets.

@siddhsql
Created October 21, 2023 19:45
Show Gist options
  • Save siddhsql/5c86cafe335285bcc2337d2b08815d26 to your computer and use it in GitHub Desktop.
Save siddhsql/5c86cafe335285bcc2337d2b08815d26 to your computer and use it in GitHub Desktop.
maven sucks
» mvn -X exec:java -Dexec.mainClass=consumer/mycompany.consumer.App
Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
Maven home: /Library/Java/apache-maven-3.9.4
Java version: 20.0.2, vendor: Oracle Corporation, runtime: /Library/Java/jdk-20.0.2.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "13.5.2", arch: "aarch64", family: "mac"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG] Imported: javax.annotation.* < plexus.core
[DEBUG] Imported: javax.annotation.security.* < plexus.core
[DEBUG] Imported: javax.inject.* < plexus.core
[DEBUG] Imported: org.apache.maven.* < plexus.core
[DEBUG] Imported: org.apache.maven.artifact < plexus.core
[DEBUG] Imported: org.apache.maven.classrealm < plexus.core
[DEBUG] Imported: org.apache.maven.cli < plexus.core
[DEBUG] Imported: org.apache.maven.configuration < plexus.core
[DEBUG] Imported: org.apache.maven.exception < plexus.core
[DEBUG] Imported: org.apache.maven.execution < plexus.core
[DEBUG] Imported: org.apache.maven.execution.scope < plexus.core
[DEBUG] Imported: org.apache.maven.graph < plexus.core
[DEBUG] Imported: org.apache.maven.lifecycle < plexus.core
[DEBUG] Imported: org.apache.maven.model < plexus.core
[DEBUG] Imported: org.apache.maven.monitor < plexus.core
[DEBUG] Imported: org.apache.maven.plugin < plexus.core
[DEBUG] Imported: org.apache.maven.profiles < plexus.core
[DEBUG] Imported: org.apache.maven.project < plexus.core
[DEBUG] Imported: org.apache.maven.reporting < plexus.core
[DEBUG] Imported: org.apache.maven.repository < plexus.core
[DEBUG] Imported: org.apache.maven.rtinfo < plexus.core
[DEBUG] Imported: org.apache.maven.settings < plexus.core
[DEBUG] Imported: org.apache.maven.toolchain < plexus.core
[DEBUG] Imported: org.apache.maven.usability < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.* < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.authentication < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.authorization < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.events < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.observers < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.proxy < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.repository < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.resource < plexus.core
[DEBUG] Imported: org.codehaus.classworlds < plexus.core
[DEBUG] Imported: org.codehaus.plexus.* < plexus.core
[DEBUG] Imported: org.codehaus.plexus.classworlds < plexus.core
[DEBUG] Imported: org.codehaus.plexus.component < plexus.core
[DEBUG] Imported: org.codehaus.plexus.configuration < plexus.core
[DEBUG] Imported: org.codehaus.plexus.container < plexus.core
[DEBUG] Imported: org.codehaus.plexus.context < plexus.core
[DEBUG] Imported: org.codehaus.plexus.lifecycle < plexus.core
[DEBUG] Imported: org.codehaus.plexus.logging < plexus.core
[DEBUG] Imported: org.codehaus.plexus.personality < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
[DEBUG] Imported: org.eclipse.aether.* < plexus.core
[DEBUG] Imported: org.eclipse.aether.artifact < plexus.core
[DEBUG] Imported: org.eclipse.aether.collection < plexus.core
[DEBUG] Imported: org.eclipse.aether.deployment < plexus.core
[DEBUG] Imported: org.eclipse.aether.graph < plexus.core
[DEBUG] Imported: org.eclipse.aether.impl < plexus.core
[DEBUG] Imported: org.eclipse.aether.installation < plexus.core
[DEBUG] Imported: org.eclipse.aether.internal.impl < plexus.core
[DEBUG] Imported: org.eclipse.aether.metadata < plexus.core
[DEBUG] Imported: org.eclipse.aether.repository < plexus.core
[DEBUG] Imported: org.eclipse.aether.resolution < plexus.core
[DEBUG] Imported: org.eclipse.aether.spi < plexus.core
[DEBUG] Imported: org.eclipse.aether.transfer < plexus.core
[DEBUG] Imported: org.eclipse.aether.util < plexus.core
[DEBUG] Imported: org.eclipse.aether.version < plexus.core
[DEBUG] Imported: org.fusesource.jansi.* < plexus.core
[DEBUG] Imported: org.slf4j.* < plexus.core
[DEBUG] Imported: org.slf4j.event.* < plexus.core
[DEBUG] Imported: org.slf4j.helpers.* < plexus.core
[DEBUG] Imported: org.slf4j.spi.* < plexus.core
[DEBUG] Populating class realm maven.api
[DEBUG] Created adapter factory; available factories [file-lock, rwlock-local, semaphore-local, noop]; available name mappers [discriminating, file-gav, file-hgav, file-static, gav, static]
[INFO] Error stacktraces are turned on.
[DEBUG] Message scheme: color
[DEBUG] Message styles: debug info warning error success failure strong mojo project
[DEBUG] Reading global settings from /Library/Java/apache-maven-3.9.4/conf/settings.xml
[DEBUG] Reading user settings from /Users/siddjain/.m2/settings.xml
[DEBUG] Reading global toolchains from /Library/Java/apache-maven-3.9.4/conf/toolchains.xml
[DEBUG] Reading user toolchains from /Users/siddjain/.m2/toolchains.xml
[DEBUG] Using local repository at /Users/siddjain/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /Users/siddjain/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Creating adapter using nameMapper 'gav' and factory 'rwlock-local'
[DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for repository.jboss.org (http://repository.jboss.org/maven2).
[DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for snapshots.jboss.org (http://snapshots.jboss.org/maven2).
[DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for oss.sonatype.org/jboss-snapshots (http://oss.sonatype.org/content/repositories/jboss-snapshots).
[DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=166042, ConflictMarker.markTime=53833, ConflictMarker.nodeCount=20, ConflictIdSorter.graphTime=92333, ConflictIdSorter.topsortTime=74959, ConflictIdSorter.conflictIdCount=14, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1097875, ConflictResolver.conflictItemCount=20, DfDependencyCollector.collectTime=46290459, DfDependencyCollector.transformTime=1991583}
[DEBUG] kr.motd.maven:os-maven-plugin:jar:1.7.1
[DEBUG] org.apache.maven:maven-plugin-api:jar:3.5.3:compile
[DEBUG] org.apache.maven:maven-model:jar:3.5.3:compile
[DEBUG] org.apache.commons:commons-lang3:jar:3.5:compile
[DEBUG] org.apache.maven:maven-artifact:jar:3.5.3:compile
[DEBUG] org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.3:compile
[DEBUG] javax.enterprise:cdi-api:jar:1.0:compile
[DEBUG] javax.annotation:jsr250-api:jar:1.0:compile
[DEBUG] javax.inject:javax.inject:jar:1:compile
[DEBUG] org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.3:compile
[DEBUG] org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[DEBUG] org.codehaus.plexus:plexus-classworlds:jar:2.5.2:compile
[DEBUG] org.codehaus.plexus:plexus-utils:jar:3.1.0:compile
[DEBUG] com.google.code.findbugs:jsr305:jar:3.0.2:compile
[DEBUG] Created new class realm extension>kr.motd.maven:os-maven-plugin:1.7.1
[DEBUG] Importing foreign packages into class realm extension>kr.motd.maven:os-maven-plugin:1.7.1
[DEBUG] Imported: < maven.api
[DEBUG] Populating class realm extension>kr.motd.maven:os-maven-plugin:1.7.1
[DEBUG] Included: kr.motd.maven:os-maven-plugin:jar:1.7.1
[DEBUG] Included: org.apache.commons:commons-lang3:jar:3.5
[DEBUG] Included: javax.enterprise:cdi-api:jar:1.0
[DEBUG] Included: javax.annotation:jsr250-api:jar:1.0
[DEBUG] Included: org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.3
[DEBUG] Included: org.codehaus.plexus:plexus-component-annotations:jar:1.5.5
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:3.1.0
[DEBUG] Included: com.google.code.findbugs:jsr305:jar:3.0.2
[DEBUG] Extension realms for project mycompany:consumer:jar:1.0.0-SNAPSHOT: [ClassRealm[extension>kr.motd.maven:os-maven-plugin:1.7.1, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@7e32c033]]
[DEBUG] Created new class realm project>mycompany:consumer:1.0.0-SNAPSHOT
[DEBUG] Populating class realm project>mycompany:consumer:1.0.0-SNAPSHOT
[DEBUG] Looking up lifecycle mappings for packaging jar from ClassRealm[project>mycompany:consumer:1.0.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]
[DEBUG] Extension realms for project mycompany:mycompany-parent-pom:pom:1.0.0-SNAPSHOT: [ClassRealm[extension>kr.motd.maven:os-maven-plugin:1.7.1, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@7e32c033]]
[DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[project>mycompany:consumer:1.0.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] os.detected.name: osx
[INFO] os.detected.arch: aarch_64
[INFO] os.detected.bitness: 64
[INFO] os.detected.version: 13.5
[INFO] os.detected.version.major: 13
[INFO] os.detected.version.minor: 5
[INFO] os.detected.classifier: osx-aarch_64
[DEBUG] Resolving plugin prefix exec from [org.apache.maven.plugins, org.codehaus.mojo]
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (/Users/siddjain/.m2/repository)
[DEBUG] Skipped remote request for org.apache.maven.plugins/maven-metadata.xml, locally cached metadata up-to-date
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (/Users/siddjain/.m2/repository)
[DEBUG] Skipped remote request for org.codehaus.mojo/maven-metadata.xml, locally cached metadata up-to-date
[DEBUG] Resolved plugin prefix exec to org.codehaus.mojo:exec-maven-plugin from repository central
[DEBUG] Could not find metadata org.codehaus.mojo:exec-maven-plugin/maven-metadata.xml in local (/Users/siddjain/.m2/repository)
[DEBUG] Skipped remote request for org.codehaus.mojo:exec-maven-plugin/maven-metadata.xml, locally cached metadata up-to-date
[DEBUG] Resolved plugin version for org.codehaus.mojo:exec-maven-plugin to 3.1.0 from repository central (https://repo.maven.apache.org/maven2, default, releases)
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: mycompany:consumer:jar:1.0.0-SNAPSHOT
[DEBUG] Tasks: [exec:java]
[DEBUG] Style: Regular
[DEBUG] =======================================================================
[INFO]
[INFO] -------------------------< mycompany:consumer >-------------------------
[INFO] Building consumer 1.0.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[DEBUG] Resolving plugin prefix exec from [org.apache.maven.plugins, org.codehaus.mojo]
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (/Users/siddjain/.m2/repository)
[DEBUG] Skipped remote request for org.apache.maven.plugins/maven-metadata.xml, locally cached metadata up-to-date
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (/Users/siddjain/.m2/repository)
[DEBUG] Skipped remote request for org.codehaus.mojo/maven-metadata.xml, locally cached metadata up-to-date
[DEBUG] Resolved plugin prefix exec to org.codehaus.mojo:exec-maven-plugin from repository central
[DEBUG] Reusing cached resolved plugin version for org.codehaus.mojo:exec-maven-plugin to 3.1.0 from POM null
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN ================================================
[DEBUG] Project: mycompany:consumer:1.0.0-SNAPSHOT
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): [test]
[DEBUG] Repositories (dependencies): [central (https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] Repositories (plugins) : [central (https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: org.codehaus.mojo:exec-maven-plugin:3.1.0:java (default-cli)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<addOutputToClasspath default-value="true">${addOutputToClasspath}</addOutputToClasspath>
<addResourcesToClasspath default-value="false">${addResourcesToClasspath}</addResourcesToClasspath>
<arguments>${exec.arguments}</arguments>
<classpathScope default-value="runtime">${exec.classpathScope}</classpathScope>
<cleanupDaemonThreads default-value="true">${exec.cleanupDaemonThreads}</cleanupDaemonThreads>
<commandlineArgs>${exec.args}</commandlineArgs>
<daemonThreadJoinTimeout default-value="15000">${exec.daemonThreadJoinTimeout}</daemonThreadJoinTimeout>
<includePluginDependencies default-value="false">${exec.includePluginsDependencies}</includePluginDependencies>
<includeProjectDependencies default-value="true">${exec.includeProjectDependencies}</includeProjectDependencies>
<keepAlive default-value="false">${exec.keepAlive}</keepAlive>
<killAfter default-value="-1">${exec.killAfter}</killAfter>
<mainClass>${exec.mainClass}</mainClass>
<pluginDependencies default-value="${plugin.artifacts}"/>
<preloadCommonPool default-value="0">${exec.preloadCommonPool}</preloadCommonPool>
<project default-value="${project}"/>
<session default-value="${session}"/>
<skip default-value="false">${exec.skip}</skip>
<sourceRoot>${sourceRoot}</sourceRoot>
<stopUnresponsiveDaemonThreads default-value="false">${exec.stopUnresponsiveDaemonThreads}</stopUnresponsiveDaemonThreads>
<testSourceRoot>${testSourceRoot}</testSourceRoot>
</configuration>
[DEBUG] =======================================================================
[DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=10667, ConflictMarker.markTime=22958, ConflictMarker.nodeCount=4, ConflictIdSorter.graphTime=3375, ConflictIdSorter.topsortTime=3750, ConflictIdSorter.conflictIdCount=2, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=75541, ConflictResolver.conflictItemCount=3, DfDependencyCollector.collectTime=2981834, DfDependencyCollector.transformTime=129416}
[DEBUG] mycompany:consumer:jar:1.0.0-SNAPSHOT
[DEBUG] mycompany:contract:jar:1.0.0-SNAPSHOT:compile
[DEBUG] mycompany:provider:jar:1.0.0-SNAPSHOT:runtime
[INFO]
[INFO] --- exec:3.1.0:java (default-cli) @ consumer ---
[DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for apache.snapshots (http://repository.apache.org/snapshots).
[DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=11167, ConflictMarker.markTime=25917, ConflictMarker.nodeCount=4, ConflictIdSorter.graphTime=4125, ConflictIdSorter.topsortTime=4542, ConflictIdSorter.conflictIdCount=4, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=53708, ConflictResolver.conflictItemCount=4, DfDependencyCollector.collectTime=6812625, DfDependencyCollector.transformTime=106209}
[DEBUG] org.codehaus.mojo:exec-maven-plugin:jar:3.1.0
[DEBUG] org.codehaus.plexus:plexus-utils:jar:3.4.2:compile
[DEBUG] org.codehaus.plexus:plexus-component-annotations:jar:2.1.1:compile (optional)
[DEBUG] org.apache.commons:commons-exec:jar:1.3:compile
[DEBUG] Created new class realm plugin>org.codehaus.mojo:exec-maven-plugin:3.1.0
[DEBUG] Importing foreign packages into class realm plugin>org.codehaus.mojo:exec-maven-plugin:3.1.0
[DEBUG] Imported: < project>mycompany:consumer:1.0.0-SNAPSHOT
[DEBUG] Populating class realm plugin>org.codehaus.mojo:exec-maven-plugin:3.1.0
[DEBUG] Included: org.codehaus.mojo:exec-maven-plugin:jar:3.1.0
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:3.4.2
[DEBUG] Included: org.codehaus.plexus:plexus-component-annotations:jar:2.1.1
[DEBUG] Included: org.apache.commons:commons-exec:jar:1.3
[DEBUG] Loading mojo org.codehaus.mojo:exec-maven-plugin:3.1.0:java from plugin realm ClassRealm[plugin>org.codehaus.mojo:exec-maven-plugin:3.1.0, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@7e32c033]
[DEBUG] Configuring mojo execution 'org.codehaus.mojo:exec-maven-plugin:3.1.0:java:default-cli' with basic configurator -->
[DEBUG] (f) addOutputToClasspath = true
[DEBUG] (f) addResourcesToClasspath = false
[DEBUG] (f) arguments = []
[DEBUG] (f) classpathScope = runtime
[DEBUG] (f) cleanupDaemonThreads = true
[DEBUG] (f) daemonThreadJoinTimeout = 15000
[DEBUG] (f) includePluginDependencies = false
[DEBUG] (f) includeProjectDependencies = true
[DEBUG] (f) keepAlive = false
[DEBUG] (f) killAfter = -1
[DEBUG] (f) mainClass = consumer/mycompany.consumer.App
[DEBUG] (f) pluginDependencies = [org.codehaus.mojo:exec-maven-plugin:maven-plugin:3.1.0:, org.codehaus.plexus:plexus-utils:jar:3.4.2:compile, org.codehaus.plexus:plexus-component-annotations:jar:2.1.1:compile, org.apache.commons:commons-exec:jar:1.3:compile]
[DEBUG] (f) preloadCommonPool = 0
[DEBUG] (f) project = MavenProject: mycompany:consumer:1.0.0-SNAPSHOT @ /Users/siddjain/code/maven-exec-jpms-bug/consumer/pom.xml
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@7c2b58c0
[DEBUG] (f) skip = false
[DEBUG] (f) stopUnresponsiveDaemonThreads = false
[DEBUG] -- end configuration --
[DEBUG] Invoking : consumer/mycompany.consumer.App.main()
[DEBUG] Plugin Dependencies will be excluded.
[DEBUG] Project Dependencies will be included.
[DEBUG] Collected project artifacts [mycompany:contract:jar:1.0.0-SNAPSHOT:compile, mycompany:provider:jar:1.0.0-SNAPSHOT:runtime]
[DEBUG] Collected project classpath [/Users/siddjain/code/maven-exec-jpms-bug/consumer/target/classes]
[DEBUG] Adding to classpath : /Users/siddjain/code/maven-exec-jpms-bug/consumer/target/classes
[DEBUG] Adding project dependency artifact: contract to classpath
[DEBUG] Adding project dependency artifact: provider to classpath
[DEBUG] joining on thread Thread[#31,consumer/mycompany.consumer.App.main(),5,consumer/mycompany.consumer.App]
unable to load service provider
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.196 s
[INFO] Finished at: 2023-10-21T12:44:03-07:00
[INFO] ------------------------------------------------------------------------
[DEBUG] Shutting down adapter factory; available factories [file-lock, rwlock-local, semaphore-local, noop]; available name mappers [discriminating, file-gav, file-hgav, file-static, gav, static]
[DEBUG] Shutting down 'file-lock' factory
[DEBUG] Shutting down 'rwlock-local' factory
[DEBUG] Shutting down 'semaphore-local' factory
[DEBUG] Shutting down 'noop' factory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment