]
Michael Biarnes Kiefer resolved DROOLS-478.
-------------------------------------------
Resolution: Done
now it is:
<instructions>
<Bundle-SymbolicName>org.jbpm.bpmn2</Bundle-SymbolicName>
<Bundle-Activator>org.jbpm.osgi.bpmn2.Activator</Bundle-Activator>
<Import-Package>
!org.jbpm.compiler
org.drools.core*,
org.drools.compiler*,
org.kie.api*,
*
</Import-Package>
<Export-Package>
*
</Export-Package>
</instructions>
Biuld: Felix (OSGi) plugin confgs: remove invalid version strings and
unneeded imports statements from pom
----------------------------------------------------------------------------------------------------------
Key: DROOLS-478
URL:
https://issues.jboss.org/browse/DROOLS-478
Project: Drools
Issue Type: Task
Reporter: Geoffrey De Smet
Assignee: Michael Biarnes Kiefer
Some osgi-enabled modules's felix configuration hasn't been cleaned up yet. Find
and fix all pom files which follow the bad pattern below.
Bad:
{code}
<instructions>
<Bundle-SymbolicName>org.jbpm.bpmn2</Bundle-SymbolicName>
<Bundle-Activator>org.jbpm.osgi.bpmn2.Activator</Bundle-Activator>
<Import-Package>
!org.jbpm.compiler
org.drools.core*;version=6.0.0,
org.drools.compiler*;version=6.0.0,
org.kie.api*;version=6.0.0,
*
</Import-Package>
<Export-Package>
*
</Export-Package>
</instructions>
{code}
https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/pom.xml#L147
The above instructions are bad, because:
- *"version=6.0.0" is plain wrong*: this is master, this is 6.1 already and
soon 6.2 (and we don't want to have to change that constantly).
- *Import of org.drools.core, org.drools.compiler, etc is redundant.* The pom file should
depend on those (which it already does transitively, but it might need to be direct for
felix to work) and then felix will automatically add them for osgi.
Note: The felix plugin now activates during compilation and checks osgi boundaries. This
means that if it compiles, it's relatively safe to assume that osgi isn't broken.
(A year ago, felix have no such assurances and osgi was broken without anyone noticing).
Ideal (low maintenance):
{code}
<instructions>
<Bundle-SymbolicName>org.optaplanner.core</Bundle-SymbolicName>
<Export-Package>
org.optaplanner.core.*
</Export-Package>
</instructions>
{code}
https://github.com/droolsjbpm/optaplanner/blob/master/optaplanner-core/po...
Reasonable:
{code}
<instructions>
<Bundle-SymbolicName>org.drools.compiler</Bundle-SymbolicName>
<Import-Package>
com.sun.tools.xjc.*;resolution:=optional,
com.sun.codemodel;resolution:=optional,
javax.enterprise.*;resolution:=optional,
org.antlr.*;resolution:=optional,
org.codehaus.janino.*;resolution:=optional,
org.eclipse.jdt.*;resolution:=optional,
org.osgi.*;resolution:=optional,
org.kie.spring*;resolution:=optional,
*
</Import-Package>
<Export-Package>
*
</Export-Package>
<Bundle-Activator>org.drools.compiler.osgi.Activator</Bundle-Activator>
<_removeheaders>Private-Package</_removeheaders>
</instructions>
{code}
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/pom.xml#...