-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
The JavaExecHandleBuilder
generates invalid Class-Path
entries
#26313
Comments
Sorry that you're having trouble with Gradle! We appreciate the effort that went into filing this issue, but we must ask for more information. As stated in our issue template, a minimal reproducible example is a must for us to be able to track down and fix your problem efficiently. Our available resources are severely limited, and we must be sure we are looking at the exact problem you are facing. If we have a reproducer, we may be able also to suggest workarounds or ways to avoid the problem. The ideal way to provide a reproducer is to leverage our reproducer template. You can also use Gradle Project Replicator to reproduce the structure of your project. This issue will be closed after 7 days unless you provide more information. While you provided us a great explanation about why it might be a problem, we want to be 100% sure that this is a problem in practice. |
There are 2 open questions that show the problem in practice on stackoverflow right now. Both happen to be on Windows. I'm an Eclipse Jetty committer, and was helping these users of gradle diagnose why their environments were not starting up properly. This is especially a problem on windows, as the multiple drive roots ( |
I agree that your analysis is great. However, could you please provide a reproducer which demonstrates the issue in isolation? The issues you're pointing at contain some steps, sure, however, we're not 100% sure that the problem is caused by Gradle and not some integration issues. |
Do you have an example project that uses JavaExecHandleBuilder that I can build a reproducer from? If you ask me to build one, it's going to require a Windows box with multiple drive letters accessible from Java. |
No, we don't have such a template. I think you can use the SO questions you mentioned and adapt the basic template I mentioned before. Creating a custom task with We don't provide Windows boxes. I believe Microsoft has some free images available for testing. |
While we asked for a reproducer, none was provided. If you provide a valid reproducer, we will consider this issue again. In the meantime, closing as unreproducible. |
Current Behavior
When on windows, the behavior in
JavaExecHandleBuilder
to createClass-Path
entries in the jar manifest is useful effort.See #10544 and #10114
But the code in the
master
branch generates the entries with absolute URLsgradle/subprojects/core/src/main/java/org/gradle/process/internal/JavaExecHandleBuilder.java
Lines 405 to 411 in 84a06b8
This is not what the JAR spec allows for the
Class-Path
attribute.See: https://docs.oracle.com/en/java/javase/17/docs/specs/jar/jar.html#class-path-attribute
Those entries are supposed to be relative URL reference to the context of the jar file that contains those entries.
The absolute URL references are not considered valid.
See bullet point 2 of the above referenced javadoc (copy/pasted here)
Expected Behavior
The
Class-Path
entries should be generated as relative URL references to the JAR file that has those entries.Context (optional)
No response
Steps to Reproduce
See examples at
Gradle version
all
Build scan URL (optional)
No response
Your Environment (optional)
No response
The text was updated successfully, but these errors were encountered: