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
Added tasks for JDK's jmod and jlink tools. #80
Conversation
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
this is ok to test |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
This looks great Craig, many thanks! I've got a short list of wishes, though:
I can do all or some of them myself if you prefer me to do it. In that case I'd ask you to confirm you want to be addressed as "Craig Pell" in the contributors files. Many thanks again. |
All done, except that I’m finding there aren’t many man pages on my Linux system which aren’t GPL. I’ve found a few which are under a BSD license; is that acceptable? |
log("Executing: jmod " + String.join(" ", args), Project.MSG_VERBOSE); | ||
|
||
ByteArrayOutputStream stdout = new ByteArrayOutputStream(); | ||
ByteArrayOutputStream stderr = new ByteArrayOutputStream(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Craig, like Stefan already said, this patch is a really good addition to Ant. Thank you for that.
The only question/suggestion I have is, should we instead just pass System.out
and System.err
instead of creating a ByteArrayOutputStream
? That way the actual output and errors are logged instead of we deciding to print it only when the tool execution fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was what I tried first, but the output and error were never showing up at all in unit tests. (Also, my observation has been that the tool produces no output when it runs successfully.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test setup captures streams so it may become difficult. Would using LogOutputStreams
do which would send the output directly to An't logging system?
BSD is perfectly fine, thanks. |
added Ant version to docs, and replaced GPL man pages with BSD-licensed man pages.
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Many thanks again, @craigpell . I've merged this but would like to resolve the discussion about the log output. With b74d5b3 I've committed a branch (logoutput-jmod-link) where I use /cc @jaikiran |
I restored the LogOutputStream usage and confirmed that the output is not visible in unit test results. It's not even captured in the system-out and system-err elements of the TEST-*.xml files. I remember spending a good amount of time trying to find a method that would make the log show up, but I was never able to do it. |
Hi @craigpell, the test(s) use the [1] https://github.com/apache/ant/pull/80/files#diff-1bb76afc7ce4a535b0c580f9d040aff9R68 |
Support for the jmod and jlink tools present in the JDK since Java 9. Now that Java 11 has no standalone JRE, officially, these tools are the only way to distribute client-side Java applications.