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

Merged
merged 1 commit into from May 13, 2017

Conversation

Projects
None yet
2 participants
@robander
Member

robander commented May 11, 2017

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

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">

This comment has been minimized.

@robander

robander May 11, 2017

Member

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.

This comment has been minimized.

@jelovirt

jelovirt May 11, 2017

Member

Avoid <antcall> if possible.

This comment has been minimized.

@robander

robander May 11, 2017

Member

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.

This comment has been minimized.

@jelovirt

jelovirt May 11, 2017

Member

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.

This comment has been minimized.

@robander

robander May 11, 2017

Member

Done, and made the <jar> action into a target that runs after dita.map.eclipse.

Support creating Eclipse Help output as JAR file
Signed-off-by: Robert D Anderson <robander@us.ibm.com>

@jelovirt jelovirt merged commit 7e08419 into dita-ot:develop May 13, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jelovirt jelovirt added this to the 2.5 milestone May 13, 2017

@robander robander deleted the robander:feature/eclipsejar branch May 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment