|
24 | 24 | <modelVersion>4.0.0</modelVersion> |
25 | 25 | <groupId>com.github.package-url</groupId> |
26 | 26 | <artifactId>packageurl-java</artifactId> |
27 | | - <version>1.6.0-SNAPSHOT</version> |
| 27 | + <version>2.0.0-SNAPSHOT</version> |
28 | 28 | <packaging>jar</packaging> |
29 | 29 |
|
30 | 30 | <name>Package URL</name> |
|
113 | 113 | <bnd.maven.plugin.version>7.1.0</bnd.maven.plugin.version> |
114 | 114 | <builder.helper.maven.plugin.version>3.6.0</builder.helper.maven.plugin.version> |
115 | 115 | <cyclonedx-maven-plugin.version>2.9.1</cyclonedx-maven-plugin.version> |
| 116 | + <exec.maven.plugin.version>3.5.0</exec.maven.plugin.version> |
116 | 117 | <maven.clean.plugin.version>3.4.1</maven.clean.plugin.version> |
117 | 118 | <maven.compiler.plugin.version>3.14.0</maven.compiler.plugin.version> |
| 119 | + <maven.dependency.plugin.version>3.8.1</maven.dependency.plugin.version> |
118 | 120 | <maven.deploy.plugin.version>3.1.4</maven.deploy.plugin.version> |
119 | 121 | <maven.enforcer.plugin.version>3.5.0</maven.enforcer.plugin.version> |
120 | 122 | <maven.gpg.plugin.version>3.2.7</maven.gpg.plugin.version> |
|
136 | 138 | <com.github.spotbugs.version>4.9.3</com.github.spotbugs.version> |
137 | 139 | <!-- Dependency versions --> |
138 | 140 | <jakarta.validation-api.version>3.1.1</jakarta.validation-api.version> |
| 141 | + <jmh.version>1.37</jmh.version> |
139 | 142 | <json.version>20250107</json.version> |
140 | 143 | <junit-bom.version>5.12.1</junit-bom.version> |
141 | 144 | <maven-surefire-junit5-tree-reporter.version>1.4.0</maven-surefire-junit5-tree-reporter.version> |
|
175 | 178 | <scope>provided</scope> |
176 | 179 | <optional>true</optional> |
177 | 180 | </dependency> |
| 181 | + <dependency> |
| 182 | + <groupId>org.openjdk.jmh</groupId> |
| 183 | + <artifactId>jmh-core</artifactId> |
| 184 | + <version>${jmh.version}</version> |
| 185 | + <scope>test</scope> |
| 186 | + </dependency> |
178 | 187 | <dependency> |
179 | 188 | <groupId>org.json</groupId> |
180 | 189 | <artifactId>json</artifactId> |
|
265 | 274 | </pluginManagement> |
266 | 275 | <plugins> |
267 | 276 | <!-- |
268 | | - ~ Parses the version into components. |
269 | | - ~ |
270 | | - ~ The parsed version is used to generate the `Specification-Version` manifest header. |
271 | | - --> |
| 277 | + ~ Parses the version into components. |
| 278 | + ~ |
| 279 | + ~ The parsed version is used to generate the `Specification-Version` manifest header. |
| 280 | + --> |
272 | 281 | <plugin> |
273 | 282 | <groupId>org.codehaus.mojo</groupId> |
274 | 283 | <artifactId>build-helper-maven-plugin</artifactId> |
|
316 | 325 | <!-- Error Prone plugin --> |
317 | 326 | <arg>-XDcompilePolicy=simple</arg> |
318 | 327 | <arg>--should-stop=ifError=FLOW</arg> |
319 | | - <arg>-Xplugin:ErrorProne</arg> |
| 328 | + <arg>-Xplugin:ErrorProne -XepExcludedPaths:.*/generated-test-sources/.*</arg> |
320 | 329 | <!-- |
321 | | - ~ Due to a bug in IntelliJ IDEA, annotation processing MUST be enabled. |
322 | | - ~ Failing to do so will cause IDEA to ignore the annotation processor path |
323 | | - ~ and choke on the Error Prone compiler arguments. |
324 | | - ~ |
325 | | - ~ On the other hand, we cannot pass an empty `annotationProcessors` list to Maven, |
326 | | - ~ since the `-processor` compiler argument requires at least one processor class name. |
327 | | - ~ |
328 | | - ~ If you add an annotation processor, please also add an `annotationProcessors` configuration |
329 | | - ~ option. |
330 | | - --> |
| 330 | + ~ Due to a bug in IntelliJ IDEA, annotation processing MUST be enabled. |
| 331 | + ~ Failing to do so will cause IDEA to ignore the annotation processor path |
| 332 | + ~ and choke on the Error Prone compiler arguments. |
| 333 | + ~ |
| 334 | + ~ On the other hand, we cannot pass an empty `annotationProcessors` list to Maven, |
| 335 | + ~ since the `-processor` compiler argument requires at least one processor class name. |
| 336 | + ~ |
| 337 | + ~ If you add an annotation processor, please also add an `annotationProcessors` configuration |
| 338 | + ~ option. |
| 339 | + --> |
331 | 340 | </compilerArgs> |
332 | 341 | <annotationProcessorPaths> |
333 | 342 | <path> |
|
337 | 346 | </path> |
338 | 347 | </annotationProcessorPaths> |
339 | 348 | </configuration> |
| 349 | + <executions> |
| 350 | + <execution> |
| 351 | + <id>default-testCompile</id> |
| 352 | + <configuration> |
| 353 | + <compilerArgs combine.children="append"> |
| 354 | + <arg>-proc:full</arg> |
| 355 | + </compilerArgs> |
| 356 | + <annotationProcessors> |
| 357 | + <processor>org.openjdk.jmh.generators.BenchmarkProcessor</processor> |
| 358 | + </annotationProcessors> |
| 359 | + <annotationProcessorPaths combine.children="append"> |
| 360 | + <path> |
| 361 | + <groupId>org.openjdk.jmh</groupId> |
| 362 | + <artifactId>jmh-generator-annprocess</artifactId> |
| 363 | + <version>${jmh.version}</version> |
| 364 | + </path> |
| 365 | + </annotationProcessorPaths> |
| 366 | + </configuration> |
| 367 | + </execution> |
| 368 | + </executions> |
340 | 369 | </plugin> |
341 | 370 | <plugin> |
342 | 371 | <groupId>com.diffplug.spotless</groupId> |
|
602 | 631 | </plugins> |
603 | 632 | </build> |
604 | 633 | </profile> |
| 634 | + |
| 635 | + <profile> |
| 636 | + <id>benchmark</id> |
| 637 | + <properties> |
| 638 | + <jmh.args>.*</jmh.args> |
| 639 | + <skipTests>true</skipTests> |
| 640 | + </properties> |
| 641 | + <build> |
| 642 | + <defaultGoal>test-compile |
| 643 | + dependency:build-classpath@build-classpath |
| 644 | + exec:exec@run-benchmark</defaultGoal> |
| 645 | + <plugins> |
| 646 | + <plugin> |
| 647 | + <groupId>org.apache.maven.plugins</groupId> |
| 648 | + <artifactId>maven-dependency-plugin</artifactId> |
| 649 | + <version>${maven.dependency.plugin.version}</version> |
| 650 | + <executions> |
| 651 | + <execution> |
| 652 | + <id>build-classpath</id> |
| 653 | + <goals> |
| 654 | + <goal>build-classpath</goal> |
| 655 | + </goals> |
| 656 | + <configuration> |
| 657 | + <includeScope>test</includeScope> |
| 658 | + <outputProperty>test.classpath</outputProperty> |
| 659 | + </configuration> |
| 660 | + </execution> |
| 661 | + </executions> |
| 662 | + </plugin> |
| 663 | + <plugin> |
| 664 | + <groupId>org.codehaus.mojo</groupId> |
| 665 | + <artifactId>exec-maven-plugin</artifactId> |
| 666 | + <version>${exec.maven.plugin.version}</version> |
| 667 | + <executions> |
| 668 | + <execution> |
| 669 | + <id>run-benchmark</id> |
| 670 | + <goals> |
| 671 | + <goal>exec</goal> |
| 672 | + </goals> |
| 673 | + <configuration> |
| 674 | + <executable>${java.home}/bin/java</executable> |
| 675 | + <commandlineArgs>-cp target/classes:target/test-classes:${test.classpath} org.openjdk.jmh.Main ${jmh.args}</commandlineArgs> |
| 676 | + </configuration> |
| 677 | + </execution> |
| 678 | + </executions> |
| 679 | + </plugin> |
| 680 | + </plugins> |
| 681 | + </build> |
| 682 | + </profile> |
605 | 683 | </profiles> |
606 | 684 | </project> |
0 commit comments