Hi,
I'm having a problem getting maven-compiler-plugin and
maven-bundle-plugin to play nicely together. Here's the build section of
my pom:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>1.4.0</version>
<extensions>true</extensions>
<configuration>
<manifestLocation>META-INF</manifestLocation>
<instructions>
<Import-Package>*<Import-Package>
<Export-Package>com.bofa.ib*</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
When maven-compiler-plugin is explicitly added to the build, inheritance
dependencies are not resolved. For example, our class uses
org.springframework.jdbc.core.JdbcTemplate, which extends
org.springframework.jdbc.support.JdbcAccessor (note the superclass lives
in a different package). The method we invoke is defined on
JdbcAccessor, hence the inheritance dependency. When the compiler
plugin is included in the build, the bundle plugin fails to import the
inherited org.springframework.jdbc.support package dependency. When the
compiler plugin is taken out of the build, the bundle plugin correctly
imports it. Of course, leaving out the compiler plugin means that 1.5
source does not compile!
One workaround is to explicitly add the inherited package dependency in
the Import-Package instruction, but it's a bit painful having to do
this. Has anyone else experienced this?
Thanks,
James.
Notice to recipient:
The information in this internet e-mail and any attachments is confidential and
may be privileged. It is intended solely for the addressee. If you are not the
intended addressee please notify the sender immediately by telephone. If you
are not the intended recipient, any disclosure, copying, distribution or any
action taken or omitted to be taken in reliance on it, is prohibited and may be
unlawful.
When addressed to external clients any opinions or advice contained in this
internet e-mail are subject to the terms and conditions expressed in any
applicable governing terms of business or client engagement letter issued by
the pertinent Bank of America group entity.
If this email originates from the U.K. please note that Bank of America, N.A.,
London Branch and Banc of America Securities Limited are authorised and
regulated by the Financial Services Authority. For all U.K. corporate
disclosures, please refer to www.bankofamerica.com/ukcompanies