Skip to content

Commit

Permalink
Merge pull request #5379 from bjhargrave/issues/5375
Browse files Browse the repository at this point in the history
maven: Document access to Maven properties in Bnd instructions
  • Loading branch information
bjhargrave committed Sep 26, 2022
2 parents 59aa0e6 + cda1054 commit 92599f4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions maven/bnd-maven-plugin/README.md
Expand Up @@ -180,6 +180,28 @@ The plugin will by default set some OSGi bundle headers derived from [pom elemen
| `Bundle-Developers` | `developers` (child element `id` must be set on each developer) |
| `Bundle-DocURL` | `url` |

### POM Properties

The Bnd instructions can reference properties defined for the Maven project and Maven settings using the `project.` and `settings.` stems, respectively.
Other properties defined in the POM can also be referenced.

```xml
<properties>
<implementation.vendor>Acme Inc.</implementation.vendor>
</properties>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<configuration>
<bnd><![CDATA[
Implementation-Title: ${project.name}
Implementation-Version: ${project.version}
Implementation-Vendor: ${implementation.vendor}
]]></bnd>
</configuration>
</plugin>
```

### Reproducible Builds

If the configuration parameter `outputTimestamp` is set, indicating [reproducible][1] output, this plugin will automatically use the following Bnd instructions, if not otherwise configured.
Expand Down

0 comments on commit 92599f4

Please sign in to comment.