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
Support creating Eclipse Help output as JAR file #2684
Conversation
xhtml.topics, | ||
copy-css"> | ||
<antcall target="dita.map.eclipse"></antcall> | ||
<jar destfile="${output.dir}/${args.eclipsehelp.jar.name}" basedir="${dita.output.dir}" if:set="args.eclipsehelp.jar.name"> |
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.
FWIW I originally placed the <jar>
element in a target of its own. But with the peculiar dependency chain here (5 dependency targets followed by nested <antcall>
), the only way that works is to move the JAR target into the final spot in the referenced dita.map.eclipse
dependency chain. That is ... awkward and sort of hides what is happening, so I moved it in here right after <antcall>
.
As to why the map processing is done with <antcall>
, I'm not really sure, but I don't see much reason to refactor that at this point.
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.
Avoid <antcall>
if possible.
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.
Agreed, just didn't want to touch stuff that has been there for years.
If we remove that <antcall>
and just move dita.map.eclipse
into the dita2eclipsehelp
dependency list, is there any chance of side effects? I wouldn't think so but I don't know why it was chosen in the first place.
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.
Antcall was probably used because the original coder didn't know there was any difference between antcall and using a dependency (antcall creates a new Project and thus allows overriding property values).
In this case you can just move dita.map.eclipse
to dependencies.
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.
Done, and made the <jar>
action into a target that runs after dita.map.eclipse
.
Signed-off-by: Robert D Anderson <robander@us.ibm.com>
46578fd
to
f8b924e
Compare
In 15 years of supporting people using Eclipse, nearly every user has wanted me to return the output as a single JAR rather than as many separate files. I've always managed this with complicated overrides + post-processing, but the new feature #2670 makes it simple.
I realized when I saw #2261 that this was probably common to every Eclipse Help user - the preferred output is a JAR file - so this pull request adds a parameter to make this automatic. When the new parameter specifies a JAR file name, the results will all be placed in that JAR file, and only that file is placed in the output directory.
If I was starting from scratch, returning a JAR would be the default behavior, and the default JAR name would be based on the map. At this point though it's likely many others have post-processing like mine, so we shouldn't change the default behavior.
Signed-off-by: Robert D Anderson robander@us.ibm.com