Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#8222 closed enhancement (fixed)

[Patch] Update plugin build system

Reported by: simon04 Owned by: team
Priority: normal Milestone:
Component: Plugin Version:
Keywords: Cc: stoecker

Description

To get slimmer plugin ant build files, I suggest to move the dist target to build-common.xml. The build.xml would then only contain some (more) properties/variables.

Attachments (4)

plugin_build.patch (6.0 KB ) - added by simon04 11 years ago.
plugin_build_v2.patch (8.0 KB ) - added by simon04 11 years ago.
plugin_build_v3.patch (8.5 KB ) - added by simon04 11 years ago.
plugin_build_v4.patch (8.6 KB ) - added by simon04 11 years ago.

Download all attachments as: .zip

Change History (20)

by simon04, 11 years ago

Attachment: plugin_build.patch added

comment:1 by bastiK, 11 years ago

I like it.

comment:2 by stoecker, 11 years ago

This only works when all values are filled, especially if there is an icon. Otherwise you get a wrong manifest. People already produced wrong manifests by adding "..." or whatever as icons. Your suggestions will probably increase that error.

Even in ant it should be possible to make manifest entries conditional.

comment:3 by Don-vip, 11 years ago

Plugin-Stage and Plugin-Requires properties should be handled as well.

comment:4 by simon04, 11 years ago

I didn't find an easy way to handle those optional properties correctly. Neither <manifest> nor <attribute> allows some conditional decisions.

comment:5 by stoecker, 11 years ago

Making multiple manifest entries with different combinations and choosing the right one depending on the variable values?

by simon04, 11 years ago

Attachment: plugin_build_v2.patch added

comment:6 by simon04, 11 years ago

v2 handles unset properties and adds support for Plugin-Stage, Plugin-Requires, Plugin-Early.

comment:7 by stoecker, 11 years ago

Looks fine.

Three things remaining:

  • Does this work when one of the directories is missing? (ressources, data, ...)?
  • I would uncomment "<!-- -->" the optional arguments (link, icon), so people don't "..." them.
  • i18n script needs to be adapted to recognize also the new place of description text

by simon04, 11 years ago

Attachment: plugin_build_v3.patch added

in reply to:  7 ; comment:8 by simon04, 11 years ago

Replying to stoecker:

  • Does this work when one of the directories is missing? (ressources, data, ...)?

lib must exist, but there was no change affecting ressources or data

  • I would uncomment "<!-- -->" the optional arguments (link, icon), so people don't "..." them.

Done for the rarely used arguments. However, values "" and "..." are filtered in the build-common.xml

  • i18n script needs to be adapted to recognize also the new place of description text

Done.

in reply to:  8 comment:9 by stoecker, 11 years ago

Replying to simon04:

Replying to stoecker:

  • Does this work when one of the directories is missing? (ressources, data, ...)?

lib must exist, but there was no change affecting ressources or data

Not all plugins have these directories. The copy part is thus different for them. And when the dirs are empty they also should not be in the jar. Same for lib. It should work without the dir. Can these parts be skipped when dirs don't exists? Likewise for classpath lib?

by simon04, 11 years ago

Attachment: plugin_build_v4.patch added

comment:10 by simon04, 11 years ago

Adding a few failonerror, includeemptydirs, erroronmissingdir should do the trick (see v4).

comment:11 by stoecker, 11 years ago

Reading the diff looks fine. Now only the SVN can show if all works :-)

Last edited 11 years ago by stoecker (previous) (diff)

comment:12 by simon04, 11 years ago

Resolution: fixed
Status: newclosed

[o28990]

comment:13 by stoecker, 11 years ago

I added an "help" target in [o29004].

I also made another fix for geotools ([o28995]) and some others. A new target setup-dist can now be used to override or append to dist file generating: [o29005].

comment:14 by Don-vip, 11 years ago

It doesn't work for geotools. The custom dist target was here to exclude some file from the lib jars to be included in the final plugin jar. Because of the zipfileset task in the default build.xml, these files are now embedded. It's even worse: the other files are included twice, resulting in a jar that doubled in size. I'm working on a proper solution.

comment:15 by Don-vip, 11 years ago

Done in [o29007].

comment:16 by stoecker, 11 years ago

Strange, I thought I checked the contents of the resulting file before I did the checkin. Probably compared two times the same file :-)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.