diff --git a/dependencies.md b/dependencies.md index 816ba1e0..1bc5a450 100644 --- a/dependencies.md +++ b/dependencies.md @@ -11,7 +11,7 @@ | [Jakarta JSON Processing API][2] | [Eclipse Public License 2.0][3]; [GNU General Public License, version 2 with the GNU Classpath Exception][4] | | [JSON-B API][5] | [Eclipse Public License 2.0][3]; [GNU General Public License, version 2 with the GNU Classpath Exception][4] | | [org.eclipse.yasson][6] | [Eclipse Public License v. 2.0][7]; [Eclipse Distribution License v. 1.0][8] | -| [error-reporting-java][9] | [MIT][10] | +| [error-reporting-java][9] | [MIT License][10] | | [JGit - Core][11] | Eclipse Distribution License (New BSD License) | ### Test Dependencies @@ -48,15 +48,15 @@ | [Apache Maven Source Plugin][34] | [Apache License, Version 2.0][18] | | [Apache Maven Javadoc Plugin][35] | [Apache License, Version 2.0][18] | | [Nexus Staging Maven Plugin][36] | [Eclipse Public License][37] | -| [Lombok Maven Plugin][38] | [The MIT License][10] | -| [JaCoCo :: Maven Plugin][39] | [Eclipse Public License 2.0][40] | -| [error-code-crawler-maven-plugin][41] | [MIT License][42] | -| [Reproducible Build Maven Plugin][43] | [Apache 2.0][29] | -| [Maven Clean Plugin][44] | [The Apache Software License, Version 2.0][29] | -| [Maven Resources Plugin][45] | [The Apache Software License, Version 2.0][29] | -| [Maven JAR Plugin][46] | [The Apache Software License, Version 2.0][29] | -| [Maven Install Plugin][47] | [The Apache Software License, Version 2.0][29] | -| [Maven Site Plugin 3][48] | [The Apache Software License, Version 2.0][29] | +| [Lombok Maven Plugin][38] | [The MIT License][39] | +| [JaCoCo :: Maven Plugin][40] | [Eclipse Public License 2.0][41] | +| [error-code-crawler-maven-plugin][42] | [MIT License][43] | +| [Reproducible Build Maven Plugin][44] | [Apache 2.0][29] | +| [Maven Clean Plugin][45] | [The Apache Software License, Version 2.0][29] | +| [Maven Resources Plugin][46] | [The Apache Software License, Version 2.0][29] | +| [Maven JAR Plugin][47] | [The Apache Software License, Version 2.0][29] | +| [Maven Install Plugin][48] | [The Apache Software License, Version 2.0][29] | +| [Maven Site Plugin 3][49] | [The Apache Software License, Version 2.0][29] | ## Project Keeper Core @@ -64,29 +64,29 @@ | Dependency | License | | ----------------------------------------- | ---------------------------------------------- | -| [Project-Keeper shared model classes][49] | [The MIT License][50] | -| [jaxb-api][51] | [CDDL 1.1][52]; [GPL2 w/ CPE][52] | -| [JAXB Runtime][53] | [Eclipse Distribution License - v 1.0][8] | -| [org.xmlunit:xmlunit-core][54] | [The Apache Software License, Version 2.0][29] | -| [error-reporting-java][9] | [MIT][10] | -| [Markdown Generator][55] | [The Apache Software License, Version 2.0][29] | -| [semver4j][56] | [The MIT License][22] | +| [Project-Keeper shared model classes][50] | [The MIT License][51] | +| [jaxb-api][52] | [CDDL 1.1][53]; [GPL2 w/ CPE][53] | +| [JAXB Runtime][54] | [Eclipse Distribution License - v 1.0][8] | +| [org.xmlunit:xmlunit-core][55] | [The Apache Software License, Version 2.0][29] | +| [error-reporting-java][9] | [MIT License][10] | +| [Markdown Generator][56] | [The Apache Software License, Version 2.0][29] | +| [semver4j][57] | [The MIT License][22] | | [Project Lombok][0] | [The MIT License][1] | -| [SnakeYAML][57] | [Apache License, Version 2.0][29] | -| [Maven Model][58] | [Apache License, Version 2.0][18] | +| [SnakeYAML][58] | [Apache License, Version 2.0][29] | +| [Maven Model][59] | [Apache License, Version 2.0][18] | ### Test Dependencies | Dependency | License | | ----------------------------------------- | ---------------------------------------------- | -| [Project Keeper shared test setup][49] | [The MIT License][50] | -| [Maven Project Version Getter][59] | [MIT License][60] | +| [Project Keeper shared test setup][50] | [The MIT License][51] | +| [Maven Project Version Getter][60] | [MIT License][61] | | [JUnit Jupiter Engine][12] | [Eclipse Public License v2.0][13] | | [JUnit Jupiter Params][12] | [Eclipse Public License v2.0][13] | | [Hamcrest][14] | [BSD License 3][15] | -| [org.xmlunit:xmlunit-matchers][54] | [The Apache Software License, Version 2.0][29] | +| [org.xmlunit:xmlunit-matchers][55] | [The Apache Software License, Version 2.0][29] | | [mockito-junit-jupiter][19] | [The MIT License][20] | -| [Maven Plugin Integration Testing][61] | [MIT License][62] | +| [Maven Plugin Integration Testing][62] | [MIT License][63] | | [EqualsVerifier | release normal jar][17] | [Apache License, Version 2.0][18] | | [SLF4J JDK14 Binding][21] | [MIT License][22] | @@ -94,7 +94,7 @@ | Dependency | License | | ----------------------------------------- | --------------------- | -| [Project keeper Java project crawler][49] | [The MIT License][50] | +| [Project keeper Java project crawler][50] | [The MIT License][51] | ### Plugin Dependencies @@ -104,7 +104,7 @@ | [Apache Maven Compiler Plugin][25] | [Apache License, Version 2.0][18] | | [Apache Maven Enforcer Plugin][26] | [Apache License, Version 2.0][18] | | [Maven Flatten Plugin][27] | [Apache Software Licenese][18] | -| [Apache Maven JAR Plugin][63] | [Apache License, Version 2.0][18] | +| [Apache Maven JAR Plugin][64] | [Apache License, Version 2.0][18] | | [org.sonatype.ossindex.maven:ossindex-maven-plugin][28] | [ASL2][29] | | [Maven Surefire Plugin][30] | [Apache License, Version 2.0][18] | | [Versions Maven Plugin][31] | [Apache License, Version 2.0][18] | @@ -113,15 +113,15 @@ | [Apache Maven Source Plugin][34] | [Apache License, Version 2.0][18] | | [Apache Maven Javadoc Plugin][35] | [Apache License, Version 2.0][18] | | [Nexus Staging Maven Plugin][36] | [Eclipse Public License][37] | -| [Lombok Maven Plugin][38] | [The MIT License][10] | -| [Maven Failsafe Plugin][64] | [Apache License, Version 2.0][18] | -| [JaCoCo :: Maven Plugin][39] | [Eclipse Public License 2.0][40] | -| [error-code-crawler-maven-plugin][41] | [MIT License][42] | -| [Reproducible Build Maven Plugin][43] | [Apache 2.0][29] | -| [Maven Clean Plugin][44] | [The Apache Software License, Version 2.0][29] | -| [Maven Resources Plugin][45] | [The Apache Software License, Version 2.0][29] | -| [Maven Install Plugin][47] | [The Apache Software License, Version 2.0][29] | -| [Maven Site Plugin 3][48] | [The Apache Software License, Version 2.0][29] | +| [Lombok Maven Plugin][38] | [The MIT License][39] | +| [Maven Failsafe Plugin][65] | [Apache License, Version 2.0][18] | +| [JaCoCo :: Maven Plugin][40] | [Eclipse Public License 2.0][41] | +| [error-code-crawler-maven-plugin][42] | [MIT License][43] | +| [Reproducible Build Maven Plugin][44] | [Apache 2.0][29] | +| [Maven Clean Plugin][45] | [The Apache Software License, Version 2.0][29] | +| [Maven Resources Plugin][46] | [The Apache Software License, Version 2.0][29] | +| [Maven Install Plugin][48] | [The Apache Software License, Version 2.0][29] | +| [Maven Site Plugin 3][49] | [The Apache Software License, Version 2.0][29] | ## Project Keeper Command Line Interface @@ -129,19 +129,19 @@ | Dependency | License | | ------------------------- | --------------------------------- | -| [Project keeper core][49] | [The MIT License][50] | -| [error-reporting-java][9] | [MIT][10] | -| [Maven Model][58] | [Apache License, Version 2.0][18] | +| [Project keeper core][50] | [The MIT License][51] | +| [error-reporting-java][9] | [MIT License][10] | +| [Maven Model][59] | [Apache License, Version 2.0][18] | ### Test Dependencies | Dependency | License | | -------------------------------------- | --------------------------------- | -| [Project Keeper shared test setup][49] | [The MIT License][50] | +| [Project Keeper shared test setup][50] | [The MIT License][51] | | [JUnit Jupiter Engine][12] | [Eclipse Public License v2.0][13] | | [JUnit Jupiter Params][12] | [Eclipse Public License v2.0][13] | | [Hamcrest][14] | [BSD License 3][15] | -| [Maven Project Version Getter][59] | [MIT License][60] | +| [Maven Project Version Getter][60] | [MIT License][61] | ### Runtime Dependencies @@ -160,22 +160,22 @@ | [org.sonatype.ossindex.maven:ossindex-maven-plugin][28] | [ASL2][29] | | [Maven Surefire Plugin][30] | [Apache License, Version 2.0][18] | | [Versions Maven Plugin][31] | [Apache License, Version 2.0][18] | -| [Apache Maven Assembly Plugin][65] | [Apache License, Version 2.0][18] | -| [Apache Maven JAR Plugin][63] | [Apache License, Version 2.0][18] | -| [Artifact reference checker and unifier][66] | [MIT License][67] | +| [Apache Maven Assembly Plugin][66] | [Apache License, Version 2.0][18] | +| [Apache Maven JAR Plugin][64] | [Apache License, Version 2.0][18] | +| [Artifact reference checker and unifier][67] | [MIT License][68] | | [Apache Maven Deploy Plugin][32] | [Apache License, Version 2.0][18] | | [Apache Maven GPG Plugin][33] | [Apache License, Version 2.0][18] | | [Apache Maven Source Plugin][34] | [Apache License, Version 2.0][18] | | [Apache Maven Javadoc Plugin][35] | [Apache License, Version 2.0][18] | | [Nexus Staging Maven Plugin][36] | [Eclipse Public License][37] | -| [Maven Failsafe Plugin][64] | [Apache License, Version 2.0][18] | -| [JaCoCo :: Maven Plugin][39] | [Eclipse Public License 2.0][40] | -| [error-code-crawler-maven-plugin][41] | [MIT License][42] | -| [Reproducible Build Maven Plugin][43] | [Apache 2.0][29] | -| [Maven Clean Plugin][44] | [The Apache Software License, Version 2.0][29] | -| [Maven Resources Plugin][45] | [The Apache Software License, Version 2.0][29] | -| [Maven Install Plugin][47] | [The Apache Software License, Version 2.0][29] | -| [Maven Site Plugin 3][48] | [The Apache Software License, Version 2.0][29] | +| [Maven Failsafe Plugin][65] | [Apache License, Version 2.0][18] | +| [JaCoCo :: Maven Plugin][40] | [Eclipse Public License 2.0][41] | +| [error-code-crawler-maven-plugin][42] | [MIT License][43] | +| [Reproducible Build Maven Plugin][44] | [Apache 2.0][29] | +| [Maven Clean Plugin][45] | [The Apache Software License, Version 2.0][29] | +| [Maven Resources Plugin][46] | [The Apache Software License, Version 2.0][29] | +| [Maven Install Plugin][48] | [The Apache Software License, Version 2.0][29] | +| [Maven Site Plugin 3][49] | [The Apache Software License, Version 2.0][29] | ## Project Keeper Maven Plugin @@ -183,28 +183,28 @@ | Dependency | License | | ----------------------------------------- | ---------------------------------------------- | -| [Project keeper core][49] | [The MIT License][50] | -| [Maven Plugin Tools Java Annotations][68] | [Apache License, Version 2.0][18] | -| [Maven Plugin API][69] | [Apache License, Version 2.0][18] | -| [Maven Project Builder][70] | [The Apache Software License, Version 2.0][29] | -| [Maven Core][71] | [Apache License, Version 2.0][18] | -| [error-reporting-java][9] | [MIT][10] | +| [Project keeper core][50] | [The MIT License][51] | +| [Maven Plugin Tools Java Annotations][69] | [Apache License, Version 2.0][18] | +| [Maven Plugin API][70] | [Apache License, Version 2.0][18] | +| [Maven Project Builder][71] | [The Apache Software License, Version 2.0][29] | +| [Maven Core][72] | [Apache License, Version 2.0][18] | +| [error-reporting-java][9] | [MIT License][10] | | [Project Lombok][0] | [The MIT License][1] | ### Test Dependencies | Dependency | License | | -------------------------------------- | ---------------------------------------------- | -| [Maven Project Version Getter][59] | [MIT License][60] | +| [Maven Project Version Getter][60] | [MIT License][61] | | [JUnit Jupiter Engine][12] | [Eclipse Public License v2.0][13] | | [JUnit Jupiter Params][12] | [Eclipse Public License v2.0][13] | | [Hamcrest][14] | [BSD License 3][15] | -| [org.xmlunit:xmlunit-matchers][54] | [The Apache Software License, Version 2.0][29] | +| [org.xmlunit:xmlunit-matchers][55] | [The Apache Software License, Version 2.0][29] | | [mockito-core][19] | [The MIT License][20] | -| [JaCoCo :: Core][72] | [Eclipse Public License 2.0][40] | -| [Maven Plugin Integration Testing][61] | [MIT License][62] | +| [JaCoCo :: Core][73] | [Eclipse Public License 2.0][41] | +| [Maven Plugin Integration Testing][62] | [MIT License][63] | | [SLF4J JDK14 Binding][21] | [MIT License][22] | -| [JaCoCo :: Agent][72] | [Eclipse Public License 2.0][40] | +| [JaCoCo :: Agent][73] | [Eclipse Public License 2.0][41] | ### Plugin Dependencies @@ -214,8 +214,8 @@ | [Apache Maven Compiler Plugin][25] | [Apache License, Version 2.0][18] | | [Apache Maven Enforcer Plugin][26] | [Apache License, Version 2.0][18] | | [Maven Flatten Plugin][27] | [Apache Software Licenese][18] | -| [Maven Plugin Plugin][73] | [Apache License, Version 2.0][18] | -| [Apache Maven JAR Plugin][63] | [Apache License, Version 2.0][18] | +| [Maven Plugin Plugin][74] | [Apache License, Version 2.0][18] | +| [Apache Maven JAR Plugin][64] | [Apache License, Version 2.0][18] | | [org.sonatype.ossindex.maven:ossindex-maven-plugin][28] | [ASL2][29] | | [Maven Surefire Plugin][30] | [Apache License, Version 2.0][18] | | [Versions Maven Plugin][31] | [Apache License, Version 2.0][18] | @@ -224,16 +224,16 @@ | [Apache Maven Source Plugin][34] | [Apache License, Version 2.0][18] | | [Apache Maven Javadoc Plugin][35] | [Apache License, Version 2.0][18] | | [Nexus Staging Maven Plugin][36] | [Eclipse Public License][37] | -| [Apache Maven Dependency Plugin][74] | [Apache License, Version 2.0][18] | -| [Lombok Maven Plugin][38] | [The MIT License][10] | -| [Maven Failsafe Plugin][64] | [Apache License, Version 2.0][18] | -| [JaCoCo :: Maven Plugin][39] | [Eclipse Public License 2.0][40] | -| [error-code-crawler-maven-plugin][41] | [MIT License][42] | -| [Reproducible Build Maven Plugin][43] | [Apache 2.0][29] | -| [Maven Clean Plugin][44] | [The Apache Software License, Version 2.0][29] | -| [Maven Resources Plugin][45] | [The Apache Software License, Version 2.0][29] | -| [Maven Install Plugin][47] | [The Apache Software License, Version 2.0][29] | -| [Maven Site Plugin 3][48] | [The Apache Software License, Version 2.0][29] | +| [Apache Maven Dependency Plugin][75] | [Apache License, Version 2.0][18] | +| [Lombok Maven Plugin][38] | [The MIT License][39] | +| [Maven Failsafe Plugin][65] | [Apache License, Version 2.0][18] | +| [JaCoCo :: Maven Plugin][40] | [Eclipse Public License 2.0][41] | +| [error-code-crawler-maven-plugin][42] | [MIT License][43] | +| [Reproducible Build Maven Plugin][44] | [Apache 2.0][29] | +| [Maven Clean Plugin][45] | [The Apache Software License, Version 2.0][29] | +| [Maven Resources Plugin][46] | [The Apache Software License, Version 2.0][29] | +| [Maven Install Plugin][48] | [The Apache Software License, Version 2.0][29] | +| [Maven Site Plugin 3][49] | [The Apache Software License, Version 2.0][29] | ## Project Keeper Java Project Crawler @@ -241,30 +241,29 @@ | Dependency | License | | ----------------------------------------- | ---------------------------------------------- | -| [Project-Keeper shared model classes][49] | [The MIT License][50] | -| [Maven Plugin Tools Java Annotations][68] | [Apache License, Version 2.0][18] | -| [Maven Plugin API][69] | [Apache License, Version 2.0][18] | -| [Maven Project Builder][70] | [The Apache Software License, Version 2.0][29] | -| [error-reporting-java][9] | [MIT][10] | +| [Project-Keeper shared model classes][50] | [The MIT License][51] | +| [Maven Plugin Tools Java Annotations][69] | [Apache License, Version 2.0][18] | +| [Maven Plugin API][70] | [Apache License, Version 2.0][18] | +| [Maven Project Builder][71] | [The Apache Software License, Version 2.0][29] | +| [error-reporting-java][9] | [MIT License][10] | | [JGit - Core][11] | Eclipse Distribution License (New BSD License) | -| [semver4j][56] | [The MIT License][22] | -| [Maven Core][71] | [Apache License, Version 2.0][18] | -| [Apache Commons IO][75] | [Apache License, Version 2.0][18] | +| [semver4j][57] | [The MIT License][22] | +| [Maven Core][72] | [Apache License, Version 2.0][18] | ### Test Dependencies | Dependency | License | | -------------------------------------- | ---------------------------------------------- | -| [Maven Project Version Getter][59] | [MIT License][60] | +| [Maven Project Version Getter][60] | [MIT License][61] | | [JUnit Jupiter Engine][12] | [Eclipse Public License v2.0][13] | | [JUnit Jupiter Params][12] | [Eclipse Public License v2.0][13] | | [Hamcrest][14] | [BSD License 3][15] | -| [org.xmlunit:xmlunit-matchers][54] | [The Apache Software License, Version 2.0][29] | +| [org.xmlunit:xmlunit-matchers][55] | [The Apache Software License, Version 2.0][29] | | [SLF4J JDK14 Binding][21] | [MIT License][22] | | [mockito-core][19] | [The MIT License][20] | -| [JaCoCo :: Core][72] | [Eclipse Public License 2.0][40] | -| [Maven Plugin Integration Testing][61] | [MIT License][62] | -| [JaCoCo :: Agent][72] | [Eclipse Public License 2.0][40] | +| [JaCoCo :: Core][73] | [Eclipse Public License 2.0][41] | +| [Maven Plugin Integration Testing][62] | [MIT License][63] | +| [JaCoCo :: Agent][73] | [Eclipse Public License 2.0][41] | ### Plugin Dependencies @@ -274,7 +273,7 @@ | [Apache Maven Compiler Plugin][25] | [Apache License, Version 2.0][18] | | [Apache Maven Enforcer Plugin][26] | [Apache License, Version 2.0][18] | | [Maven Flatten Plugin][27] | [Apache Software Licenese][18] | -| [Maven Plugin Plugin][73] | [Apache License, Version 2.0][18] | +| [Maven Plugin Plugin][74] | [Apache License, Version 2.0][18] | | [org.sonatype.ossindex.maven:ossindex-maven-plugin][28] | [ASL2][29] | | [Maven Surefire Plugin][30] | [Apache License, Version 2.0][18] | | [Versions Maven Plugin][31] | [Apache License, Version 2.0][18] | @@ -283,16 +282,16 @@ | [Apache Maven Source Plugin][34] | [Apache License, Version 2.0][18] | | [Apache Maven Javadoc Plugin][35] | [Apache License, Version 2.0][18] | | [Nexus Staging Maven Plugin][36] | [Eclipse Public License][37] | -| [Apache Maven Dependency Plugin][74] | [Apache License, Version 2.0][18] | -| [Maven Failsafe Plugin][64] | [Apache License, Version 2.0][18] | -| [JaCoCo :: Maven Plugin][39] | [Eclipse Public License 2.0][40] | -| [error-code-crawler-maven-plugin][41] | [MIT License][42] | -| [Reproducible Build Maven Plugin][43] | [Apache 2.0][29] | -| [Maven Clean Plugin][44] | [The Apache Software License, Version 2.0][29] | -| [Maven Resources Plugin][45] | [The Apache Software License, Version 2.0][29] | -| [Maven JAR Plugin][46] | [The Apache Software License, Version 2.0][29] | -| [Maven Install Plugin][47] | [The Apache Software License, Version 2.0][29] | -| [Maven Site Plugin 3][48] | [The Apache Software License, Version 2.0][29] | +| [Apache Maven Dependency Plugin][75] | [Apache License, Version 2.0][18] | +| [Maven Failsafe Plugin][65] | [Apache License, Version 2.0][18] | +| [JaCoCo :: Maven Plugin][40] | [Eclipse Public License 2.0][41] | +| [error-code-crawler-maven-plugin][42] | [MIT License][43] | +| [Reproducible Build Maven Plugin][44] | [Apache 2.0][29] | +| [Maven Clean Plugin][45] | [The Apache Software License, Version 2.0][29] | +| [Maven Resources Plugin][46] | [The Apache Software License, Version 2.0][29] | +| [Maven JAR Plugin][47] | [The Apache Software License, Version 2.0][29] | +| [Maven Install Plugin][48] | [The Apache Software License, Version 2.0][29] | +| [Maven Site Plugin 3][49] | [The Apache Software License, Version 2.0][29] | ## Project Keeper Shared Test Setup @@ -300,10 +299,10 @@ | Dependency | License | | ----------------------------------------- | --------------------------------- | -| [Project-Keeper shared model classes][49] | [The MIT License][50] | -| [SnakeYAML][57] | [Apache License, Version 2.0][29] | +| [Project-Keeper shared model classes][50] | [The MIT License][51] | +| [SnakeYAML][58] | [Apache License, Version 2.0][29] | | [Hamcrest][14] | [BSD License 3][15] | -| [Maven Model][58] | [Apache License, Version 2.0][18] | +| [Maven Model][59] | [Apache License, Version 2.0][18] | | [Project Lombok][0] | [The MIT License][1] | ### Plugin Dependencies @@ -317,16 +316,16 @@ | [org.sonatype.ossindex.maven:ossindex-maven-plugin][28] | [ASL2][29] | | [Maven Surefire Plugin][30] | [Apache License, Version 2.0][18] | | [Versions Maven Plugin][31] | [Apache License, Version 2.0][18] | -| [Lombok Maven Plugin][38] | [The MIT License][10] | -| [JaCoCo :: Maven Plugin][39] | [Eclipse Public License 2.0][40] | -| [error-code-crawler-maven-plugin][41] | [MIT License][42] | -| [Reproducible Build Maven Plugin][43] | [Apache 2.0][29] | -| [Maven Clean Plugin][44] | [The Apache Software License, Version 2.0][29] | -| [Maven Resources Plugin][45] | [The Apache Software License, Version 2.0][29] | -| [Maven JAR Plugin][46] | [The Apache Software License, Version 2.0][29] | -| [Maven Install Plugin][47] | [The Apache Software License, Version 2.0][29] | +| [Lombok Maven Plugin][38] | [The MIT License][39] | +| [JaCoCo :: Maven Plugin][40] | [Eclipse Public License 2.0][41] | +| [error-code-crawler-maven-plugin][42] | [MIT License][43] | +| [Reproducible Build Maven Plugin][44] | [Apache 2.0][29] | +| [Maven Clean Plugin][45] | [The Apache Software License, Version 2.0][29] | +| [Maven Resources Plugin][46] | [The Apache Software License, Version 2.0][29] | +| [Maven JAR Plugin][47] | [The Apache Software License, Version 2.0][29] | +| [Maven Install Plugin][48] | [The Apache Software License, Version 2.0][29] | | [Maven Deploy Plugin][76] | [The Apache Software License, Version 2.0][29] | -| [Maven Site Plugin 3][48] | [The Apache Software License, Version 2.0][29] | +| [Maven Site Plugin 3][49] | [The Apache Software License, Version 2.0][29] | [0]: https://projectlombok.org [1]: https://projectlombok.org/LICENSE @@ -337,8 +336,8 @@ [6]: https://projects.eclipse.org/projects/ee4j.yasson [7]: http://www.eclipse.org/legal/epl-v20.html [8]: http://www.eclipse.org/org/documents/edl-v10.php -[9]: https://github.com/exasol/error-reporting-java -[10]: https://opensource.org/licenses/MIT +[9]: https://github.com/exasol/error-reporting-java/ +[10]: https://github.com/exasol/error-reporting-java/blob/main/LICENSE [11]: https://www.eclipse.org/jgit/ [12]: https://junit.org/junit5/ [13]: https://www.eclipse.org/legal/epl-v20.html @@ -367,41 +366,41 @@ [36]: http://www.sonatype.com/public-parent/nexus-maven-plugins/nexus-staging/nexus-staging-maven-plugin/ [37]: http://www.eclipse.org/legal/epl-v10.html [38]: https://anthonywhitford.com/lombok.maven/lombok-maven-plugin/ -[39]: https://www.jacoco.org/jacoco/trunk/doc/maven.html -[40]: https://www.eclipse.org/legal/epl-2.0/ -[41]: https://github.com/exasol/error-code-crawler-maven-plugin/ -[42]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE -[43]: http://zlika.github.io/reproducible-build-maven-plugin -[44]: http://maven.apache.org/plugins/maven-clean-plugin/ -[45]: http://maven.apache.org/plugins/maven-resources-plugin/ -[46]: http://maven.apache.org/plugins/maven-jar-plugin/ -[47]: http://maven.apache.org/plugins/maven-install-plugin/ -[48]: http://maven.apache.org/plugins/maven-site-plugin/ -[49]: https://github.com/exasol/project-keeper/ -[50]: https://github.com/exasol/project-keeper/blob/main/LICENSE -[51]: https://github.com/eclipse-ee4j/jaxb-api -[52]: https://oss.oracle.com/licenses/CDDL+GPL-1.1 -[53]: https://eclipse-ee4j.github.io/jaxb-ri/ -[54]: https://www.xmlunit.org/ -[55]: https://github.com/Steppschuh/Java-Markdown-Generator -[56]: https://github.com/vdurmont/semver4j -[57]: https://bitbucket.org/snakeyaml/snakeyaml -[58]: https://maven.apache.org/ref/3.8.6/maven-model/ -[59]: https://github.com/exasol/maven-project-version-getter/ -[60]: https://github.com/exasol/maven-project-version-getter/blob/main/LICENSE -[61]: https://github.com/exasol/maven-plugin-integration-testing/ -[62]: https://github.com/exasol/maven-plugin-integration-testing/blob/main/LICENSE -[63]: https://maven.apache.org/plugins/maven-jar-plugin/ -[64]: https://maven.apache.org/surefire/maven-failsafe-plugin/ -[65]: https://maven.apache.org/plugins/maven-assembly-plugin/ -[66]: https://github.com/exasol/artifact-reference-checker-maven-plugin/ -[67]: https://github.com/exasol/artifact-reference-checker-maven-plugin/blob/main/LICENSE -[68]: https://maven.apache.org/plugin-tools/maven-plugin-annotations -[69]: https://maven.apache.org/ref/3.8.6/maven-plugin-api/ -[70]: http://maven.apache.org/ -[71]: https://maven.apache.org/ref/3.8.6/maven-core/ -[72]: https://www.eclemma.org/jacoco/index.html -[73]: https://maven.apache.org/plugin-tools/maven-plugin-plugin -[74]: https://maven.apache.org/plugins/maven-dependency-plugin/ -[75]: https://commons.apache.org/proper/commons-io/ +[39]: https://opensource.org/licenses/MIT +[40]: https://www.jacoco.org/jacoco/trunk/doc/maven.html +[41]: https://www.eclipse.org/legal/epl-2.0/ +[42]: https://github.com/exasol/error-code-crawler-maven-plugin/ +[43]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE +[44]: http://zlika.github.io/reproducible-build-maven-plugin +[45]: http://maven.apache.org/plugins/maven-clean-plugin/ +[46]: http://maven.apache.org/plugins/maven-resources-plugin/ +[47]: http://maven.apache.org/plugins/maven-jar-plugin/ +[48]: http://maven.apache.org/plugins/maven-install-plugin/ +[49]: http://maven.apache.org/plugins/maven-site-plugin/ +[50]: https://github.com/exasol/project-keeper/ +[51]: https://github.com/exasol/project-keeper/blob/main/LICENSE +[52]: https://github.com/eclipse-ee4j/jaxb-api +[53]: https://oss.oracle.com/licenses/CDDL+GPL-1.1 +[54]: https://eclipse-ee4j.github.io/jaxb-ri/ +[55]: https://www.xmlunit.org/ +[56]: https://github.com/Steppschuh/Java-Markdown-Generator +[57]: https://github.com/vdurmont/semver4j +[58]: https://bitbucket.org/snakeyaml/snakeyaml +[59]: https://maven.apache.org/ref/3.8.6/maven-model/ +[60]: https://github.com/exasol/maven-project-version-getter/ +[61]: https://github.com/exasol/maven-project-version-getter/blob/main/LICENSE +[62]: https://github.com/exasol/maven-plugin-integration-testing/ +[63]: https://github.com/exasol/maven-plugin-integration-testing/blob/main/LICENSE +[64]: https://maven.apache.org/plugins/maven-jar-plugin/ +[65]: https://maven.apache.org/surefire/maven-failsafe-plugin/ +[66]: https://maven.apache.org/plugins/maven-assembly-plugin/ +[67]: https://github.com/exasol/artifact-reference-checker-maven-plugin/ +[68]: https://github.com/exasol/artifact-reference-checker-maven-plugin/blob/main/LICENSE +[69]: https://maven.apache.org/plugin-tools/maven-plugin-annotations +[70]: https://maven.apache.org/ref/3.8.6/maven-plugin-api/ +[71]: http://maven.apache.org/ +[72]: https://maven.apache.org/ref/3.8.6/maven-core/ +[73]: https://www.eclemma.org/jacoco/index.html +[74]: https://maven.apache.org/plugin-tools/maven-plugin-plugin +[75]: https://maven.apache.org/plugins/maven-dependency-plugin/ [76]: http://maven.apache.org/plugins/maven-deploy-plugin/ diff --git a/doc/changes/changes_2.9.1.md b/doc/changes/changes_2.9.1.md index 8e712433..1b4b9d86 100644 --- a/doc/changes/changes_2.9.1.md +++ b/doc/changes/changes_2.9.1.md @@ -1,23 +1,41 @@ -# Project Keeper 2.9.1, released 2022-??-?? +# Project Keeper 2.9.1, released 2022-11-04 -Code name: Minor Changes +Code name: Bug Fixes ## Summary -Fixed some bugs. +Fixed bugs #397, #398 and #400, see below. ## Bug Fix * #397: Categorized Go dependencies as 'unknown' if module name does not contain version number * #398: Fixed dependency change report if file `package.json` or `go.mod` is missing in previous release. +* #400: Improved error handling for missing attributes in `package.json`. ## Dependency Updates +### Project-Keeper Shared Model Classes + +#### Compile Dependency Updates + +* Updated `com.exasol:error-reporting-java:0.4.1` to `1.0.0` +* Updated `org.eclipse.jgit:org.eclipse.jgit:6.2.0.202206071550-r` to `6.3.0.202209071007-r` + +#### Test Dependency Updates + +* Updated `nl.jqno.equalsverifier:equalsverifier:3.10.1` to `3.11` +* Updated `org.junit.jupiter:junit-jupiter-engine:5.9.0` to `5.9.1` +* Updated `org.junit.jupiter:junit-jupiter-params:5.9.0` to `5.9.1` +* Updated `org.mockito:mockito-core:4.7.0` to `4.8.1` + ### Project Keeper Core #### Compile Dependency Updates +* Updated `com.exasol:error-reporting-java:0.4.1` to `1.0.0` * Updated `com.exasol:project-keeper-shared-model-classes:2.9.0` to `2.9.1` +* Updated `org.glassfish.jaxb:jaxb-runtime:4.0.0` to `4.0.1` +* Updated `org.yaml:snakeyaml:1.32` to `1.33` #### Runtime Dependency Updates @@ -25,32 +43,59 @@ Fixed some bugs. #### Test Dependency Updates +* Updated `com.exasol:maven-project-version-getter:1.1.1` to `1.2.0` * Updated `com.exasol:project-keeper-shared-test-setup:2.9.0` to `2.9.1` +* Updated `nl.jqno.equalsverifier:equalsverifier:3.10.1` to `3.11` +* Updated `org.junit.jupiter:junit-jupiter-engine:5.9.0` to `5.9.1` +* Updated `org.junit.jupiter:junit-jupiter-params:5.9.0` to `5.9.1` +* Updated `org.mockito:mockito-junit-jupiter:4.7.0` to `4.8.1` ### Project Keeper Command Line Interface #### Compile Dependency Updates +* Updated `com.exasol:error-reporting-java:0.4.1` to `1.0.0` * Updated `com.exasol:project-keeper-core:2.9.0` to `2.9.1` #### Test Dependency Updates +* Updated `com.exasol:maven-project-version-getter:1.1.1` to `1.2.0` * Updated `com.exasol:project-keeper-shared-test-setup:2.9.0` to `2.9.1` +* Updated `org.junit.jupiter:junit-jupiter-engine:5.9.0` to `5.9.1` +* Updated `org.junit.jupiter:junit-jupiter-params:5.9.0` to `5.9.1` ### Project Keeper Maven Plugin #### Compile Dependency Updates +* Updated `com.exasol:error-reporting-java:0.4.1` to `1.0.0` * Updated `com.exasol:project-keeper-core:2.9.0` to `2.9.1` +#### Test Dependency Updates + +* Updated `com.exasol:maven-project-version-getter:1.1.1` to `1.2.0` +* Updated `org.junit.jupiter:junit-jupiter-engine:5.9.0` to `5.9.1` +* Updated `org.junit.jupiter:junit-jupiter-params:5.9.0` to `5.9.1` +* Updated `org.mockito:mockito-core:4.7.0` to `4.8.1` + ### Project Keeper Java Project Crawler #### Compile Dependency Updates +* Updated `com.exasol:error-reporting-java:0.4.1` to `1.0.0` * Updated `com.exasol:project-keeper-shared-model-classes:2.9.0` to `2.9.1` +* Updated `org.eclipse.jgit:org.eclipse.jgit:6.2.0.202206071550-r` to `6.3.0.202209071007-r` + +#### Test Dependency Updates + +* Updated `com.exasol:maven-project-version-getter:1.1.1` to `1.2.0` +* Updated `org.junit.jupiter:junit-jupiter-engine:5.9.0` to `5.9.1` +* Updated `org.junit.jupiter:junit-jupiter-params:5.9.0` to `5.9.1` +* Updated `org.mockito:mockito-core:4.7.0` to `4.8.1` ### Project Keeper Shared Test Setup #### Compile Dependency Updates * Updated `com.exasol:project-keeper-shared-model-classes:2.9.0` to `2.9.1` +* Updated `org.yaml:snakeyaml:1.32` to `1.33` diff --git a/maven-project-crawler/pom.xml b/maven-project-crawler/pom.xml index 953771f1..fc9e615b 100644 --- a/maven-project-crawler/pom.xml +++ b/maven-project-crawler/pom.xml @@ -50,12 +50,6 @@ maven-core provided - - - commons-io - commons-io - provided - com.exasol maven-project-version-getter @@ -123,4 +117,4 @@ - + \ No newline at end of file diff --git a/parent-pom/pom.xml b/parent-pom/pom.xml index bbb1125f..227ff8cb 100644 --- a/parent-pom/pom.xml +++ b/parent-pom/pom.xml @@ -30,11 +30,10 @@ 2.9.1 3.8.6 - 5.9.0 - 1.6.2 + 5.9.1 0.8.8 2.9.0 - 4.7.0 + 4.8.1 UTF-8 UTF-8 11 @@ -119,7 +118,7 @@ org.glassfish.jaxb jaxb-runtime - 4.0.0 + 4.0.1 org.xmlunit @@ -129,12 +128,12 @@ com.exasol error-reporting-java - 0.4.1 + 1.0.0 org.eclipse.jgit org.eclipse.jgit - 6.2.0.202206071550-r + 6.3.0.202209071007-r net.steppschuh.markdowngenerator @@ -149,13 +148,7 @@ org.yaml snakeyaml - 1.32 - - - - commons-io - commons-io - 2.11.0 + 1.33 @@ -174,7 +167,7 @@ com.exasol maven-project-version-getter - 1.1.1 + 1.2.0 test @@ -246,7 +239,7 @@ nl.jqno.equalsverifier equalsverifier - 3.10.1 + 3.11 test @@ -258,4 +251,4 @@ - + \ No newline at end of file diff --git a/project-keeper-cli/src/test/java/com/exasol/projectkeeper/cli/ProjectKeeperLauncherIT.java b/project-keeper-cli/src/test/java/com/exasol/projectkeeper/cli/ProjectKeeperLauncherIT.java index 2eff6ec8..1c9d30b5 100644 --- a/project-keeper-cli/src/test/java/com/exasol/projectkeeper/cli/ProjectKeeperLauncherIT.java +++ b/project-keeper-cli/src/test/java/com/exasol/projectkeeper/cli/ProjectKeeperLauncherIT.java @@ -56,8 +56,9 @@ void runMainMethodWithNullArgumentFails() throws IOException, InterruptedExcepti @Test void verifyFailsForProjectWithoutGit() throws IOException, InterruptedException { final Path projectDirRealPath = this.projectDir.toRealPath(); - assertProcessFails("verify", "E-PK-CORE-90: Could not find .git directory in project-root " + projectDirRealPath - + ". Known mitigations:\n* Run 'git init'.\n* Make sure that you run project-keeper only in the root directory of the git-repository. If you have multiple projects in that directory, define them in the '.project-keeper.yml'."); + assertProcessFails("verify", "E-PK-CORE-90: Could not find .git directory in project-root '" + + projectDirRealPath + + "'. Known mitigations:\n* Run 'git init'.\n* Make sure that you run project-keeper only in the root directory of the git-repository. If you have multiple projects in that directory, define them in the '.project-keeper.yml'."); } @Test diff --git a/project-keeper/error_code_config.yml b/project-keeper/error_code_config.yml index 0683fb6d..3b451b01 100644 --- a/project-keeper/error_code_config.yml +++ b/project-keeper/error_code_config.yml @@ -2,4 +2,4 @@ error-tags: PK-CORE: packages: - com.exasol.projectkeeper - highest-index: 162 + highest-index: 164 diff --git a/project-keeper/src/main/java/com/exasol/projectkeeper/JavaProjectCrawlerRunner.java b/project-keeper/src/main/java/com/exasol/projectkeeper/JavaProjectCrawlerRunner.java index 647d059a..2a1828a3 100644 --- a/project-keeper/src/main/java/com/exasol/projectkeeper/JavaProjectCrawlerRunner.java +++ b/project-keeper/src/main/java/com/exasol/projectkeeper/JavaProjectCrawlerRunner.java @@ -77,7 +77,7 @@ private String runCrawlerPlugin(final Path... pomFiles) { if (!proc.waitFor(90, TimeUnit.SECONDS)) { final String output = streamConsumer.getContent(STREAM_READING_TIMEOUT); throw new IllegalStateException(ExaError.messageBuilder("E-PK-CORE-81") - .message("Timeout while executing command {{executed command|uq}}. Output was {{output}}", + .message("Timeout while executing command {{executed command|u}}. Output was {{output}}", commandParts, output) .toString()); } @@ -86,7 +86,7 @@ private String runCrawlerPlugin(final Path... pomFiles) { if (exitCode != 0) { LOGGER.log(Level.SEVERE, output); throw new IllegalStateException(ExaError.messageBuilder("E-PK-CORE-78").message( - "Failed to run command {{executed command|uq}}, exit code was {{exit code}}. Output:\n{{output}}", + "Failed to run command {{executed command|u}}, exit code was {{exit code}}. Output:\n{{output}}", commandParts, exitCode, output).toString()); } return new ResponseCoder().decodeResponse(output); diff --git a/project-keeper/src/main/java/com/exasol/projectkeeper/ProjectKeeper.java b/project-keeper/src/main/java/com/exasol/projectkeeper/ProjectKeeper.java index 064cb4fc..79629232 100644 --- a/project-keeper/src/main/java/com/exasol/projectkeeper/ProjectKeeper.java +++ b/project-keeper/src/main/java/com/exasol/projectkeeper/ProjectKeeper.java @@ -244,7 +244,7 @@ private boolean fixFindings(final List findings) { for (final SimpleValidationFinding unfixedFinding : unfixedFindings) { this.logger.warn(ExaError.messageBuilder("W-PK-CORE-67") - .message("Could not auto-fix: {{finding message|uq}}", unfixedFinding.getMessage()).toString()); + .message("Could not auto-fix: {{finding message|u}}", unfixedFinding.getMessage()).toString()); } if (blockers(unfixedFindings).isEmpty()) { diff --git a/project-keeper/src/main/java/com/exasol/projectkeeper/ProjectVersionDetector.java b/project-keeper/src/main/java/com/exasol/projectkeeper/ProjectVersionDetector.java index a8a754f7..f216269a 100644 --- a/project-keeper/src/main/java/com/exasol/projectkeeper/ProjectVersionDetector.java +++ b/project-keeper/src/main/java/com/exasol/projectkeeper/ProjectVersionDetector.java @@ -66,7 +66,7 @@ private IllegalArgumentException getSourceHasNoVersionException(final Path reque .message(FAILED_TO_DETECT_VERSION + " The specified source with path {{path}} did not provide a version.", requestedPath) .mitigation( - "Please specify a different source to read from or set an explicit version in your project-keeper config..") + "Please specify a different source to read from or set an explicit version in your project-keeper config.") .toString()); } diff --git a/project-keeper/src/main/java/com/exasol/projectkeeper/config/ProjectKeeperConfigReader.java b/project-keeper/src/main/java/com/exasol/projectkeeper/config/ProjectKeeperConfigReader.java index 1ae04d64..bab4d3d8 100644 --- a/project-keeper/src/main/java/com/exasol/projectkeeper/config/ProjectKeeperConfigReader.java +++ b/project-keeper/src/main/java/com/exasol/projectkeeper/config/ProjectKeeperConfigReader.java @@ -217,7 +217,7 @@ private ProjectKeeperConfig.SourceType convertType(final String rawType) { .map(String::toLowerCase).collect(Collectors.joining(", ")); throw new IllegalArgumentException(ExaError.messageBuilder("E-PK-CORE-84") .message(INVALID_CONFIG_FILE + " Unsupported source type {{type}}.", rawType) - .mitigation("Please use one of the supported types: {{supported types|uq}}.", supportedTypes) + .mitigation("Please use one of the supported types: {{supported types|u}}.", supportedTypes) .toString()); } } diff --git a/project-keeper/src/main/java/com/exasol/projectkeeper/sources/SourceAnalyzer.java b/project-keeper/src/main/java/com/exasol/projectkeeper/sources/SourceAnalyzer.java index a8ffb253..2e6d3cdb 100644 --- a/project-keeper/src/main/java/com/exasol/projectkeeper/sources/SourceAnalyzer.java +++ b/project-keeper/src/main/java/com/exasol/projectkeeper/sources/SourceAnalyzer.java @@ -99,7 +99,7 @@ private void validateUniqueSourcePaths(final List sources) { .map(Entry::getKey).collect(toList()); if (!duplicatePaths.isEmpty()) { throw new IllegalStateException(ExaError.messageBuilder("E-PK-CORE-149") - .message("Sources use duplicate paths {{duplicate paths}}.", duplicatePaths) + .message("Sources use duplicate paths {{duplicate paths|u}}.", duplicatePaths) .mitigation("Make sure that sources in .project-keeper.yml have unique paths.").toString()); } } diff --git a/project-keeper/src/main/java/com/exasol/projectkeeper/sources/analyze/golang/SimpleProcess.java b/project-keeper/src/main/java/com/exasol/projectkeeper/sources/analyze/golang/SimpleProcess.java index 1bed6078..f7ed0cef 100644 --- a/project-keeper/src/main/java/com/exasol/projectkeeper/sources/analyze/golang/SimpleProcess.java +++ b/project-keeper/src/main/java/com/exasol/projectkeeper/sources/analyze/golang/SimpleProcess.java @@ -131,7 +131,7 @@ private void waitForExecutionFinished(final Duration executionTimeout) { try { if (!this.process.waitFor(executionTimeout.toMillis(), TimeUnit.MILLISECONDS)) { throw new IllegalStateException(ExaError.messageBuilder("E-PK-CORE-128") - .message("Timeout while waiting {{timeout|uq}}ms for command {{executed command}}." // + .message("Timeout while waiting {{timeout|u}}ms for command {{executed command}}." // + " Output was {{output}}\nError output: {{std error}}", // executionTimeout.toMillis(), formatCommand(), // getOutputStreamContent(), getErrorStreamContent()) @@ -145,7 +145,7 @@ private void waitForExecutionFinished(final Duration executionTimeout) { private RuntimeException handleInterruptedException(final InterruptedException exception) { Thread.currentThread().interrupt(); return new IllegalStateException(ExaError.messageBuilder("E-PK-CORE-129") - .message("Interrupted while waiting for command {{executed command|uq}}", formatCommand()).toString(), + .message("Interrupted while waiting for command {{executed command|u}}", formatCommand()).toString(), exception); } diff --git a/project-keeper/src/main/java/com/exasol/projectkeeper/sources/analyze/npm/PackageJsonReader.java b/project-keeper/src/main/java/com/exasol/projectkeeper/sources/analyze/npm/PackageJsonReader.java index d4b1a2c3..f71758d9 100644 --- a/project-keeper/src/main/java/com/exasol/projectkeeper/sources/analyze/npm/PackageJsonReader.java +++ b/project-keeper/src/main/java/com/exasol/projectkeeper/sources/analyze/npm/PackageJsonReader.java @@ -6,11 +6,11 @@ import java.util.List; import java.util.stream.Collectors; +import com.exasol.errorreporting.ExaError; import com.exasol.projectkeeper.shared.dependencies.BaseDependency.Type; import com.exasol.projectkeeper.shared.dependencies.VersionedDependency; -import jakarta.json.JsonObject; -import jakarta.json.JsonValue; +import jakarta.json.*; final class PackageJsonReader { @@ -38,7 +38,7 @@ static PackageJson read(final Path path, final String string) { PackageJson read(final Path path, final JsonObject content) { final String module = retrieveModuleName(content); - final String version = content.getString("version"); + final String version = retrieveModuleVersion(content); final List dependencies = new ArrayList<>(); dependencies.addAll(versionedDependencies(content, DependencyKey.DEV)); dependencies.addAll(versionedDependencies(content, DependencyKey.COMPILE)); @@ -48,11 +48,27 @@ PackageJson read(final Path path, final JsonObject content) { private static final String MODULE_PREFIX = "@exasol/"; private String retrieveModuleName(final JsonObject packageJson) { - final String raw = packageJson.getString("name"); - if (!raw.startsWith(MODULE_PREFIX)) { - return raw; + final JsonString raw = packageJson.getJsonString("name"); + if (raw == null) { + throw new IllegalArgumentException( + ExaError.messageBuilder("E-PK-CORE-163").message("Missing attribute 'name' in package.json.") + .mitigation("Add a 'name' attribute.").toString()); } - return raw.substring(MODULE_PREFIX.length()); + final String rawString = raw.getString(); + if (!rawString.startsWith(MODULE_PREFIX)) { + return rawString; + } + return rawString.substring(MODULE_PREFIX.length()); + } + + private String retrieveModuleVersion(final JsonObject content) { + final JsonString version = content.getJsonString("version"); + if (version == null) { + throw new IllegalArgumentException( + ExaError.messageBuilder("E-PK-CORE-164").message("Missing attribute 'version' in package.json.") + .mitigation("Add a 'version' attribute.").toString()); + } + return version.getString(); } private List versionedDependencies(final JsonObject packageJson, final DependencyKey key) { diff --git a/project-keeper/src/main/java/com/exasol/projectkeeper/validators/DeletedFilesValidator.java b/project-keeper/src/main/java/com/exasol/projectkeeper/validators/DeletedFilesValidator.java index 4f51c7f5..02e8c407 100644 --- a/project-keeper/src/main/java/com/exasol/projectkeeper/validators/DeletedFilesValidator.java +++ b/project-keeper/src/main/java/com/exasol/projectkeeper/validators/DeletedFilesValidator.java @@ -55,13 +55,13 @@ public List validate() { private String getFileExistsErrorMessage(final Path fileThatMustNotExist, final String reason) { return ExaError.messageBuilder("E-PK-CORE-26") - .message("{{FILE}} exists but must not exist. Reason: {{REASON|uq}}", fileThatMustNotExist.toString(), + .message("{{FILE}} exists but must not exist. Reason: {{REASON|u}}", fileThatMustNotExist.toString(), reason) .toString(); } private SimpleValidationFinding.Fix getFix(final String fileName, final File file) { - return (Logger log) -> { + return (final Logger log) -> { try { Files.delete(file.toPath()); } catch (final IOException exception) { diff --git a/project-keeper/src/main/java/com/exasol/projectkeeper/validators/OwnVersionValidator.java b/project-keeper/src/main/java/com/exasol/projectkeeper/validators/OwnVersionValidator.java index bd4a3c16..42c70b70 100644 --- a/project-keeper/src/main/java/com/exasol/projectkeeper/validators/OwnVersionValidator.java +++ b/project-keeper/src/main/java/com/exasol/projectkeeper/validators/OwnVersionValidator.java @@ -17,8 +17,8 @@ /** * Validates if PK itself is up-to-date and performs self-update of called from a pom file. */ -//[impl->dsn~verify-own-version~1] -//[impl->dsn~self-update~1] +// [impl->dsn~verify-own-version~1] +// [impl->dsn~self-update~1] public class OwnVersionValidator implements Validator { /** @@ -101,7 +101,7 @@ private Version getLatestVersion(final MavenRepository repo) throws ValidationEx } catch (final IOException | JsonContentException exception) { throw new ValidationException(ExaError.messageBuilder("W-PK-CORE-155") // .message("Could not detect latest available version of project-keeper.") // - .message(" {{message|uq}}.", exception.getMessage()) // + .message(" {{message|u}}.", exception.getMessage()) // .mitigation("Please check network connection and response from {{url}}", repo.getUrl()) // .toString(), exception); } diff --git a/project-keeper/src/main/java/com/exasol/projectkeeper/validators/dependencies/DependenciesValidator.java b/project-keeper/src/main/java/com/exasol/projectkeeper/validators/dependencies/DependenciesValidator.java index 3b7037c1..7da239f5 100644 --- a/project-keeper/src/main/java/com/exasol/projectkeeper/validators/dependencies/DependenciesValidator.java +++ b/project-keeper/src/main/java/com/exasol/projectkeeper/validators/dependencies/DependenciesValidator.java @@ -17,7 +17,7 @@ /** * {@link Validator} for the dependencies.md file. */ -//[impl->dsn~depnedency.md-file-validator~1] +// [impl->dsn~depnedency.md-file-validator~1] public class DependenciesValidator implements Validator { private final Path dependenciesFile; private final List sources; @@ -71,7 +71,7 @@ private List validateFileContent(final String expectedDepende final var actualContent = Files.readString(this.dependenciesFile); if (!actualContent.equals(expectedDependenciesPage)) { return List.of(SimpleValidationFinding.withMessage(ExaError.messageBuilder("E-PK-CORE-53").message( - "The dependencies.md file has outdated content.\nExpected content:\n{{expected content|uq}}", + "The dependencies.md file has outdated content.\nExpected content:\n{{expected content|u}}", expectedDependenciesPage).toString())// .andFix(getFix(expectedDependenciesPage)).build()); } diff --git a/project-keeper/src/main/java/com/exasol/projectkeeper/validators/pom/PomFileValidator.java b/project-keeper/src/main/java/com/exasol/projectkeeper/validators/pom/PomFileValidator.java index 634ea7d0..a7181944 100644 --- a/project-keeper/src/main/java/com/exasol/projectkeeper/validators/pom/PomFileValidator.java +++ b/project-keeper/src/main/java/com/exasol/projectkeeper/validators/pom/PomFileValidator.java @@ -26,7 +26,7 @@ /** * Validator for the pom.xml file. */ -//[impl->dsn~pom-file-validator~1] +// [impl->dsn~pom-file-validator~1] public class PomFileValidator implements Validator { private static final String PARENT_POM_MITIGATION = "Check the project-keeper user guide if you need a parent pom."; @@ -168,7 +168,7 @@ private Optional validateGroupId(final String groupId) private Optional validationDescriptionExists(final Document document) { if (runXPath(document, XPath.DESCRIPTION) == null) { return Optional.of(SimpleValidationFinding.withMessage(ExaError.messageBuilder("E-PK-CORE-120") - .message("Invalid pom file {{file}}: Missing required property {{property|uq}}.", + .message("Invalid pom file {{file}}: Missing required property {{property|u}}.", this.projectDirectory.relativize(this.pomFilePath), XPath.DESCRIPTION) .mitigation("Please manually add a description.").toString()).build()); } else { @@ -200,9 +200,9 @@ private String getProjectVersion(final Document pom) throws InvalidPomException .findFirst() // .orElseThrow(() -> new InvalidPomException(ExaError.messageBuilder("E-PK-CORE-111") .message("Failed to detect project version.") - .mitigation("Please either set {{xpath1|uq}} or {{xpath2}} in file {{pom file|uq}}", + .mitigation("Please either set {{xpath1|u}} or {{xpath2}} in file {{pom file|u}}", XPath.VERSION, XPath.PARENT_VERSION, this.projectDirectory.relativize(this.pomFilePath)) - .mitigation("or add version to file {{configuration file|uq}}.", + .mitigation("or add version to file {{configuration file|u}}.", ProjectKeeperConfigReader.CONFIG_FILE_NAME) .toString())); } @@ -267,7 +267,7 @@ private Optional checkParentVersion(final String versio if ((node == null) || !version.equals(node.getTextContent())) { final SimpleValidationFinding.Builder findingBuilder = SimpleValidationFinding .withMessage(ExaError.messageBuilder("E-PK-CORE-118") - .message("Invalid pom file {{file}}: Invalid {{parent version xpath|uq}}." // + .message("Invalid pom file {{file}}: Invalid {{parent version xpath|u}}." // + " Expected value is {{expected}}." // + MUST_DECLARE_GENERATED_PARENT, // this.projectDirectory.relativize(this.pomFilePath), // @@ -294,7 +294,7 @@ private Optional checkParentRelativePath(final Path generated final Node node = runXPath(parentTag, "relativePath"); if ((node == null) || !comparePaths(expectedValue, Path.of(node.getTextContent()))) { return Optional.of(SimpleValidationFinding.withMessage(ExaError.messageBuilder("E-PK-CORE-112").message( - "Invalid pom file {{file}}: Invalid {{parent relative path|uq}}. Expected value is {{expected}}." + "Invalid pom file {{file}}: Invalid {{parent relative path|u}}. Expected value is {{expected}}." + MUST_DECLARE_GENERATED_PARENT, // this.projectDirectory.relativize(this.pomFilePath), // XPath.PARENT_RELATIVE_PATH, // @@ -315,7 +315,7 @@ private Optional checkParentProperty(final Path generatedPomP final Node node = runXPath(parentTag, property); if ((node == null) || !node.getTextContent().equals(expectedValue)) { return Optional.of(SimpleValidationFinding.withMessage(ExaError.messageBuilder("E-PK-CORE-104") - .message("Invalid pom file {{file}}: Invalid {{xpath|uq}}." // + .message("Invalid pom file {{file}}: Invalid {{xpath|u}}." // + " Expected value is {{expected}}." // + MUST_DECLARE_GENERATED_PARENT, // this.projectDirectory.relativize(this.pomFilePath), // @@ -362,7 +362,7 @@ private String getGroupId(final Document pom) throws InvalidPomException { throw new InvalidPomException(ExaError.messageBuilder("E-PK-CORE-102") .message("Invalid pom file {{file}}: Missing required property 'groupId'.", this.projectDirectory.relativize(this.pomFilePath)) - .mitigation("Please either set {{groupId|uq}} or {{parent groupId|uq}}.", XPath.GROUP_ID, + .mitigation("Please either set {{groupId|u}} or {{parent groupId|u}}.", XPath.GROUP_ID, XPath.PARENT_GROUP_ID) .toString()); } @@ -373,7 +373,7 @@ private String getRequiredTextValue(final Node pom, final String xPath) throws I final Node node = XPathErrorHandlingWrapper.runXPath(pom, xPath); if (node == null) { throw new InvalidPomException(ExaError.messageBuilder("E-PK-CORE-101") - .message("Invalid pom file {{file}}: Missing required property {{property|uq}}.", + .message("Invalid pom file {{file}}: Missing required property {{property|u}}.", this.projectDirectory.relativize(this.pomFilePath), xPath) .mitigation("Please set the property manually.").toString()); } diff --git a/project-keeper/src/test/java/com/exasol/projectkeeper/ProjectKeeperIT.java b/project-keeper/src/test/java/com/exasol/projectkeeper/ProjectKeeperIT.java index c253c67c..808b73fc 100644 --- a/project-keeper/src/test/java/com/exasol/projectkeeper/ProjectKeeperIT.java +++ b/project-keeper/src/test/java/com/exasol/projectkeeper/ProjectKeeperIT.java @@ -47,7 +47,7 @@ void testVerifyPhase1() throws IOException { () -> assertThat(output, containsString("E-PK-CORE-17: Missing required file: 'pk_generated_parent.pom'")), () -> assertThat(output, containsString( - "E-PK-CORE-105: Invalid pom file pom.xml: Missing required property finalName property in maven-assembly-plugin."))); + "E-PK-CORE-105: Invalid pom file 'pom.xml': Missing required property finalName property in maven-assembly-plugin."))); } @Test diff --git a/project-keeper/src/test/java/com/exasol/projectkeeper/ProjectVersionDetectorTest.java b/project-keeper/src/test/java/com/exasol/projectkeeper/ProjectVersionDetectorTest.java index 7fe67e37..8b809630 100644 --- a/project-keeper/src/test/java/com/exasol/projectkeeper/ProjectVersionDetectorTest.java +++ b/project-keeper/src/test/java/com/exasol/projectkeeper/ProjectVersionDetectorTest.java @@ -67,7 +67,7 @@ void testSpecifiedSourceHasNoVersion() { final IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> versionDetector.detectVersion(config, sources)); assertThat(exception.getMessage(), equalTo( - "E-PK-CORE-115: Failed to detect overall project version. The specified source with path pom.xml did not provide a version. Please specify a different source to read from or set an explicit version in your project-keeper config..")); + "E-PK-CORE-115: Failed to detect overall project version. The specified source with path 'pom.xml' did not provide a version. Please specify a different source to read from or set an explicit version in your project-keeper config.")); } @Test diff --git a/project-keeper/src/test/java/com/exasol/projectkeeper/config/ProjectKeeperConfigReaderTest.java b/project-keeper/src/test/java/com/exasol/projectkeeper/config/ProjectKeeperConfigReaderTest.java index db9a69c5..52f56e1d 100644 --- a/project-keeper/src/test/java/com/exasol/projectkeeper/config/ProjectKeeperConfigReaderTest.java +++ b/project-keeper/src/test/java/com/exasol/projectkeeper/config/ProjectKeeperConfigReaderTest.java @@ -192,8 +192,8 @@ void notInProjectRoot() throws IOException { Files.writeString(this.tempDir.resolve(".project-keeper.yml"), ""); final IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> this.reader.readConfig(this.tempDir)); - assertThat(exception.getMessage(), equalTo("E-PK-CORE-90: Could not find .git directory in project-root " + assertThat(exception.getMessage(), equalTo("E-PK-CORE-90: Could not find .git directory in project-root '" + this.tempDir - + ". Known mitigations:\n* Run 'git init'.\n* Make sure that you run project-keeper only in the root directory of the git-repository. If you have multiple projects in that directory, define them in the '.project-keeper.yml'.")); + + "'. Known mitigations:\n* Run 'git init'.\n* Make sure that you run project-keeper only in the root directory of the git-repository. If you have multiple projects in that directory, define them in the '.project-keeper.yml'.")); } } diff --git a/project-keeper/src/test/java/com/exasol/projectkeeper/sources/SourceAnalyzerTest.java b/project-keeper/src/test/java/com/exasol/projectkeeper/sources/SourceAnalyzerTest.java index e39ac203..4d655589 100644 --- a/project-keeper/src/test/java/com/exasol/projectkeeper/sources/SourceAnalyzerTest.java +++ b/project-keeper/src/test/java/com/exasol/projectkeeper/sources/SourceAnalyzerTest.java @@ -76,7 +76,7 @@ void sourceNotfound() { final IllegalStateException exception = assertThrows(IllegalStateException.class, () -> analyzer.analyze(PROJECT_DIR, sources)); assertThat(exception.getMessage(), - startsWith("E-PK-CORE-150: Did not find analyzed source for path path, all analyzed sources:")); + startsWith("E-PK-CORE-150: Did not find analyzed source for path 'path', all analyzed sources:")); } @RepeatedTest(10) diff --git a/project-keeper/src/test/java/com/exasol/projectkeeper/sources/analyze/npm/PackageJsonReaderTest.java b/project-keeper/src/test/java/com/exasol/projectkeeper/sources/analyze/npm/PackageJsonReaderTest.java new file mode 100644 index 00000000..11adc477 --- /dev/null +++ b/project-keeper/src/test/java/com/exasol/projectkeeper/sources/analyze/npm/PackageJsonReaderTest.java @@ -0,0 +1,48 @@ +package com.exasol.projectkeeper.sources.analyze.npm; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; +import static org.junit.jupiter.api.Assertions.assertAll; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import jakarta.json.Json; +import jakarta.json.JsonObject; + +class PackageJsonReaderTest { + private PackageJsonReader reader; + + @BeforeEach + void setup() { + this.reader = new PackageJsonReader(); + } + + @Test + void missingNameFails() { + final JsonObject object = Json.createObjectBuilder().build(); + final IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, + () -> this.reader.read(null, object)); + assertThat(exception.getMessage(), + equalTo("E-PK-CORE-163: Missing attribute 'name' in package.json. Add a 'name' attribute.")); + } + + @Test + void missingVersionFails() { + final JsonObject object = Json.createObjectBuilder().add("name", "dummy").build(); + final IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, + () -> this.reader.read(null, object)); + assertThat(exception.getMessage(), + equalTo("E-PK-CORE-164: Missing attribute 'version' in package.json. Add a 'version' attribute.")); + } + + @Test + void readingSucceedsWhenNameAndVersionPresent() { + final JsonObject object = Json.createObjectBuilder().add("name", "moduleName").add("version", "moduleVersion") + .build(); + final PackageJson pkg = this.reader.read(null, object); + assertAll(() -> assertThat(pkg.getModuleName(), equalTo("moduleName")), + () -> assertThat(pkg.getVersion(), equalTo("moduleVersion"))); + } +} diff --git a/project-keeper/src/test/java/com/exasol/projectkeeper/validators/pom/PomFileValidatorTest.java b/project-keeper/src/test/java/com/exasol/projectkeeper/validators/pom/PomFileValidatorTest.java index 14b52eff..68057ff7 100644 --- a/project-keeper/src/test/java/com/exasol/projectkeeper/validators/pom/PomFileValidatorTest.java +++ b/project-keeper/src/test/java/com/exasol/projectkeeper/validators/pom/PomFileValidatorTest.java @@ -44,13 +44,14 @@ void testValidation() throws IOException { getTestModel().writeAsPomToProject(this.tempDir); final List result = runValidator(null); assertAll( - () -> assertThat(result, hasFindingWithMessage("E-PK-CORE-103: Missing parent declaration in pom.xml")), + () -> assertThat(result, + hasFindingWithMessage("E-PK-CORE-103: Missing parent declaration in 'pom.xml'")), () -> assertThat(result, hasFindingWithMessage("E-PK-CORE-17: Missing required file: 'pk_generated_parent.pom'")), () -> assertThat(result, hasFindingWithMessage( - "E-PK-CORE-123: Invalid pom file pom.xml: Missing required property '/project/url'. The expected value is 'https://github.com/exasol/my-repo/'.")), + "E-PK-CORE-123: Invalid pom file 'pom.xml': Missing required property '/project/url'. The expected value is 'https://github.com/exasol/my-repo/'.")), () -> assertThat(result, hasFindingWithMessage( - "E-PK-CORE-105: Invalid pom file pom.xml: Missing required property finalName property in maven-assembly-plugin. Use the following template and set finalName:\n\n" + "E-PK-CORE-105: Invalid pom file 'pom.xml': Missing required property finalName property in maven-assembly-plugin. Use the following template and set finalName:\n\n" + " maven-assembly-plugin\n" + " org.apache.maven.plugins\n" + " \n" + " NAME_OF_YOUR_JAR\n" + " \n" @@ -65,7 +66,7 @@ void testMissingDescription() throws IOException { model.writeAsPomToProject(this.tempDir); final List result = runValidator(null); assertThat(result, hasFindingWithMessage( - "E-PK-CORE-120: Invalid pom file pom.xml: Missing required property /project/description. Please manually add a description.")); + "E-PK-CORE-120: Invalid pom file 'pom.xml': Missing required property /project/description. Please manually add a description.")); } @Test @@ -75,7 +76,7 @@ void testWrongGroupId() throws IOException { pom.writeAsPomToProject(this.tempDir); final List result = runValidator(null); assertThat(result, hasFindingWithMessage( - "E-PK-CORE-121: Invalid pom file pom.xml: Invalid groupId 'com.other'. Manually set the groupId to 'com.exasol'.")); + "E-PK-CORE-121: Invalid pom file 'pom.xml': Invalid groupId 'com.other'. Manually set the groupId to 'com.exasol'.")); } @Test @@ -85,7 +86,7 @@ void testOutdatedUrl() throws IOException { pom.writeAsPomToProject(this.tempDir); final List result = runValidator(null); assertThat(result, hasFindingWithMessage( - "E-PK-CORE-122: Invalid pom file pom.xml: Invalid value 'https://other.de' for property '/project/url'. The expected value is 'https://github.com/exasol/my-repo/'.")); + "E-PK-CORE-122: Invalid pom file 'pom.xml': Invalid value 'https://other.de' for property '/project/url'. The expected value is 'https://github.com/exasol/my-repo/'.")); } @Test @@ -147,7 +148,7 @@ void testMissingGroupId() throws IOException { testMavenModel.setGroupId(null); testMavenModel.writeAsPomToProject(this.tempDir); final List result = runValidator(null); - assertThat(result, hasFindingWithMessage("E-PK-CORE-102: Invalid pom file pom.xml:" // + assertThat(result, hasFindingWithMessage("E-PK-CORE-102: Invalid pom file 'pom.xml':" // + " Missing required property 'groupId'." // + " Please either set /project/groupId or /project/parent/groupId.")); } @@ -193,7 +194,7 @@ void testGeneratedPomFileFix() throws IOException { runFix(null); final String expected = ("\n" + "other"); Files.writeString(pom, invalidPomContent); final List result = runValidator(null); - assertThat(result, hasFindingWithMessage("E-PK-CORE-104: Invalid pom file pom.xml:" // + assertThat(result, hasFindingWithMessage("E-PK-CORE-104: Invalid pom file 'pom.xml':" // + " Invalid /project/parent/artifactId." // + " Expected value is 'my-test-project-generated-parent'." - + " The pom must declare pk_generated_parent.pom as parent pom." // + + " The pom must declare 'pk_generated_parent.pom' as parent pom." // + " Check the project-keeper user guide if you need a parent pom.")); } @@ -220,7 +221,7 @@ void noReferenceToProjectKeeperPlugin() { getTestModel().writeAsPomToProject(this.tempDir); final List result = runValidator(null); assertThat(result, hasFindingWithMessageMatchingRegex( - "W-PK-CORE-151: Pom file .*pom.xml contains no reference to project-keeper-maven-plugin.")); + "W-PK-CORE-151: Pom file '.*pom.xml' contains no reference to project-keeper-maven-plugin.")); } // [utest->dsn~verify-own-version~1]