|
111 | 111 | </dependency> |
112 | 112 |
|
113 | 113 | <dependency> |
| 114 | + <!-- compile-time annotation processor; not needed by consumers at runtime --> |
114 | 115 | <groupId>org.projectlombok</groupId> |
115 | 116 | <artifactId>lombok</artifactId> |
116 | 117 | <version>1.18.42</version> |
117 | 118 | <scope>provided</scope> |
| 119 | + <optional>true</optional> |
118 | 120 | </dependency> |
119 | 121 |
|
120 | 122 | <dependency> |
121 | 123 | <!-- used so that lombok can generate suppressions for spotbugs. It needs to find it on the relevant classpath --> |
| 124 | + <!-- compile-time only; not needed by consumers at runtime --> |
122 | 125 | <groupId>com.github.spotbugs</groupId> |
123 | 126 | <artifactId>spotbugs</artifactId> |
124 | 127 | <version>4.9.8</version> |
125 | 128 | <scope>provided</scope> |
| 129 | + <optional>true</optional> |
126 | 130 | </dependency> |
127 | 131 |
|
128 | 132 | <!-- end provided --> |
|
258 | 262 | </argLine> |
259 | 263 | </configuration> |
260 | 264 | </plugin> |
| 265 | + |
| 266 | + <!-- flatten the POM that gets deployed to Maven Central, removing test deps, and in-lining parent elements --> |
| 267 | + <plugin> |
| 268 | + <groupId>org.codehaus.mojo</groupId> |
| 269 | + <artifactId>flatten-maven-plugin</artifactId> |
| 270 | + <version>1.7.0</version> |
| 271 | + <configuration> |
| 272 | + <flattenMode>ossrh</flattenMode> |
| 273 | + </configuration> |
| 274 | + <executions> |
| 275 | + <execution> |
| 276 | + <id>flatten</id> |
| 277 | + <phase>process-resources</phase> |
| 278 | + <goals> |
| 279 | + <goal>flatten</goal> |
| 280 | + </goals> |
| 281 | + </execution> |
| 282 | + <execution> |
| 283 | + <id>flatten.clean</id> |
| 284 | + <phase>clean</phase> |
| 285 | + <goals> |
| 286 | + <goal>clean</goal> |
| 287 | + </goals> |
| 288 | + </execution> |
| 289 | + </executions> |
| 290 | + </plugin> |
| 291 | + |
| 292 | + <!-- bundle the root LICENSE file into published JARs --> |
| 293 | + <plugin> |
| 294 | + <groupId>org.apache.maven.plugins</groupId> |
| 295 | + <artifactId>maven-resources-plugin</artifactId> |
| 296 | + <version>3.5.0</version> |
| 297 | + <executions> |
| 298 | + <execution> |
| 299 | + <id>copy-license</id> |
| 300 | + <phase>process-resources</phase> |
| 301 | + <goals> |
| 302 | + <goal>copy-resources</goal> |
| 303 | + </goals> |
| 304 | + <configuration> |
| 305 | + <outputDirectory>${project.build.outputDirectory}/META-INF</outputDirectory> |
| 306 | + <resources> |
| 307 | + <resource> |
| 308 | + <directory>${maven.multiModuleProjectDirectory}</directory> |
| 309 | + <includes> |
| 310 | + <include>LICENSE</include> |
| 311 | + </includes> |
| 312 | + </resource> |
| 313 | + </resources> |
| 314 | + </configuration> |
| 315 | + </execution> |
| 316 | + </executions> |
| 317 | + </plugin> |
261 | 318 | </plugins> |
262 | 319 | </build> |
263 | 320 | <profiles> |
|
0 commit comments