chore: publish XSDs upon deployment and validate generated pom lock files are valid#97
Conversation
| <dependency> | ||
| <groupId>org.slf4j</groupId> | ||
| <artifactId>slf4j-simple</artifactId> | ||
| <version>1.7.36</version> | ||
| <type>jar</type> | ||
| <scope>test</scope> | ||
| <optional>false</optional> | ||
| <dependency-lock:integrity>sha512:zc6+j6WFJ6G8faDBjpCpVHzorJnMz+VleGDColR4wDDqdYJR2j4ypx6rnLuRNgaStcbFiHofFZfR/aBxUbJ+Xw==</dependency-lock:integrity> | ||
| </dependency> |
There was a problem hiding this comment.
New dependency effectively added (for testing only)
There was a problem hiding this comment.
- Add a test dependency for logging purposes
- Added Xerces Impl libraries supporting XML Schema 1.1
- Add a plugin for publishing the staged site to github
- Add a plugin to be able to generate and use test XSDs
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-scm-publish-plugin</artifactId> | ||
| <version>3.3.0</version> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>com.googlecode.javaewah</groupId> | ||
| <artifactId>JavaEWAH</artifactId> | ||
| <version>1.1.13</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:WjghoH7rybVvhwVMcbm6+g2dC1VqoWGR+GdtdIzsdVp0HNVQDoZ2ST/8pp5slgjK+G2AtgtZNO4QjXcDDEkBlA==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>commons-io</groupId> | ||
| <artifactId>commons-io</artifactId> | ||
| <version>2.16.1</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:l+qzGwc8XFfIvPqi/se0gaFamh+e2GTf3GO1fwYrIwVXyqc0wxM6yhFl+stYjFjbAYXAeDIkHXAVnoekvPSACA==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>javax.inject</groupId> | ||
| <artifactId>javax.inject</artifactId> | ||
| <version>1</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:4Sa3zPPkL9GYSgvu8QBKcmmjN8IC5Z4E6OKvcUKA0vLY0rpeb1lIG43NNKrzXJZqaI0LSOx+lvECwnTcDTs4Hg==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>net.i2p.crypto</groupId> | ||
| <artifactId>eddsa</artifactId> | ||
| <version>0.3.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:Y35170tYsoCvBXVGr8F22/O+zytp990xpxapDgHAHXsbzUALKe/u6ms035reeSLAZloACjottaRG3yk/jRQpzA==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.commons</groupId> | ||
| <artifactId>commons-lang3</artifactId> | ||
| <version>3.14.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:Azi1B2cWbldGrabWqi4HHnIh1pkyO/tin38gSylMHcTK0UBhChKe11F5hEO0PnTggYmJx999M8WRWqKXQr6bqA==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.commons</groupId> | ||
| <artifactId>commons-text</artifactId> | ||
| <version>1.11.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:SG/f9iU8DoN/2Dj3Xxc3F2mHvRIZLJVdmKSuv22OGxRBO1Jp1TsVDOFTanD1k2euVME3GmD1O28O1buhuetu5A==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.release</groupId> | ||
| <artifactId>maven-release-api</artifactId> | ||
| <version>3.1.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:oCNovCdS1Umo2ZOn4JUbMyFwAHs2pVUQqukWrQvbgffpwITxdUfsV8PqgFxzL70Ls3EXNtlot8QW0KXtGg9u/Q==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.release</groupId> | ||
| <artifactId>maven-release-manager</artifactId> | ||
| <version>3.1.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:tgr204qh+Q74gerD8ZsyXAv8vKnCfy7uQqK4g5j1VMtirAqLciNR4fwnOfJOxE7+QpSjE6rcrbRhFlRkVGIFwg==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.resolver</groupId> | ||
| <artifactId>maven-resolver-api</artifactId> | ||
| <version>1.4.1</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:2lbd7s+7bShdCPpg+I/hJdHwj0jqJAE7g7aq3ySDXANMm0XNuBXZlQWzXgYFxIttfllJ8XNah0BJsHkOioRh3A==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.resolver</groupId> | ||
| <artifactId>maven-resolver-util</artifactId> | ||
| <version>1.4.1</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:NaCyhP762Zt3xg8V0JHButNBe6rR/Ib7aFCjR6inWpzqJvoifsYBV39AlhhLgs4Zi0RyRB6V/OVW99MyxqFVyw==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.scm</groupId> | ||
| <artifactId>maven-scm-api</artifactId> | ||
| <version>2.1.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:Xpok4KTNEZpqRcp640RYmAD7GHe7Tue12oB2IgHRyJ1XHPm0CbiQIHc3gzeyUpZwGx+JJt1/jgwBzW10qe+Nqg==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.scm</groupId> | ||
| <artifactId>maven-scm-manager-plexus</artifactId> | ||
| <version>2.1.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:PIIB33R6imFG/jsaK91RGGw5pZL6CZLFgW8r13pJynHBiV/FaSqHXVKt+ELEfHi1+EkbSWFuJ9dgp6qaiObFVg==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.scm</groupId> | ||
| <artifactId>maven-scm-provider-git-commons</artifactId> | ||
| <version>2.1.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:N1WAVrV/9g4YHY7E6Kt5AZWESYJn7ZMtB9aJmTpoRZMn25krZ676wXnsUk30XK3S74K3msGVlHoGsz0CBWMMtg==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.scm</groupId> | ||
| <artifactId>maven-scm-provider-gitexe</artifactId> | ||
| <version>2.1.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:uD4pTyquqo9a1ars8pU7zTRriYbSzgKKK1BDa6Zt9df7e/vAGPoIgdbFuwT2RQKDXMqy8gAVT2qDrThE3nO+5A==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.scm</groupId> | ||
| <artifactId>maven-scm-provider-hg</artifactId> | ||
| <version>2.1.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:1LkMhiJqc6Wk/koEcYcxX8U67ExiqC/3Nf4VAFVlp9g+zGHax5bxWF97gT+4OdwB4/WUC8BD/Vw1EusQTBpRIg==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.scm</groupId> | ||
| <artifactId>maven-scm-provider-jgit</artifactId> | ||
| <version>2.1.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:R+8D1JAbtd1FGVYzvYUKhcdYasHqv0R49PZmipWSaF79Wl+i/qTMq7aEKvYkEl9RvH0UxTwzIepLFtSM2ke62g==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.scm</groupId> | ||
| <artifactId>maven-scm-provider-svn-commons</artifactId> | ||
| <version>2.1.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:UW4Xtk2dcSTK+4EEMfMHv8MUVgcXqXZS+hVIrCCgngmX1PKMVMUVuYkg4yRkjHFHZTAtDls7aSjwn1OB/SXopA==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.scm</groupId> | ||
| <artifactId>maven-scm-provider-svnexe</artifactId> | ||
| <version>2.1.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:RtWWyex45rsRQcC4R8eZd0UgIF1ku147gnIMTVj1Tt1D05DR8HM05V17aXdE/hp7jYK+GiwVTmPHWE2UqqGOmg==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.scm</groupId> | ||
| <artifactId>maven-scm-providers-standard</artifactId> | ||
| <version>2.1.0</version> | ||
| <type>pom</type> | ||
| <dependency-lock:integrity>sha512:zGaVOLDkfjVRCMDBP38PGfVh3/Ra7D+cWjRpfFJ5glY1NCPmFJIfn/Mo2swUT5ejju4PFRX8zu0jz2gptBEchw==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.shared</groupId> | ||
| <artifactId>maven-invoker</artifactId> | ||
| <version>3.3.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:RxOhtH1zxUWM3ffZkr2bgmohpw2OzMhxgDPxHIPcPVLJZpZOmChFn3aCJE2T+KxyM351DClcu/kha6mqfxF9aA==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.shared</groupId> | ||
| <artifactId>maven-shared-utils</artifactId> | ||
| <version>3.4.2</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:cduKSFpkNsswUnbqnXSPV44aj/oTRshXD3A4aEzlPTIFhBdGNK7/obUWKa8BcaLWVyhU6wcjaoMjatHZlJmI6Q==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.sshd</groupId> | ||
| <artifactId>sshd-common</artifactId> | ||
| <version>2.7.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:lGqr1oFwPOZjv5sp8GyqncArQ3TzU4Ew10d3r1i9Ler60ivSrg2nxYswWy/LDRacS6upfGmcsCk1/T3KESgQyQ==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.sshd</groupId> | ||
| <artifactId>sshd-core</artifactId> | ||
| <version>2.7.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:a6KwwY08ayyyD6wSSXqYOmkeVUqiH4P18Os+IzpGdF+sw3tT2JB4WkgH77ZKScpHJC7+bqlsFELpfqIQYMCvOA==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.sshd</groupId> | ||
| <artifactId>sshd-osgi</artifactId> | ||
| <version>2.7.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:yUv2WnT8f0RzWzx9rZqc1cyQYXSxlhW7FrbTJc6m41hFAuqaSBP3FT3NpKnd8IInAMmsc+BWyitdxl20wGEK0A==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.sshd</groupId> | ||
| <artifactId>sshd-sftp</artifactId> | ||
| <version>2.7.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:m0pFn5JMdKMX41VRki5lsXa3nuogDq3S5q17AxdzibdSDVi2qwR/akZTSu+jJFVI5JNHgfKi7uzStrigDML0hw==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.codehaus.plexus</groupId> | ||
| <artifactId>plexus-cipher</artifactId> | ||
| <version>2.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:jxh7B4Z6fCnXdFSq5LdkeTACONnE53fBr6KuvjO4jauRbikRHdVaysE0GEn0V5/pGlRw/dRcy6DgVwnCzjodZQ==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.codehaus.plexus</groupId> | ||
| <artifactId>plexus-interactivity-api</artifactId> | ||
| <version>1.3</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:rd9HrDaBluUmIjJOydA/b7ePh9wlNM18nrTxMNESQt7BJ3jbuk+MQFfVaosrxWZzQy4LDdhwCsbLF7fFkEKm8w==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.codehaus.plexus</groupId> | ||
| <artifactId>plexus-interpolation</artifactId> | ||
| <version>1.27</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:NK4TmedVYNauxnQ8434Q0iNjQuxYFFw/3XsDNA9O0+9QD4JMhF1FLbuMPxTRGMhVcH3koIAHT6Vy2vfM/vTd3w==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.codehaus.plexus</groupId> | ||
| <artifactId>plexus-sec-dispatcher</artifactId> | ||
| <version>2.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:rU6BTIuv94Ck7uBkkD5SsJrgBCCln7B173LbuNZNEtPVAJsD1WwV+TWH2THDp/BsrWNRqy3JQVzMbuqw2uvrBw==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.codehaus.plexus</groupId> | ||
| <artifactId>plexus-utils</artifactId> | ||
| <version>4.0.1</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:7PYJ1JXJ53KEdso11CkMlNhiw5OvxqmAkFcfQEfUGE0cUjH9avS8aP59gy7KJhcfhq9exZDW8vcHQLcgpvY2tQ==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.codehaus.plexus</groupId> | ||
| <artifactId>plexus-xml</artifactId> | ||
| <version>3.0.0</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:MbaKAlqyZY/lnV+7eaJCVWA5Lj2ydGsKuAWEaliBbEI13W1Q7T7S1JGfdJTgWAdTcbspaU9KquNwyeDKouVSRQ==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.eclipse.jgit</groupId> | ||
| <artifactId>org.eclipse.jgit.ssh.apache</artifactId> | ||
| <version>5.13.3.202401111512-r</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:YQ5xWesdGwBdAHXNzglG6VouootDuOw3LLsVOFN4riGZsMrkuqNM1CVVuMNOYUjx9NGCOjJpm9ID0i484tQ1mg==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.eclipse.jgit</groupId> | ||
| <artifactId>org.eclipse.jgit</artifactId> | ||
| <version>5.13.3.202401111512-r</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:0CcRWumPQbpI98UK+A6PmTZCKErtYajWY2cgOwNgokuWIiEeuXTsprjvMCgrwJcEOAv+YVWrOFVt6nuQBr0ysw==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.jdom</groupId> | ||
| <artifactId>jdom2</artifactId> | ||
| <version>2.0.6.1</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:gWQtt2NY+/Ex3+nC8dnCgPwjtr/eahai022sxJChoq9OD7Srtc14AFcYux0VikL9aDTNK/5hbsWWJd8BlR8keA==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.slf4j</groupId> | ||
| <artifactId>jcl-over-slf4j</artifactId> | ||
| <version>1.7.36</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:rCMatEUhu1R4dCrxNiTbXBSuqAnDosE7mJ+6MBhrptuEDy0bSupU+cH3eVR7l1/QQt01P1QCVZJ3TUAZK9cRSA==</dependency-lock:integrity> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.slf4j</groupId> | ||
| <artifactId>slf4j-api</artifactId> | ||
| <version>1.7.36</version> | ||
| <type>jar</type> | ||
| <dependency-lock:integrity>sha512:+bAz/AGaRPmLFgSNp+K1nt1KalJ7pg41j2WriOCvrgOpNA8bPopUPUn6VCKQ9JnFWUJZr/of8+bnvztCjUxhCw==</dependency-lock:integrity> | ||
| </dependency> | ||
| </dependencies> | ||
| <dependency-lock:integrity>sha512:DWOWDQgfaye/tpgDXbqsqZo5PVOxe0VIYiLAPOW5vRVufFPauScNXiJGnoxlTY1ZTaA2LxOKA3I2roORPrE4bQ==</dependency-lock:integrity> | ||
| </plugin> |
There was a problem hiding this comment.
Plugin added to publish to SCM the generated site
| </plugin> | ||
| <plugin> | ||
| <groupId>org.codehaus.mojo</groupId> | ||
| <artifactId>build-helper-maven-plugin</artifactId> |
There was a problem hiding this comment.
Plugin added to be able to attach test resources (for testing and IDE integration)
There was a problem hiding this comment.
Ordering of dependency-lock:integrity elements
There was a problem hiding this comment.
Ordering of dependency-lock:integrity elements
+ Ensure templates are also filtered
+ Fix XSD compliance
8af4291 to
20e7ab1
Compare
| <groupId>${plugin.artifactIdentifier.groupId}</groupId> | ||
| <artifactId>${plugin.artifactIdentifier.artifactId}</artifactId> | ||
| <version>${plugin.version}</version> | ||
| <dependency-lock:integrity>${plugin.getIntegrityForLockFile()}</dependency-lock:integrity> |
There was a problem hiding this comment.
Do this need to change place? I think it belongs where it is conceptually.
There was a problem hiding this comment.
Found a way to revert this change by switching to a custom Xerces Impl package supporting XML Schema 1.1
Indeed there was the following issues:
- Using standard Xerces library shipped with JDK seems to not work (because in XML Schema 1.0 you cannot "extend" a complex type containing an "all" clause)
- Using Woodstox led to the validator code used to fail if ordering wasn't respected (it seemed to expect first all parent content and then child content... Don't ask me why but it didn't like the "dependencies" node appearing after dependency-lock:integrity 🤷 )
…te against XSD (allows relaxing the ordering constraint)
| </dependency> | ||
| <dependency> | ||
| <groupId>edu.princeton.cup</groupId> | ||
| <artifactId>java-cup</artifactId> |
There was a problem hiding this comment.
Used by Xerces Impl XML Schema 1.1 Validation classes
| </dependency> | ||
| <dependency> | ||
| <groupId>org.exist-db.thirdparty.org.eclipse.wst.xml</groupId> | ||
| <artifactId>xpath2</artifactId> |
There was a problem hiding this comment.
Used by Xerces Impl XML Schema 1.1 Validation classes
| </dependency> | ||
| <dependency> | ||
| <groupId>org.exist-db.thirdparty.xerces</groupId> | ||
| <artifactId>xercesImpl</artifactId> |
There was a problem hiding this comment.
Manually crafted XML Schema 1.1 Supporting Xerces Implementation wrapper (https://blog.adamretter.org.uk/xerces-xsd11-maven/ for the credits)
There was a problem hiding this comment.
This file wasn't appropriately formatted it seems 🤦
Objective of this PR is to do two things:
Worth noting: