Niclas Hedhman wrote:
I think it would be good if one was allowed to use ${pom.version} for version
attribute in Export-Package. There are two issues as far as I can see;
1. -SNAPSHOT is not allowed at all.
Because of the '-' ? For Felix I automatically map this to a '.', so
that I end up with "0.8.0.SNAPSHOT"...seems workable.
2. Does the package version evolve at some other rate than the bundle? And
should one perhaps only use the first two digit groups for the package
version.
I think it is worthwhile to have it be possible to use ${pom.version}
for export package version, but it should clearly not be the default.
Since packages can be included into any arbitrary bundle, there is no
default relationship between the deployment unit version (i.e.,
${pom.version}) and the package version.
I also think that
* <bundleSymbolicName> should default to ${pom.artifactId}
Yes, this is what I am doing already in my pom files. However, I was
wondering lately if we are doing the artifactId the best way. Right now
we have, for example:
* pom.groupId = "org.apache.felix"
* pom.artifactId = "org.apache.felix.scr"
I was wondering if it would be better to have:
* pom.groupId = "org.apache.felix"
* pom.artifactId = "scr"
Thus, the symbolic name would be:
* ${pom.groupId} + "." + ${pom.artifactId}
This would coincide with us cleaning up our trunk directory to only show
the unique part of the subproject name, as opposed to the groupId part.
I am not sure if this would be a good move or a bad move from a maven
perspective, though.
* <bundleName> should default to ${pom.name}
* <bundleDescription> should default to ${pom.description}
* <bundleVendor> should default to ${pom.organization.name}
* <bundleVersion> should default to ${pom.version} (see above).
* bundleContactAddress should default to ${pom.organization.url}
* <bundleUrl> and/or <bundleUpdateLocation> should default to ${pom.url}
I am not sure what the value of ${pom.url} is, so I am not sure if this
would be a good default. Bundle-URL is supposed to be a URL that points
to where you can download the bundle.
There should NOT be any default for Bundle-UpdateLocation since this
will explicitly impact how bundles are updated. This tends to cause
confusion among developers when they make edits to a bundle, then type
"update", but not have it update because it was updating from the update
location instead of their local bundle. We should let OBR worry about
how to update bundles and not try to bake it in.
* <bundleCopyright should default to
Copyright ${pom.inceptionYear}, ${pom.organization.name}
* A whole bunch of other properties to read from file(s) in the project
directory instead, including <exportPackage>, <excludeImport>
Or perhaps utlize the <properties> tag in the pom main section...
If that is done, then one can move the whole <plugin> section of the POM to a
(grand)*parent pom, which I think simplifies 'standard cases', still allowing
for the current form.
I would like to think about how we can do these latter suggestions in
such a way that mangen and the maven plugin can cooperate, since these
types of issues need to be solved by mangen too.
-> richard