You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Florian Brunner (JIRA)" <ji...@apache.org> on 2018/11/12 23:22:01 UTC

[jira] [Commented] (FELIX-5980) Maven Bundle Plugin Regression: incorrect filtering

    [ https://issues.apache.org/jira/browse/FELIX-5980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16684475#comment-16684475 ] 

Florian Brunner commented on FELIX-5980:
----------------------------------------

I attached a small sample project: [^bundle-plugin-filtering-issue.tar.gz]

> Maven Bundle Plugin Regression: incorrect filtering
> ---------------------------------------------------
>
>                 Key: FELIX-5980
>                 URL: https://issues.apache.org/jira/browse/FELIX-5980
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-4.1.0
>            Reporter: Florian Brunner
>            Priority: Critical
>         Attachments: bundle-plugin-filtering-issue.tar.gz
>
>
> With Maven resource filtering enabled, the following Maven Bunde Plugin configuration
> {code:java}
>              <plugin>
>                 <groupId>org.apache.felix</groupId>
>                 <artifactId>maven-bundle-plugin</artifactId>
>                 <extensions>true</extensions>  
>                 <configuration>
>                     <versions>
>                         <module-a.osgi.version.clean>${project.version}</module-a.osgi.version.clean>
>                     </versions>
>                 </configuration>
>                 <executions>
>                     <execution>
>                         <phase>generate-sources</phase>
>                         <goals>
>                             <goal>cleanVersions</goal>
>                         </goals>
>                     </execution>
>                 </executions>     
>             </plugin>
> {code}
> filters the following file:
> {code:java}
> org.osgi.framework.system.packages.extra=${module-a.packages}
> module-a.packages=${module-b.packages}, \
> issue.bundleplugin.filtering;version="${module-a.osgi.version.clean}", \
> ${foo-${foo.specification.version}}
> foo-1=org.foo
> {code}
> correctly to target/classes:
> {code:java}
> org.osgi.framework.system.packages.extra=${module-a.packages}
> module-a.packages=${module-b.packages}, \
> issue.bundleplugin.filtering;version="0.1.0.SNAPSHOT", \
> ${foo-${foo.specification.version}}
> foo-1=org.foo{code}
> but the bundle goal then adds the following properties file to the bundle JAR:
> {code:java}
> org.osgi.framework.system.packages.extra=${module-a.packages}
> module-a.packages=${module-b.packages}, \
> issue.bundleplugin.filtering;version="0.1.0.SNAPSHOT", \
> foo-1=org.foo
> {code}
> ${foo-${foo.specification.version}} got stripped to empty string!
> Affected version: 4.1.0
> It used to work with version 3.5.0 -> regression
> I see two issues:
>  # ${foo-${foo.specification.version}} got stripped to empty string
>  # The bunde goal should just be about packaging. It should not change files from target/classes at all.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)