Mark Raynsford wrote:
> Spoke a bit too soon. I'm using the bnd-maven-plugin, but I don't think
> that changes anything. I have:
> 
>         <plugin>
>           <groupId>biz.aQute.bnd</groupId>
>           <artifactId>bnd-maven-plugin</artifactId>
>           <version>${io7m.bnd-maven-plugin.version}</version>
>           <configuration>
>             <bnd><![CDATA[
>               Bundle-Description: ${project.description}
>               Bundle-License: ${project.licenses[0].name}
> ]]></bnd>
>           </configuration>
>         </plugin>
> 
> Unfortunately, the resulting bundle manifest is:
> 
>   Bundle-Description  Contract checking      
>   Bundle-License      ${project.licenses[0].name}              
> 
> It seems that the array reference isn't being expanded. If I specify
> ${project.licenses}, I instead get:
> 
>   Bundle-License      [org.apache.maven.model.License@3eba57a7]
> 
> ... which is clearly the result of calling toString() on something
> that hasn't overridden it. Point is that the project.licenses property
> is definitely present, it's just that I'm unable to access any of the
> elements.

That is odd. I just rebuild my project [1] again and checked
MANIFEST.MF, as included in the JAR, and everything is as it should be:

> Bundle-License: https://www.eclipse.org/legal/epl-v10.html;description
>  ="Eclipse Public License"

Maybe it depends on the Maven version (here: 3.5.2)? Try to clone the
above Github repository, do a "mvn clean verify" and check what "unzip
-p
bundles/com.ctrlflow.aer.client.dto/target/com.ctrlflow.aer.client.dto-2.0.2-SNAPSHOT.jar
META-INF/MANIFEST.MF" outputs for you.

Also, check what "mvn help:effective-pom" produces on your project vs.
my project.

Hope this helps to diagnose the issue.

Best wishes,

Andreas

[1] <https://github.com/codetrails/ctrlflow-aer-client>

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to