|
249 | 249 | <artifactId>central-publishing-maven-plugin</artifactId> |
250 | 250 | </plugin> |
251 | 251 | </plugins> |
| 252 | + |
| 253 | + <resources> |
| 254 | + <resource> |
| 255 | + <directory>src/main/resources</directory> |
| 256 | + </resource> |
| 257 | + <!-- The project's license and notice go into every jar, where they reach |
| 258 | + those who get the library from Maven Central rather than from this |
| 259 | + repository. Every module sits directly below the root. --> |
| 260 | + <resource> |
| 261 | + <directory>${project.basedir}/..</directory> |
| 262 | + <targetPath>META-INF</targetPath> |
| 263 | + <includes> |
| 264 | + <include>LICENSE</include> |
| 265 | + <include>NOTICE</include> |
| 266 | + </includes> |
| 267 | + </resource> |
| 268 | + </resources> |
252 | 269 | </build> |
253 | 270 |
|
254 | 271 | <profiles> |
|
264 | 281 | <groupId>org.apache.maven.plugins</groupId> |
265 | 282 | <artifactId>maven-javadoc-plugin</artifactId> |
266 | 283 | </plugin> |
| 284 | + <!-- The javadoc jar is made of what javadoc writes, not of the resources, |
| 285 | + so the license and notice are put next to the pages before it is |
| 286 | + packed. The notice covers the parts of the API docs taken from the |
| 287 | + W3C specification. --> |
| 288 | + <plugin> |
| 289 | + <groupId>org.apache.maven.plugins</groupId> |
| 290 | + <artifactId>maven-resources-plugin</artifactId> |
| 291 | + <executions> |
| 292 | + <execution> |
| 293 | + <id>javadoc-licenses</id> |
| 294 | + <phase>prepare-package</phase> |
| 295 | + <goals> |
| 296 | + <goal>copy-resources</goal> |
| 297 | + </goals> |
| 298 | + <configuration> |
| 299 | + <outputDirectory>${project.build.directory}/reports/apidocs/META-INF</outputDirectory> |
| 300 | + <resources> |
| 301 | + <resource> |
| 302 | + <directory>${project.basedir}/..</directory> |
| 303 | + <includes> |
| 304 | + <include>LICENSE</include> |
| 305 | + <include>NOTICE</include> |
| 306 | + </includes> |
| 307 | + </resource> |
| 308 | + </resources> |
| 309 | + </configuration> |
| 310 | + </execution> |
| 311 | + </executions> |
| 312 | + </plugin> |
267 | 313 | <plugin> |
268 | 314 | <groupId>org.apache.maven.plugins</groupId> |
269 | 315 | <artifactId>maven-gpg-plugin</artifactId> |
|
0 commit comments