Skip to content

Commit 08cf925

Browse files
authored
fix: include license files in release source jars (#2250)
## Summary - Include repo-level `LICENSE` and `NOTICE` files as `META-INF` resources during release builds. - Ensures generated `*-sources.jar` artifacts contain license information for legal/compliance scanners. ## Verification - Confirmed affected source jars include: - `META-INF/LICENSE` - `META-INF/NOTICE` - Ran targeted module tests: - `prometheus-metrics-config`: 59 tests passed Fixes #2216 Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
1 parent 94e9130 commit 08cf925

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

‎prometheus-metrics-parent/pom.xml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,32 @@
7373
<id>release</id>
7474
<build>
7575
<plugins>
76+
<plugin>
77+
<groupId>org.codehaus.mojo</groupId>
78+
<artifactId>build-helper-maven-plugin</artifactId>
79+
<version>3.6.1</version>
80+
<executions>
81+
<execution>
82+
<id>add-license-resources</id>
83+
<phase>generate-resources</phase>
84+
<goals>
85+
<goal>add-resource</goal>
86+
</goals>
87+
<configuration>
88+
<resources>
89+
<resource>
90+
<directory>${maven.multiModuleProjectDirectory}</directory>
91+
<targetPath>META-INF</targetPath>
92+
<includes>
93+
<include>LICENSE</include>
94+
<include>NOTICE</include>
95+
</includes>
96+
</resource>
97+
</resources>
98+
</configuration>
99+
</execution>
100+
</executions>
101+
</plugin>
76102
<plugin>
77103
<groupId>org.apache.maven.plugins</groupId>
78104
<artifactId>maven-gpg-plugin</artifactId>

0 commit comments

Comments
 (0)