Skip to content

Commit 8d8b1cd

Browse files
committed
Add META-INF/LICENSE. Closes #153.
1 parent b579445 commit 8d8b1cd

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

pom.xml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,44 @@
5454
</activation>
5555
<build>
5656
<plugins>
57+
<plugin>
58+
<groupId>org.codehaus.mojo</groupId>
59+
<artifactId>build-helper-maven-plugin</artifactId>
60+
<executions>
61+
<execution>
62+
<id>include-license</id>
63+
<phase>generate-resources</phase>
64+
<goals>
65+
<goal>add-resource</goal>
66+
</goals>
67+
<configuration>
68+
<resources>
69+
<resource>
70+
<directory>${project.build.directory}/generated-resources</directory>
71+
</resource>
72+
</resources>
73+
</configuration>
74+
</execution>
75+
</executions>
76+
</plugin>
77+
<plugin>
78+
<groupId>org.apache.maven.plugins</groupId>
79+
<artifactId>maven-antrun-plugin</artifactId>
80+
<executions>
81+
<execution>
82+
<id>copy-license</id>
83+
<phase>generate-resources</phase>
84+
<goals>
85+
<goal>run</goal>
86+
</goals>
87+
<configuration>
88+
<target>
89+
<copy file="../LICENSE.txt" tofile="${project.build.directory}/generated-resources/META-INF/LICENSE" overwrite="false" failonerror="true" />
90+
</target>
91+
</configuration>
92+
</execution>
93+
</executions>
94+
</plugin>
5795
<plugin>
5896
<groupId>org.apache.maven.plugins</groupId>
5997
<artifactId>maven-source-plugin</artifactId>
@@ -82,6 +120,36 @@
82120
</plugins>
83121
</build>
84122
</profile>
123+
<profile>
124+
<id>java-test</id>
125+
<activation>
126+
<file>
127+
<exists>src/test</exists>
128+
</file>
129+
</activation>
130+
<build>
131+
<plugins>
132+
<plugin>
133+
<groupId>org.apache.maven.plugins</groupId>
134+
<artifactId>maven-antrun-plugin</artifactId>
135+
<executions>
136+
<execution>
137+
<id>copy-license-for-test</id>
138+
<phase>generate-test-resources</phase>
139+
<goals>
140+
<goal>run</goal>
141+
</goals>
142+
<configuration>
143+
<target>
144+
<copy file="../LICENSE.txt" tofile="${project.build.directory}/test-classes/META-INF/LICENSE" overwrite="false" failonerror="true" />
145+
</target>
146+
</configuration>
147+
</execution>
148+
</executions>
149+
</plugin>
150+
</plugins>
151+
</build>
152+
</profile>
85153
<profile>
86154
<id>osgi</id>
87155
<activation>

xstream-distribution/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
<artifactId>maven-antrun-plugin</artifactId>
8080
<executions>
8181
<execution>
82+
<id>process-xsite</id>
8283
<phase>package</phase>
8384
<goals>
8485
<goal>run</goal>

xstream/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@
186186
<configuration>
187187
<includes>
188188
<include>**/AbstractAcceptanceTest.*</include>
189+
<include>META-INF/LICENSE</include>
189190
</includes>
190191
<archive combine.children="append">
191192
<manifestEntries>

0 commit comments

Comments
 (0)