Issue while compiling a plugin since migrating to latest v9

99 views
Skip to first unread message

Nicolas Micoud

unread,
Jul 13, 2022, 10:45:12 AM7/13/22
to iDempiere
Hi,

This morning, I've managed to migrate our test environnement (and its plugins) to latest v9 (with tycho v2.7.3) - previous sources were from March 2022.

Now, I'm facing an issue for a second environnement, which has some little customizations in trunk and plugins.
Trunk is ok but I can't compile plugins (locally or on our Jenkins server)

I'm compiling locally using this command:
mvn verify -Didempiere.core.path=../deviDempiereTgi9 -Didempiere.core.repository.url=file:c:/src/deviDempiereTgi9/org.idempiere.p2/target/repository

Error is :

[INFO] Resolving MavenDependencyRoots = [GroupId = org.eclipse.jetty, ArtifactId = jetty-servlets, Version = 10.0.7, ArtifactType = jar, IncludeDependencyScope = ], IncludeDependencyScope = [compile], MissingManifestStrategy = GENERATE, IncludeSource = true...
Downloading from Central: http://central.maven.org/maven2/org/eclipse/jetty/tests/jetty-http-tools/10.0.7/jetty-http-tools-10.0.7.pom
Downloading from jenkins: http://repo.jenkins-ci.org/releases/org/eclipse/jetty/tests/jetty-http-tools/10.0.7/jetty-http-tools-10.0.7.pom
[INFO] Failure detected.
[ERROR] Failed to resolve target definition file:/C:/Src/deviDempiereTgi9/org.idempiere.p2.targetplatform/org.idempiere.p2.targetplatform.target: MavenDependency GroupId = org.eclipse.jetty, ArtifactId = jetty-servlets, Version = 10.0.7, ArtifactType = jar, IncludeDependencyScope =  of location MavenDependencyRoots = [GroupId = org.eclipse.jetty, ArtifactId = jetty-servlets, Version = 10.0.7, ArtifactType = jar, IncludeDependencyScope = ], IncludeDependencyScope = [compile], MissingManifestStrategy = GENERATE, IncludeSource = true could not be resolved: resolving org.eclipse.jetty:jetty-servlets:jar:10.0.7 failed! [org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable to get dependency information for org.eclipse.jetty.tests:jetty-http-tools:jar:10.0.7: Failed to retrieve POM for org.eclipse.jetty.tests:jetty-http-tools:jar:10.0.7: Could not transfer artifact org.eclipse.jetty.tests:jetty-http-tools:pom:10.0.7 from/to Central (http://central.maven.org/maven2): Transfer failed for http://central.maven.org/maven2/org/eclipse/jetty/tests/jetty-http-tools/10.0.7/jetty-http-tools-10.0.7.pom
[ERROR]   org.eclipse.jetty.tests:jetty-http-tools:jar:10.0.7
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR]   idempiere-core (file:c:/src/deviDempiereTgi9/org.idempiere.p2/target/repository, releases=false, snapshots=false),
[ERROR]   Central (http://central.maven.org/maven2, releases=true, snapshots=true),
[ERROR]   jenkins (http://repo.jenkins-ci.org/releases, releases=true, snapshots=true),
[ERROR]   central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
[ERROR] Path to dependency:
[ERROR]         1) org.eclipse.jetty:jetty-servlets:jar:10.0.7
[ERROR]
[ERROR] ]
[ERROR] -> [Help 1]
[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/MavenExecutionException




I got a similar warning above :

[INFO] Resolving MavenDependencyRoots = [GroupId = org.apache.felix, ArtifactId = org.osgi.service.obr, Version = 1.0.2, ArtifactType = jar, IncludeDependencyScope = ], IncludeDependencyScope = [compile], MissingManifestStrategy = GENERATE, IncludeSource = true...
Downloading from Central: http://central.maven.org/maven2/org/apache/felix/org.osgi.service.obr/1.0.2/org.osgi.service.obr-1.0.2-sources.jar
Downloading from jenkins: http://repo.jenkins-ci.org/releases/org/apache/felix/org.osgi.service.obr/1.0.2/org.osgi.service.obr-1.0.2-sources.jar
[WARNING] MavenResolver: source-artifact org.apache.felix:org.osgi.service.obr:1.0.2:sources can't be resolved: org.eclipse.tycho.core.shared.DependencyResolutionException: resolving org.apache.felix:org.osgi.service.obr:jar:sources:1.0.2 failed! [org.apache.maven.artifact.resolver.ArtifactResolutionException: Could not transfer artifact org.apache.felix:org.osgi.service.obr:jar:sources:1.0.2 from/to Central (http://central.maven.org/maven2): Transfer failed for http://central.maven.org/maven2/org/apache/felix/org.osgi.service.obr/1.0.2/org.osgi.service.obr-1.0.2-sources.jar
  org.apache.felix:org.osgi.service.obr:jar:1.0.2

from the specified remote repositories:
  idempiere-core (file:c:/src/deviDempiereTgi9/org.idempiere.p2/target/repository, releases=false, snapshots=false),
  Central (http://central.maven.org/maven2, releases=true, snapshots=true),
  jenkins (http://repo.jenkins-ci.org/releases, releases=true, snapshots=true),
  central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
]



What is strange, is that those error/warning are not present in plugins I migrated this morning

When comparing logs, I can see for successfull (test environnement):

[INFO] Resolving MavenDependencyRoots = [GroupId = org.eclipse.jetty, ArtifactId = jetty-servlets, Version = 10.0.7, ArtifactType = jar, IncludeDependencyScope = ], IncludeDependencyScope = [compile], MissingManifestStrategy = GENERATE, IncludeSource = true...
[WARNING] Missing POM for org.eclipse.jetty.tests:jetty-http-tools:jar:10.0.7
[INFO] Resolving MavenDependencyRoots = [GroupId = org.eclipse.jetty, ArtifactId = apache-jsp, Version = 10.0.7, ArtifactType = jar, IncludeDependencyScope = ], IncludeDependencyScope = [compile], MissingManifestStrategy = GENERATE, IncludeSource = true...


whereas for failure :

[INFO] Resolving MavenDependencyRoots = [GroupId = org.eclipse.jetty, ArtifactId = jetty-servlets, Version = 10.0.7, ArtifactType = jar, IncludeDependencyScope = ], IncludeDependencyScope = [compile], MissingManifestStrategy = GENERATE, IncludeSource = true...
[INFO] Downloading from Central: http://central.maven.org/maven2/org/eclipse/jetty/tests/jetty-http-tools/10.0.7/jetty-http-tools-10.0.7.pom
[INFO] Downloading from jenkins: http://repo.jenkins-ci.org/releases/org/eclipse/jetty/tests/jetty-http-tools/10.0.7/jetty-http-tools-10.0.7.pom
[INFO] Failure detected.

There must be a difference between the 2 plugins but I can't find it.
Any hint where to look?


Thanks

Nicolas

Heng Sin Low

unread,
Jul 13, 2022, 10:54:16 AM7/13/22
to idem...@googlegroups.com
if your plugin is using different tycho version, perhaps, you are running into this issue - https://github.com/eclipse/tycho/blob/master/RELEASE_NOTES.md#caution-when-switching-between-tycho-versions

solution: upgrade to tycho 2.7.3 or "rm ~/.m2/repository/.meta/p2-artifacts.properties" before running maven build.

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/365389f0-9c69-4701-a781-1544d733020fn%40googlegroups.com.

Nicolas Micoud

unread,
Jul 15, 2022, 12:50:16 AM7/15/22
to iDempiere
Hi,
I don't think this is a tycho issue.
I've faced it the first time I execute mvn verify.
Then I updated the pom.xml from the parent group (2.4.0 -> 2.7.3).
And I didn't find any other occurence of 'tycho' in plugins

I'll try to recreate a very simple plugin and add stuff one by one and see where it begins to throws error
Reply all
Reply to author
Forward
0 new messages