Reputation: 172
I have some OSGi artifacts (Eclipse plugins) built using Tycho. Then I have some other project building a Debian package with those artifacts included (own MOJO). The OSGi artifacts are declared as simple POM dependencies in the Debian package project POM.
Everything worked well until now, when I switched from Tycho 1.7.0 to 2.7.5. I have to switch because I need some other feature ("wrapAsBundle"). In the dependency resolution phase there are now some artifacts not found in the repository (own hosted Artifactory) and the build fails. It seems strange that there is something *.eclipse-plugin pulled which does not exist in the repository.
Before changes:
[INFO] Downloading from xyz.repository.snapshot: https://repository.xyz/artifactory/xyz-snapshot/xyz/xyz.service.ticket/1.0.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded from xyz.repository.snapshot: https://repository.xyz/artifactory/xyz-snapshot/xyz/xyz.service.ticket/1.0.0-SNAPSHOT/maven-metadata.xml (1.3 kB at 80 kB/s)
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ xyz.os.runtime ---
After changes:
[DEBUG] Skipped remote request for xyz.service:xyz.service.ticket:1.0.0-SNAPSHOT/maven-metadata.xml, already updated during this session.
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repository.xyz/artifactory/xyz-snapshot/
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repository.xyz/artifactory/xyz-snapshot/ with username=abc, password=***
[INFO] Downloading from xyz.repository.snapshot: https://repository.xyz/artifactory/xyz-snapshot/xyz/xyz.common.data/1.0.0-SNAPSHOT/xyz.common.data-1.0.0-SNAPSHOT.eclipse-plugin
[DEBUG] Writing tracking file /home/gitlab-runner/.m2/repository/xyz/common/xyz.common.data/1.0.0-SNAPSHOT/xyz.common.data-1.0.0-SNAPSHOT.eclipse-plugin.lastUpdated
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.942 s
[INFO] Finished at: 2024-11-15T21:36:23+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project xyz.os.runtime: Could not resolve dependencies for project xyz.os:xyz.os.runtime:debian:3.7.0.20241115213614-testing: Could not find artifact xyz.os.runtime.common:xyz.os.runtime.common.data:eclipse-plugin:1.0.0-SNAPSHOT in technology.xyz.repository.snapshot (https://repository.xyz/artifactory/xyz-snapshot/) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project xyz.os.runtime: Could not resolve dependencies for project xyz.os:xyz.os.runtime:debian:3.7.0.20241115213614-testing: Could not find artifact xyz.os.runtime.common:xyz.os.runtime.common.data:eclipse-plugin:1.0.0-SNAPSHOT in xyz.repository.snapshot (https://repository.xyz/artifactory/xyz-snapshot/)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:269)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies (LifecycleDependencyResolver.java:147)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved (MojoExecutor.java:248)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:202)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
Tycho configuration:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-versions-plugin</artifactId>
<version>${tycho.version}</version>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<pomDependencies>wrapAsBundle</pomDependencies>
</configuration>
</plugin>
Upvotes: 0
Views: 44
Reputation: 172
It seems this is fixed starting from Tycho 3.0.x: https://github.com/eclipse-tycho/tycho/pull/2011/commits/fdd9a7f09667106783048d61898d5d0091437975
replaceTypeWithExtension needs to be set to true then.
Upvotes: 0