question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

file/dir names cut off/corrupted in justj plugin when building with maven

See original GitHub issue
❯ mvn compile
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: org.eclipse.corrosion:org.eclipse.corrosion:1.2.4-SNAPSHOT @ /home/toor/corrosion/org.eclipse.corrosion/.polyglot.META-INF
[INFO] Resolving target definition file:/home/toor/corrosion/org.eclipse.corrosion/../target-platform/target-platform.target for environments=[linux/gtk/x86_64, linux/gtk/aarch64, win32/win32/x86_64, macosx/cocoa/x86_64, macosx/cocoa/aarch64], include source mode=honor, execution environment=StandardEEResolutionHints [executionEnvironment=OSGi profile 'JavaSE-17' { source level: 17, target level: 17}], remote p2 repository options=org.eclipse.tycho.p2.remote.RemoteAgent@24bba1b7...
[INFO] Resolving dependencies of MavenProject: org.eclipse.corrosion:org.eclipse.corrosion:1.2.4-SNAPSHOT @ /home/toor/corrosion/org.eclipse.corrosion/.polyglot.META-INF
[INFO] Resolving class path of MavenProject: org.eclipse.corrosion:org.eclipse.corrosion:1.2.4-SNAPSHOT @ /home/toor/corrosion/org.eclipse.corrosion/.polyglot.META-INF
[INFO] Computing target platform for MavenProject: org.eclipse.corrosion:org.eclipse.corrosion.tests:1.0.0-SNAPSHOT @ /home/toor/corrosion/org.eclipse.corrosion.tests/.polyglot.META-INF
[INFO] Resolving dependencies of MavenProject: org.eclipse.corrosion:org.eclipse.corrosion.tests:1.0.0-SNAPSHOT @ /home/toor/corrosion/org.eclipse.corrosion.tests/.polyglot.META-INF
[INFO] Resolving class path of MavenProject: org.eclipse.corrosion:org.eclipse.corrosion.tests:1.0.0-SNAPSHOT @ /home/toor/corrosion/org.eclipse.corrosion.tests/.polyglot.META-INF
[INFO] Computing target platform for MavenProject: org.eclipse.corrosion:org.eclipse.corrosion.feature:1.2.4-SNAPSHOT @ /home/toor/corrosion/org.eclipse.corrosion.feature/.polyglot.feature.xml
[WARNING] No system packages found in profile nor toolchain for JavaSE-11, using current JRE system packages.
This can cause faulty dependency resolution, consider adding a definition for a 'jdk' with id=JavaSE-11 in your toolchains.xml
[INFO] Resolving target definition file:/home/toor/corrosion/org.eclipse.corrosion.feature/../target-platform/target-platform.target for environments=[linux/gtk/x86_64, linux/gtk/aarch64, win32/win32/x86_64, macosx/cocoa/x86_64, macosx/cocoa/aarch64], include source mode=honor, execution environment=StandardEEResolutionHints [executionEnvironment=OSGi profile 'JavaSE-11' { source level: 11, target level: 11}], remote p2 repository options=org.eclipse.tycho.p2.remote.RemoteAgent@24bba1b7...
[INFO] Resolving dependencies of MavenProject: org.eclipse.corrosion:org.eclipse.corrosion.feature:1.2.4-SNAPSHOT @ /home/toor/corrosion/org.eclipse.corrosion.feature/.polyglot.feature.xml
[INFO] Resolving class path of MavenProject: org.eclipse.corrosion:org.eclipse.corrosion.feature:1.2.4-SNAPSHOT @ /home/toor/corrosion/org.eclipse.corrosion.feature/.polyglot.feature.xml
[INFO] Computing target platform for MavenProject: org.eclipse.corrosion:org.eclipse.corrosion.product.branding:1.2.4-SNAPSHOT @ /home/toor/corrosion/org.eclipse.corrosion.product.branding/pom.xml
[INFO] Resolving dependencies of MavenProject: org.eclipse.corrosion:org.eclipse.corrosion.product.branding:1.2.4-SNAPSHOT @ /home/toor/corrosion/org.eclipse.corrosion.product.branding/pom.xml
[INFO] Resolving class path of MavenProject: org.eclipse.corrosion:org.eclipse.corrosion.product.branding:1.2.4-SNAPSHOT @ /home/toor/corrosion/org.eclipse.corrosion.product.branding/pom.xml
[INFO] Computing target platform for MavenProject: org.eclipse.corrosion:org.eclipse.corrosion.product:1.2.4-SNAPSHOT @ /home/toor/corrosion/repository/pom.xml
[INFO] Resolving target definition file:/home/toor/corrosion/repository/../target-platform/target-platform.target for environments=[linux/gtk/x86_64, linux/gtk/aarch64, win32/win32/x86_64, macosx/cocoa/x86_64, macosx/cocoa/aarch64], include source mode=honor, execution environment=org.eclipse.tycho.p2.target.ee.NoExecutionEnvironmentResolutionHints@454db313, remote p2 repository options=org.eclipse.tycho.p2.remote.RemoteAgent@24bba1b7...
[INFO] Adding repository https://download.eclipse.org/justj/jres/latest
[INFO] Fetching p2.index from https://download.eclipse.org/justj/jres/17/updates/release/17.0.2/ (172B)
[INFO] Resolving dependencies of MavenProject: org.eclipse.corrosion:org.eclipse.corrosion.product:1.2.4-SNAPSHOT @ /home/toor/corrosion/repository/pom.xml
[INFO] Resolving class path of MavenProject: org.eclipse.corrosion:org.eclipse.corrosion.product:1.2.4-SNAPSHOT @ /home/toor/corrosion/repository/pom.xml
[WARNING] The project org.eclipse.corrosion:parent:pom:1.2.4-SNAPSHOT uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] parent                                                             [pom]
[INFO] [bundle] Rust edition in Eclipse IDE                    [eclipse-plugin]
[INFO] [test-bundle] Tests for Corrosion                  [eclipse-test-plugin]
[INFO] [feature] Corrosion: Rust edition in Eclipse IDE       [eclipse-feature]
[INFO] org.eclipse.corrosion.product.branding                  [eclipse-plugin]
[INFO] org.eclipse.corrosion.product                       [eclipse-repository]
[INFO] 
[INFO] --------------------< org.eclipse.corrosion:parent >--------------------
[INFO] Building parent 1.2.4-SNAPSHOT                                     [1/6]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.7:prepare-agent (default) @ parent ---
[INFO] argLine set to -javaagent:/home/toor/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/home/toor/corrosion/target/jacoco.exec,append=true,includes=org.eclipse.corrosion*
[INFO] 
[INFO] ------------< org.eclipse.corrosion:org.eclipse.corrosion >-------------
[INFO] Building [bundle] Rust edition in Eclipse IDE 1.2.4-SNAPSHOT       [2/6]
[INFO] ---------------------------[ eclipse-plugin ]---------------------------
[INFO] 
[INFO] --- tycho-packaging-plugin:2.6.0:build-qualifier (default-build-qualifier) @ org.eclipse.corrosion ---
[INFO] The project's OSGi version is 1.2.4.202201261203
[INFO] 
[INFO] --- tycho-packaging-plugin:2.6.0:validate-id (default-validate-id) @ org.eclipse.corrosion ---
[INFO] 
[INFO] --- tycho-packaging-plugin:2.6.0:validate-version (default-validate-version) @ org.eclipse.corrosion ---
[INFO] 
[INFO] --- target-platform-configuration:2.6.0:target-platform (default-target-platform) @ org.eclipse.corrosion ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.7:prepare-agent (default) @ org.eclipse.corrosion ---
[INFO] argLine set to -javaagent:/home/toor/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/home/toor/corrosion/org.eclipse.corrosion/target/jacoco.exec,append=true,includes=org.eclipse.corrosion*
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ org.eclipse.corrosion ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/toor/corrosion/org.eclipse.corrosion/src/main/resources
[INFO] 
[INFO] --- tycho-compiler-plugin:2.6.0:compile (default-compile) @ org.eclipse.corrosion ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] ---------< org.eclipse.corrosion:org.eclipse.corrosion.tests >----------
[INFO] Building [test-bundle] Tests for Corrosion 1.0.0-SNAPSHOT          [3/6]
[INFO] ------------------------[ eclipse-test-plugin ]-------------------------
[INFO] 
[INFO] --- tycho-packaging-plugin:2.6.0:build-qualifier (default-build-qualifier) @ org.eclipse.corrosion.tests ---
[INFO] The project's OSGi version is 1.0.0.202110280920
[INFO] 
[INFO] --- tycho-packaging-plugin:2.6.0:validate-id (default-validate-id) @ org.eclipse.corrosion.tests ---
[INFO] 
[INFO] --- tycho-packaging-plugin:2.6.0:validate-version (default-validate-version) @ org.eclipse.corrosion.tests ---
[INFO] 
[INFO] --- target-platform-configuration:2.6.0:target-platform (default-target-platform) @ org.eclipse.corrosion.tests ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.7:prepare-agent (default) @ org.eclipse.corrosion.tests ---
[INFO] tycho.testArgLine set to -javaagent:/home/toor/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/home/toor/corrosion/org.eclipse.corrosion.tests/target/jacoco.exec,append=true,includes=org.eclipse.corrosion*
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ org.eclipse.corrosion.tests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/toor/corrosion/org.eclipse.corrosion.tests/src/main/resources
[INFO] 
[INFO] --- tycho-compiler-plugin:2.6.0:compile (default-compile) @ org.eclipse.corrosion.tests ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --------< org.eclipse.corrosion:org.eclipse.corrosion.feature >---------
[INFO] Building [feature] Corrosion: Rust edition in Eclipse IDE 1.2.4-SNAPSHOT [4/6]
[INFO] --------------------------[ eclipse-feature ]---------------------------
[INFO] 
[INFO] --- tycho-packaging-plugin:2.6.0:build-qualifier-aggregator (default-build-qualifier-aggregator) @ org.eclipse.corrosion.feature ---
[INFO] The project's OSGi version is 1.2.4.202201261203
[INFO] 
[INFO] --- tycho-packaging-plugin:2.6.0:validate-id (default-validate-id) @ org.eclipse.corrosion.feature ---
[INFO] 
[INFO] --- tycho-packaging-plugin:2.6.0:validate-version (default-validate-version) @ org.eclipse.corrosion.feature ---
[INFO] 
[INFO] --- target-platform-configuration:2.6.0:target-platform (default-target-platform) @ org.eclipse.corrosion.feature ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.7:prepare-agent (default) @ org.eclipse.corrosion.feature ---
[INFO] argLine set to -javaagent:/home/toor/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/home/toor/corrosion/org.eclipse.corrosion.feature/target/jacoco.exec,append=true,includes=org.eclipse.corrosion*
[INFO] 
[INFO] ----< org.eclipse.corrosion:org.eclipse.corrosion.product.branding >----
[INFO] Building org.eclipse.corrosion.product.branding 1.2.4-SNAPSHOT     [5/6]
[INFO] ---------------------------[ eclipse-plugin ]---------------------------
[INFO] 
[INFO] --- tycho-packaging-plugin:2.6.0:build-qualifier (default-build-qualifier) @ org.eclipse.corrosion.product.branding ---
[INFO] The project's OSGi version is 1.2.4.202201261203
[INFO] 
[INFO] --- tycho-packaging-plugin:2.6.0:validate-id (default-validate-id) @ org.eclipse.corrosion.product.branding ---
[INFO] 
[INFO] --- tycho-packaging-plugin:2.6.0:validate-version (default-validate-version) @ org.eclipse.corrosion.product.branding ---
[INFO] 
[INFO] --- target-platform-configuration:2.6.0:target-platform (default-target-platform) @ org.eclipse.corrosion.product.branding ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.7:prepare-agent (default) @ org.eclipse.corrosion.product.branding ---
[INFO] argLine set to -javaagent:/home/toor/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/home/toor/corrosion/org.eclipse.corrosion.product.branding/target/jacoco.exec,append=true,includes=org.eclipse.corrosion*
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ org.eclipse.corrosion.product.branding ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/toor/corrosion/org.eclipse.corrosion.product.branding/src/main/resources
[INFO] 
[INFO] --- tycho-compiler-plugin:2.6.0:compile (default-compile) @ org.eclipse.corrosion.product.branding ---
[INFO] 
[INFO] --------< org.eclipse.corrosion:org.eclipse.corrosion.product >---------
[INFO] Building org.eclipse.corrosion.product 1.2.4-SNAPSHOT              [6/6]
[INFO] -------------------------[ eclipse-repository ]-------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] parent 1.2.4-SNAPSHOT .............................. SUCCESS [  0.105 s]
[INFO] [bundle] Rust edition in Eclipse IDE 1.2.4-SNAPSHOT  SUCCESS [  0.532 s]
[INFO] [test-bundle] Tests for Corrosion 1.0.0-SNAPSHOT ... SUCCESS [  0.023 s]
[INFO] [feature] Corrosion: Rust edition in Eclipse IDE 1.2.4-SNAPSHOT SUCCESS [  0.032 s]
[INFO] org.eclipse.corrosion.product.branding 1.2.4-SNAPSHOT SUCCESS [  0.016 s]
[INFO] org.eclipse.corrosion.product 1.2.4-SNAPSHOT ....... FAILURE [  0.007 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  19.943 s
[INFO] Finished at: 2022-03-02T10:47:41-08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project org.eclipse.corrosion.product: Could not resolve dependencies for project org.eclipse.corrosion:org.eclipse.corrosion.product:eclipse-repository:1.2.4-SNAPSHOT: The following artifacts could not be resolved: org.eclipse.corrosion:org.eclipse.corrosion.feature:jar:1.2.4-SNAPSHOT, org.eclipse.corrosion:org.eclipse.corrosion.product.branding:jar:1.2.4-SNAPSHOT: Could not find artifact org.eclipse.corrosion:org.eclipse.corrosion.feature:jar:1.2.4-SNAPSHOT -> [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/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :org.eclipse.corrosion.product
❯ mvn --version
Apache Maven 3.8.4 (SUSE 3.8.4-1.2)
Maven home: /usr/share/maven
Java version: 17.0.1, vendor: N/A, runtime: /usr/lib64/jvm/java-17-openjdk-17
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.15.12-1-default", arch: "amd64", family: "unix"

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
ghostcommented, Mar 2, 2022

I just worked through this and arrived at the conclusion that the problem must be in Ark archiver which I normally never use at all, and I never will again because oh my god…

well I guess there is a takeaway here

  • I figured out how to build this
  • learned something about github actions that I did not know
  • got a pretty comprehensive tour of the build for corrosion
  • I know not to use Ark now for like anything
0reactions
ghostcommented, Mar 2, 2022

So I just tested the compiled artifacts from github and it works fine:

https://github.com/clandestinenetworks/corrosion/actions/runs/1924610150

it’s even got the same version of justj

< plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.2.v20220201-1208/jre/bin
---
> plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.1.v20211116-1657/jre/bin

so it’s gotta be something on my laptop with maven that has to do with how it’s handling that justj dependency I really have no idea where to start with that but, worst comes to worse I can probably orchestrate this in a docker container assuming the problem is maven version / os related and not a file system problem (you gotta be kidding me dude, if that’s the problem I’m going to shoot myself for having made it roughly 7 years now on btrfs and never once having to consider that)

Read more comments on GitHub >

github_iconTop Results From Across the Web

jar file gets corrupted while building with maven - Stack Overflow
We choose to exclude jar from filtered extensions. In th pluginManagement section of the parent pom we put this configuration <plugin> <groupId> ...
Read more >
Customizing The File Name Mapping - Apache Maven
Customizing The File Name Mapping. It might happen that you need to change the naming of the artifacts within the EAR file.
Read more >
Guide to Developing Java Plugins - Apache Maven
In this section we will build a simple plugin with one goal which takes no parameters and simply displays a message on the...
Read more >
Apache Maven Resources Plugin – Filtering
This will create a resource output in target/classes/hello.txt which contains exactly the same text. Hello ${name}.
Read more >
Maven Surefire Plugin – Inclusions and Exclusions of Tests
There are certain times when some tests are causing the build to fail. Excluding them is one of the best workarounds to continue...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found