You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2022/12/13 05:35:26 UTC

[isis] 01/01: ISIS-3275: post merge fixes (schema gen.)

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch spring6
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 8ccd97fd9e861f98978c0af188aa9326f9ae20ae
Merge: fd54912f55 10e5aceb92
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Dec 13 06:35:18 2022 +0100

    ISIS-3275: post merge fixes (schema gen.)

 api/schema/pom.xml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --cc api/schema/pom.xml
index 819e34c2f1,bc0b1c0a90..ad3cc6313c
--- a/api/schema/pom.xml
+++ b/api/schema/pom.xml
@@@ -107,12 -99,13 +107,14 @@@
  							<dependency>
  								<groupId>org.jvnet.jaxb2_commons</groupId>
  								<artifactId>jaxb2-namespace-prefix</artifactId>
- 								<version>2.0</version>
 -								<version>1.3</version>
++								<version>1.3</version>  <!-- don't upgrade from 1.3 to 2.x, 
++										as this fragile combination of plugins will otherwise
++										produce invalid annotations -->
  							</dependency>
  							<dependency>
 -								<!-- fixes build on JDK 16+ see https://github.com/highsource/maven-jaxb2-plugin/issues/201 -->
 -								<groupId>org.glassfish.jaxb</groupId>
 -								<artifactId>jaxb-runtime</artifactId>
 -								<version>2.3.3</version>
 +								<groupId>org.jvnet.jaxb2_commons</groupId>
 +								<artifactId>jaxb2-basics-annotate</artifactId>
 +								<version>1.1.0</version>
  							</dependency>
  						</dependencies>
  					</plugin>
@@@ -135,93 -128,6 +137,94 @@@
  							</execution>
  						</executions>
  					</plugin>
 +					<plugin>
++						<!-- we resort to drastic means here using ant to post-process outdated namespaces -->
 +		                <groupId>org.apache.maven.plugins</groupId>
 +		                <artifactId>maven-antrun-plugin</artifactId>
 +		                <executions>
 +		                    <execution>
 +		                        <id>patch-javax-to-jakarta-ns</id>
 +		                        <phase>generate-sources</phase>
 +		                        <goals>
 +		                            <goal>run</goal>
 +		                        </goals>
 +		                        <configuration>
 +		                            <target>
 +										<replace 
 +											dir="target/generated-sources/xjc"
 +											token="javax.xml.bind" 
 +											value="jakarta.xml.bind">
 +											<include name="**/*.java"/>
 +										</replace>
 +		                            </target>
 +		                        </configuration>
 +		                    </execution>
 +		                </executions>
-             </plugin>
++            		</plugin>
 +
 +<!-- generates jakarta namespaces - but (sub) plugins do fail
 +					<plugin>
 +					    <groupId>org.codehaus.mojo</groupId>
 +					    <artifactId>jaxb2-maven-plugin</artifactId>
 +					    <version>3.1.0</version>
 +					    <executions>
 +					        <execution>
 +					            <id>xjc</id>
 +					            <goals>
 +					                <goal>xjc</goal>
 +					            </goals>
 +					            <configuration>
 +									<arguments>
 +										<argument>-Xnamespace-prefix</argument>
 +										<argument>-Xannotate</argument>
 +									</arguments>
 +								</configuration>
 +					        </execution>
 +					    </executions>
 +					    <configuration>
 +					        <xjbSources>
 +					            <xjbSource>src/main/resources/org/apache/causeway/schema/bindings.xjb</xjbSource>
 +					        </xjbSources>
 +					        <sources>
 +								<source>src/main/resources/org/apache/causeway/schema/common/common-2.0.xsd</source>
 +								<source>src/main/resources/org/apache/causeway/schema/cmd/cmd-2.0.xsd</source>
 +								<source>src/main/resources/org/apache/causeway/schema/ixn/ixn-2.0.xsd</source>
 +								<source>src/main/resources/org/apache/causeway/schema/chg/chg-2.0.xsd</source>
 +								<source>src/main/resources/org/apache/causeway/schema/metamodel/metamodel-2.0.xsd</source>
 +					        </sources>
 +					        <outputDirectory>${basedir}/target/generated-sources/xjc</outputDirectory>
 +					        <clearOutputDir>false</clearOutputDir>
 +					    </configuration>
 +					    <dependencies>
 +							<dependency>
 +							      <groupId>jakarta.xml.bind</groupId>
 +							      <artifactId>jakarta.xml.bind-api</artifactId>
 +							      <version>4.0.0</version>
 +						    </dependency>
 +							<dependency>
 +							    <groupId>javax.xml.bind</groupId>
 +							    <artifactId>jaxb-api</artifactId>
 +							    <version>2.3.1</version>
 +							</dependency>
 +							<dependency>
 +							      <groupId>jakarta.inject</groupId>
 +							      <artifactId>jakarta.inject-api</artifactId>
 +							      <version>2.0.1</version>
 +						    </dependency>
 +							<dependency>
 +								<groupId>org.jvnet.jaxb2_commons</groupId>
 +								<artifactId>jaxb2-namespace-prefix</artifactId>
 +								<version>2.0</version>
 +							</dependency>
 +			                <dependency>
 +         				    	<groupId>org.jvnet.jaxb2_commons</groupId>
 +								<artifactId>jaxb2-basics-annotate</artifactId>
 +								<version>1.1.0</version>
 +                			</dependency>
 +						</dependencies>
 +					</plugin>
 +
 +					-->
  				</plugins>
  			</build>
  		</profile>