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

Could not resolve target platform specification artifact org.eclipse.emf:org.eclipse.emf.mwe2.target:target:2.20.0 #315

Open
efferre79 opened this issue Nov 26, 2024 · 7 comments

Comments

@efferre79
Copy link

I am trying to use the POM org.eclipse.emf.mwe.utils-1.14.0.pom with maven 3.9.9:

mvn -X -e -f org.eclipse.emf.mwe.utils-1.14.0.pom help:effective-pom -Doutput=/tmp/pom.xml

but I get the error in the title. Here is the full debug output:

Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: /usr/share/maven-bin-3.9
Java version: 17.0.13, vendor: Gentoo, runtime: /usr/lib64/openjdk-17
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "6.6.21-gentoo", arch: "amd64", family: "unix"
[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 /usr/share/maven-bin-3.9/conf/settings.xml
[DEBUG] Reading user settings from /root/.m2/settings.xml
[DEBUG] Reading global toolchains from /usr/share/maven-bin-3.9/conf/toolchains.xml
[DEBUG] Reading user toolchains from /root/.m2/toolchains.xml
[DEBUG] Using local repository at /root/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /root/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Creating adapter using nameMapper 'gav' and factory 'rwlock-local'
[DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=540592, ConflictMarker.markTime=382416, ConflictMarker.nodeCount=31, ConflictIdSorter.graphTime=298344, ConflictIdSorter.topsortTime=258499, ConflictIdSorter.conflictIdCount=24, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=4121327, ConflictResolver.conflictItemCount=31, DfDependencyCollector.collectTime=134587402, DfDependencyCollector.transformTime=7216514}
[DEBUG] org.eclipse.tycho:tycho-maven-plugin:jar:2.7.5
[DEBUG]    org.eclipse.tycho:tycho-core:jar:2.7.5:compile
[DEBUG]       org.eclipse.tycho:org.eclipse.tycho.p2.tools.shared:jar:2.7.5:compile
[DEBUG]       org.eclipse.tycho:org.eclipse.tycho.p2.resolver.shared:jar:2.7.5:compile
[DEBUG]       org.codehaus.plexus:plexus-archiver:jar:4.2.7:compile (version managed from default)
[DEBUG]          org.codehaus.plexus:plexus-utils:jar:3.4.1:compile (version managed from default)
[DEBUG]          org.codehaus.plexus:plexus-io:jar:3.2.0:compile (version managed from default)
[DEBUG]             commons-io:commons-io:jar:2.6:compile
[DEBUG]          org.apache.commons:commons-compress:jar:1.21:compile (version managed from default)
[DEBUG]          org.iq80.snappy:snappy:jar:0.4:compile
[DEBUG]          org.tukaani:xz:jar:1.9:runtime
[DEBUG]       org.codehaus.plexus:plexus-interpolation:jar:1.26:compile
[DEBUG]       org.codehaus.plexus:plexus-cipher:jar:2.0:compile (version managed from default)
[DEBUG]          javax.inject:javax.inject:jar:1:compile
[DEBUG]       org.eclipse.tycho:sisu-equinox-embedder:jar:2.7.5:compile
[DEBUG]          org.eclipse.platform:org.eclipse.osgi:jar:3.17.200:compile (version managed from default)
[DEBUG]          org.eclipse.tycho:sisu-equinox-api:jar:2.7.5:compile
[DEBUG]       org.eclipse.tycho:tycho-metadata-model:jar:2.7.5:compile
[DEBUG]          de.pdark:decentxml:jar:1.4:compile (version managed from default)
[DEBUG]       org.eclipse.tycho:tycho-embedder-api:jar:2.7.5:compile
[DEBUG]          org.eclipse.tycho:org.eclipse.tycho.embedder.shared:jar:2.7.5:compile
[DEBUG]       org.eclipse.tycho:org.eclipse.tycho.core.shared:jar:2.7.5:compile
[DEBUG]    org.eclipse.tycho:tycho-p2-facade:jar:2.7.5:compile
[DEBUG]       org.codehaus.plexus:plexus-component-annotations:jar:2.1.1:compile (version managed from default)
[DEBUG] Created new class realm extension>org.eclipse.tycho:tycho-maven-plugin:2.7.5
[DEBUG] Importing foreign packages into class realm extension>org.eclipse.tycho:tycho-maven-plugin:2.7.5
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm extension>org.eclipse.tycho:tycho-maven-plugin:2.7.5
[DEBUG]   Included: org.eclipse.tycho:tycho-maven-plugin:jar:2.7.5
[DEBUG]   Included: org.eclipse.tycho:tycho-core:jar:2.7.5
[DEBUG]   Included: org.eclipse.tycho:org.eclipse.tycho.p2.tools.shared:jar:2.7.5
[DEBUG]   Included: org.eclipse.tycho:org.eclipse.tycho.p2.resolver.shared:jar:2.7.5
[DEBUG]   Included: org.codehaus.plexus:plexus-archiver:jar:4.2.7
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.4.1
[DEBUG]   Included: org.codehaus.plexus:plexus-io:jar:3.2.0
[DEBUG]   Included: commons-io:commons-io:jar:2.6
[DEBUG]   Included: org.apache.commons:commons-compress:jar:1.21
[DEBUG]   Included: org.iq80.snappy:snappy:jar:0.4
[DEBUG]   Included: org.tukaani:xz:jar:1.9
[DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.26
[DEBUG]   Included: org.codehaus.plexus:plexus-cipher:jar:2.0
[DEBUG]   Included: org.eclipse.tycho:sisu-equinox-embedder:jar:2.7.5
[DEBUG]   Included: org.eclipse.platform:org.eclipse.osgi:jar:3.17.200
[DEBUG]   Included: org.eclipse.tycho:sisu-equinox-api:jar:2.7.5
[DEBUG]   Included: org.eclipse.tycho:tycho-metadata-model:jar:2.7.5
[DEBUG]   Included: de.pdark:decentxml:jar:1.4
[DEBUG]   Included: org.eclipse.tycho:tycho-embedder-api:jar:2.7.5
[DEBUG]   Included: org.eclipse.tycho:org.eclipse.tycho.embedder.shared:jar:2.7.5
[DEBUG]   Included: org.eclipse.tycho:org.eclipse.tycho.core.shared:jar:2.7.5
[DEBUG]   Included: org.eclipse.tycho:tycho-p2-facade:jar:2.7.5
[DEBUG]   Included: org.codehaus.plexus:plexus-component-annotations:jar:2.1.1
[DEBUG] Extension realms for project org.eclipse.emf:org.eclipse.emf.mwe.utils:eclipse-plugin:1.14.0: [ClassRealm[extension>org.eclipse.tycho:tycho-maven-plugin:2.7.5, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@67424e82]]
[DEBUG] Created new class realm project>org.eclipse.emf:org.eclipse.emf.mwe.utils:1.14.0
[DEBUG] Populating class realm project>org.eclipse.emf:org.eclipse.emf.mwe.utils:1.14.0
[DEBUG] Looking up lifecycle mappings for packaging eclipse-plugin from ClassRealm[project>org.eclipse.emf:org.eclipse.emf.mwe.utils:1.14.0, parent: ClassRealm[maven.api, parent: null]]
[DEBUG] Extension realms for project org.eclipse.emf:org.eclipse.emf.mwe2.plugins-parent:pom:2.20.0: [ClassRealm[extension>org.eclipse.tycho:tycho-maven-plugin:2.7.5, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@67424e82]]
[DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[project>org.eclipse.emf:org.eclipse.emf.mwe.utils:1.14.0, parent: ClassRealm[maven.api, parent: null]]
[DEBUG] Extension realms for project org.eclipse.emf:org.eclipse.emf.mwe2.parent:pom:2.20.0: [ClassRealm[extension>org.eclipse.tycho:tycho-maven-plugin:2.7.5, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@67424e82]]
[DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[project>org.eclipse.emf:org.eclipse.emf.mwe.utils:1.14.0, parent: ClassRealm[maven.api, parent: null]]
[DEBUG] org.eclipse.tycho:tycho-maven-plugin:2.7.5 configured in MavenProject: org.eclipse.emf:org.eclipse.emf.mwe.utils:1.14.0 @ /var/db/repos/__mine__/dev-java/eclipse-emf-mwe-utils/sources/org.eclipse.emf.mwe.utils-1.14.0.pom
[DEBUG] org.eclipse.tycho:tycho-versions-plugin:2.7.5 configured in MavenProject: org.eclipse.emf:org.eclipse.emf.mwe.utils:1.14.0 @ /var/db/repos/__mine__/dev-java/eclipse-emf-mwe-utils/sources/org.eclipse.emf.mwe.utils-1.14.0.pom
[DEBUG] org.eclipse.tycho:tycho-compiler-plugin:2.7.5 configured in MavenProject: org.eclipse.emf:org.eclipse.emf.mwe.utils:1.14.0 @ /var/db/repos/__mine__/dev-java/eclipse-emf-mwe-utils/sources/org.eclipse.emf.mwe.utils-1.14.0.pom
[DEBUG] org.eclipse.tycho:tycho-source-plugin:2.7.5 configured in MavenProject: org.eclipse.emf:org.eclipse.emf.mwe.utils:1.14.0 @ /var/db/repos/__mine__/dev-java/eclipse-emf-mwe-utils/sources/org.eclipse.emf.mwe.utils-1.14.0.pom
[DEBUG] org.eclipse.tycho:tycho-p2-plugin:2.7.5 configured in MavenProject: org.eclipse.emf:org.eclipse.emf.mwe.utils:1.14.0 @ /var/db/repos/__mine__/dev-java/eclipse-emf-mwe-utils/sources/org.eclipse.emf.mwe.utils-1.14.0.pom
[DEBUG] org.eclipse.tycho:tycho-packaging-plugin:2.7.5 configured in MavenProject: org.eclipse.emf:org.eclipse.emf.mwe.utils:1.14.0 @ /var/db/repos/__mine__/dev-java/eclipse-emf-mwe-utils/sources/org.eclipse.emf.mwe.utils-1.14.0.pom
[DEBUG] org.eclipse.tycho:tycho-surefire-plugin:2.7.5 configured in MavenProject: org.eclipse.emf:org.eclipse.emf.mwe.utils:1.14.0 @ /var/db/repos/__mine__/dev-java/eclipse-emf-mwe-utils/sources/org.eclipse.emf.mwe.utils-1.14.0.pom
[DEBUG] target-platform-configuration for MavenProject: org.eclipse.emf:org.eclipse.emf.mwe.utils:1.14.0 @ /var/db/repos/__mine__/dev-java/eclipse-emf-mwe-utils/sources/org.eclipse.emf.mwe.utils-1.14.0.pom:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <target>
    <artifact>
      <groupId>org.eclipse.emf</groupId>
      <artifactId>org.eclipse.emf.mwe2.target</artifactId>
      <version>2.20.0</version>
    </artifact>
  </target>
  <environments>
    <environment>
      <os>macosx</os>
      <ws>cocoa</ws>
      <arch>x86_64</arch>
    </environment>
    <environment>
      <os>macosx</os>
      <ws>cocoa</ws>
      <arch>aarch64</arch>
    </environment>
    <environment>
      <os>win32</os>
      <ws>win32</ws>
      <arch>x86_64</arch>
    </environment>
    <environment>
      <os>linux</os>
      <ws>gtk</ws>
      <arch>x86_64</arch>
    </environment>
  </environments>
  <dependency-resolution>
    <extraRequirements>
      <requirement>
        <type>eclipse-feature</type>
        <id>org.eclipse.jdt</id>
        <versionRange>0.0.0</versionRange>
      </requirement>
    </extraRequirements>
  </dependency-resolution>
</configuration>
[DEBUG] Resolving artifact org.eclipse.emf:org.eclipse.emf.mwe2.target:target:2.20.0 from [central (https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] Resolving artifact org.eclipse.emf:org.eclipse.emf.mwe2.target:target:2.20.0 from [central (https://repo.maven.apache.org/maven2, default, releases)]
[ERROR] Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact org.eclipse.emf:org.eclipse.emf.mwe2.target:target:2.20.0 -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact org.eclipse.emf:org.eclipse.emf.mwe2.target:target:2.20.0
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:109)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:569)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
Caused by: java.lang.RuntimeException: Could not resolve target platform specification artifact org.eclipse.emf:org.eclipse.emf.mwe2.target:target:2.20.0
    at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.addTargetArtifact (DefaultTargetPlatformConfigurationReader.java:465)
    at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.setTarget (DefaultTargetPlatformConfigurationReader.java:378)
    at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.getTargetPlatformConfiguration (DefaultTargetPlatformConfigurationReader.java:103)
    at org.eclipse.tycho.core.resolver.DefaultTychoResolver.setupProject (DefaultTychoResolver.java:97)
    at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead (TychoMavenLifecycleParticipant.java:111)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:223)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:569)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
[ERROR] 
[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/InternalErrorException
[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

The same command works for other POMs, is something wrong in the POM itself?

@cdietrich
Copy link
Contributor

Can you ask this in tycho

@cdietrich
Copy link
Contributor

Is the target deployed to central at all

@cdietrich
Copy link
Contributor

Tycho 275 is also quite old

@cdietrich
Copy link
Contributor

And what is your actual goal

@efferre79
Copy link
Author

I am working in Gentoo and using an automatic tool (java-ebuilder) to package java libraries. The tool is using maven to discover dependencies on the library to be packaged. The same command based on maven works for other libraries of the group org.eclipse.emf but I am facing this specific issue with org.eclipse.emf.mwe.utils-1.14.0.

I have found the mew.utils POM in the central which is quite updated (16 Nov 2024), instead it looks like that the target artifacts available there are quite old (latest is version 2.8.3).

@cdietrich
Copy link
Contributor

Can you just run our complete build as in jenkinsfile. Imdont think tycho can just build a single subproject

@cdietrich
Copy link
Contributor

And how do you do this with other tycho based builds where artifacts depend on each other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants