Skip to content
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

robander
Copy link
Member

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

@robander robander added plugin/eclipsehelp Issue related to Eclipse Help plug-in feature New feature or request ready for merge labels May 11, 2017
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">
Copy link
Member Author

@robander robander May 11, 2017

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid <antcall> if possible.

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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>
@jelovirt jelovirt merged commit 7e08419 into dita-ot:develop May 13, 2017
@jelovirt jelovirt added this to the 2.5 milestone May 13, 2017
@robander robander deleted the feature/eclipsejar branch May 16, 2017 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request plugin/eclipsehelp Issue related to Eclipse Help plug-in
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants