Closed cdietrich closed 6 months ago
what do i need to call to run this locally? it always try to publish
To run this locally, you can explicitly pass these properties as false (with the -D syntax):
<maven.deploy.skip>true</maven.deploy.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
<gpg.skip>true</gpg.skip>
I don't understand why we don't have this problem in standard builds, where we already use Tycho 4.0.7;
maybe you could temporarily revert to Tycho 4.0.6?
Maybe we hit a Tycho bug?
The problem
[ERROR] Failed to execute goal org.eclipse.tycho:target-platform-configuration:4.0.7:target-platform (default-target-platform) on project org.eclipse.xtext.tests: Execution default-target-platform of goal org.eclipse.tycho:target-platform-configuration:4.0.7:target-platform failed: Cannot invoke "java.io.File.getName()" because "this.artifactFile" is null -> [Help 1]
appears in our org.eclipse.xtext.tests
project.
The target platform configuration is the same and inherited and it works in the other projects...
14:11:06 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:target-platform-configuration:4.0.7:target-platform (default-target-platform) on project org.eclipse.xtext.tests: Execution default-target-platform of goal org.eclipse.tycho:target-platform-configuration:4.0.7:target-platform failed: Cannot invoke "java.io.File.getName()" because "this.artifactFile" is null
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
14:11:06 at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
14:11:06 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
14:11:06 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
14:11:06 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
14:11:06 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
14:11:06 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
14:11:06 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
14:11:06 at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
14:11:06 at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
14:11:06 at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
14:11:06 at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
14:11:06 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
14:11:06 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
14:11:06 at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
14:11:06 at java.lang.reflect.Method.invoke (Method.java:568)
14:11:06 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
14:11:06 at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
14:11:06 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
14:11:06 at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
14:11:06 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
14:11:06 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
14:11:06 at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
14:11:06 at java.lang.reflect.Method.invoke (Method.java:568)
14:11:06 at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:52)
14:11:06 at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:161)
14:11:06 at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:73)
14:11:06 Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-target-platform of goal org.eclipse.tycho:target-platform-configuration:4.0.7:target-platform failed: Cannot invoke "java.io.File.getName()" because "this.artifactFile" is null
14:11:06 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:133)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
14:11:06 at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
14:11:06 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
14:11:06 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
14:11:06 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
14:11:06 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
14:11:06 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
14:11:06 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
14:11:06 at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
14:11:06 at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
14:11:06 at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
14:11:06 at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
14:11:06 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
14:11:06 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
14:11:06 at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
14:11:06 at java.lang.reflect.Method.invoke (Method.java:568)
14:11:06 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
14:11:06 at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
14:11:06 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
14:11:06 at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
14:11:06 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
14:11:06 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
14:11:06 at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
14:11:06 at java.lang.reflect.Method.invoke (Method.java:568)
14:11:06 at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:52)
14:11:06 at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:161)
14:11:06 at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:73)
14:11:06 Caused by: java.lang.NullPointerException: Cannot invoke "java.io.File.getName()" because "this.artifactFile" is null
14:11:06 at org.eclipse.tycho.p2maven.advices.MavenChecksumAdvice.getArtifactProperties (MavenChecksumAdvice.java:53)
14:11:06 at org.eclipse.tycho.p2maven.InstallableUnitPublisher.applyAdvices (InstallableUnitPublisher.java:98)
14:11:06 at org.eclipse.tycho.p2resolver.PomUnits.lambda$addCollectedUnits$1 (PomUnits.java:96)
14:11:06 at java.lang.Iterable.forEach (Iterable.java:75)
14:11:06 at org.eclipse.tycho.p2resolver.PomInstallableUnitStore.addPomDependencyConsumer (PomInstallableUnitStore.java:255)
14:11:06 at org.eclipse.tycho.p2resolver.PomUnits.addCollectedUnits (PomUnits.java:85)
14:11:06 at org.eclipse.tycho.p2resolver.P2DependencyResolver.resolvePomDependencies (P2DependencyResolver.java:302)
14:11:06 at org.eclipse.tycho.core.resolver.DefaultTargetPlatformService.lambda$computeFinalTargetPlatform$2 (DefaultTargetPlatformService.java:147)
14:11:06 at org.eclipse.tycho.core.osgitools.DefaultReactorProject$LazyValue.get (DefaultReactorProject.java:307)
14:11:06 at org.eclipse.tycho.core.osgitools.DefaultReactorProject.computeContextValue (DefaultReactorProject.java:200)
14:11:06 at org.eclipse.tycho.core.resolver.DefaultTargetPlatformService.computeFinalTargetPlatform (DefaultTargetPlatformService.java:103)
14:11:06 at org.eclipse.tycho.core.resolver.DefaultTargetPlatformService.getTargetPlatform (DefaultTargetPlatformService.java:99)
14:11:06 at org.eclipse.tycho.target.TargetPlatformMojo.execute (TargetPlatformMojo.java:51)
14:11:06 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
14:11:06 at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
14:11:06 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
14:11:06 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
14:11:06 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
14:11:06 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
14:11:06 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
14:11:06 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
14:11:06 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
14:11:06 at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
14:11:06 at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
14:11:06 at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
14:11:06 at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
14:11:06 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
14:11:06 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
14:11:06 at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
14:11:06 at java.lang.reflect.Method.invoke (Method.java:568)
14:11:06 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
14:11:06 at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
14:11:06 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
14:11:06 at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
14:11:06 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
14:11:06 at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
14:11:06 at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
14:11:06 at java.lang.reflect.Method.invoke (Method.java:568)
14:11:06 at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:52)
14:11:06 at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:161)
14:11:06 at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:73)
14:11:06 [ERROR]
14:11:06 [ERROR]
14:11:06 [ERROR] For more information about the errors and possible solutions, please read the following articles:
14:11:06 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
14:11:06 [ERROR]
14:11:06 [ERROR] After correcting the problems, you can resume the build with the command
14:11:06 [ERROR] mvn <args> -rf :org.eclipse.xtext.tests
14:11:06 [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]
14:11:06 [DEBUG] Shutting down 'file-lock' factory
14:11:06 [DEBUG] Shutting down 'rwlock-local' factory
14:11:06 [DEBUG] Shutting down 'semaphore-local' factory
14:11:06 [DEBUG] Shutting down 'noop' factory
14:11:06 [DEBUG] Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$1028/0x00007fb814dd3188@2a9be4b9 during JVM shutdown
@laeubi does this ring a bell?
i also dont know if any tycho 4 works.
will give 4.0.6 a try
problem also seems to be present in 4.0.6
i also dont understand this warning
14:26:14 [WARNING] Your build is not self-contained! Project org.eclipse.xtext:org.eclipse.xtext.tests:eclipse-plugin:2.35.0.M1 depends implicitly on reactor project org.eclipse.xtext:org.eclipse.xtext.common.types:eclipse-plugin:2.35.0.M1 through target requirements eclipse-plugin:org.eclipse.emf.mwe2.launch:2.18.0.v20240405-0451 that are not part of the reactor, offending dependency chain is eclipse-plugin:org.eclipse.xtext.tests:2.35.0.qualifier (reactor project) --> eclipse-plugin:org.eclipse.emf.mwe2.launch:
still have troubles to get this running locally on mac...
@laeubi some additional information:
14:26:14 [INFO] --- tycho-packaging:4.0.6:build-qualifier (default-build-qualifier) @ org.eclipse.xtext.tests ---
14:26:14 [INFO] The project's OSGi version is 2.35.0.v20240408-1220
...
14:26:14 [WARNING] /home/jenkins/agent/workspace/xtext-monorepo-full-deploy-milestone/org.eclipse.xtext.tests/META-INF/MANIFEST.MF [5:0]: Maven version 2.35.0.M1 must have -SNAPSHOT qualifier for SNAPSHOT builds
14:26:14 [WARNING] Maven version 2.35.0.M1 must have -SNAPSHOT qualifier for SNAPSHOT builds
14:26:14 [WARNING] /home/jenkins/agent/workspace/xtext-monorepo-full-deploy-milestone/org.eclipse.xtext.tests/META-INF/MANIFEST.MF [5:0]: Unqualified OSGi version 2.35.0.qualifier must match unqualified Maven version 2.35.0.M1 for SNAPSHOT builds
but that never gave us problem in the past
will try to downgrade to 3.0.5
managed to build a m0 with the downgrade to tycho 3
=> we can use the M1 to fix the problem
i also dont understand this warning
14:26:14 [WARNING] Your build is not self-contained! Project org.eclipse.xtext:org.eclipse.xtext.tests:eclipse-plugin:2.35.0.M1 depends implicitly on reactor project org.eclipse.xtext:org.eclipse.xtext.common.types:eclipse-plugin:2.35.0.M1 through target requirements eclipse-plugin:org.eclipse.emf.mwe2.launch:2.18.0.v20240405-0451 that are not part of the reactor, offending dependency chain is eclipse-plugin:org.eclipse.xtext.tests:2.35.0.qualifier (reactor project) --> eclipse-plugin:org.eclipse.emf.mwe2.launch:
This is how I interpret that:
org.eclipse.xtext.tests
depends on org.eclipse.emf.mwe2.launch
(see its MANIFEST)org.eclipse.emf.mwe2.launch
depends on org.eclipse.xtext.common.types
Maybe, in org.eclipse.xtext.tests
, we could move the dep on org.eclipse.emf.mwe2.launch
to additional.bundles in build.properties; alternatively, we can place an explicit dependency on org.eclipse.xtext.common.types
in org.eclipse.xtext.tests
I seem to understand that the code causing the exception https://github.com/eclipse-tycho/tycho/blame/be568d87103984fff0786354e9a78300943c9cc2/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/advices/MavenChecksumAdvice.java#L53 has been added in Tycho 4.
@cdietrich but does the warning appear before the error in org.eclipse.xtext.tests
?
Am back to vacation mode with no pc. Check the failed builds one of that was with debug mode
Ok, should I also revert your changes on master?
Yes
Not sure if it's relevant but I got some obscure failures due to a change in EMF's re-exports. Hard to diagnose but easily fixed by adding an import for org.eclipse.emf.ecore to provide what was previously provided by org.eclipse.emf.ecore.xmi.
@LorenzoBettini I will apply a patch so the NPE does not occur, in general a NPE is always considered a bug as it either should throw a meaningful message or is handled otherwise.
From the error that occur here it looks like a artifact is accessed that has no file, this usually indicates a download problem or something is accessed before it is fully available, so even if we can get rid of the error here it might indicate a problem you will face just later on.
One common problem is that some maven plugins assume a static model, one can try to pass in -Dtycho.target.eager=true` to enforce eager resolution and injection of dependencies into the model.
Regarding the warning this usually indicates that your project indirectly depends on a reactor project, e.g. you have a dependency you consume trough the target (Target Dependency
) and this one depends on something in the reactor (Reactor Dependency
), that means that the dependency computation might (randomly) depend on order of projects and if parallel execution is enabled or not and effectively means you can't built your release without a previous one.
So one should either fix that circular dependency or add an explicit import.
@laeubi I was thinking of suggesting to have a check condition for the NPE, but you were faster ;)
Indeed, we had a problem with the reactor order, which I have already fixed: https://github.com/eclipse/xtext/pull/2984
our milestone build does no longer work.
@LorenzoBettini @szarnekow any idea?
https://ci.eclipse.org/xtext/job/xtext-monorepo-full-deploy-milestone/
maybe related to the recent tycho 4 update