#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)
Change History (20)
by , 12 years ago
Attachment: | plugin_build.patch added |
---|
comment:1 by , 12 years ago
comment:2 by , 12 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:4 by , 12 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 , 12 years ago
Making multiple manifest entries with different combinations and choosing the right one depending on the variable values?
by , 12 years ago
Attachment: | plugin_build_v2.patch added |
---|
comment:6 by , 12 years ago
v2 handles unset properties and adds support for Plugin-Stage
, Plugin-Requires
, Plugin-Early
.
follow-up: 8 comment:7 by , 12 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 , 12 years ago
Attachment: | plugin_build_v3.patch added |
---|
follow-up: 9 comment:8 by , 12 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.
comment:9 by , 12 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 affectingressources
ordata
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 , 12 years ago
Attachment: | plugin_build_v4.patch added |
---|
comment:10 by , 12 years ago
Adding a few failonerror
, includeemptydirs
, erroronmissingdir
should do the trick (see v4).
comment:11 by , 12 years ago
Reading the diff looks fine. Now only the SVN can show if all works :-)
comment:13 by , 12 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 , 12 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:16 by , 12 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 :-)
I like it.