<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
>
   <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>javastro-mavenbase</artifactId>
        <groupId>org.javastro</groupId>
        <version>2025.4</version>
        <relativePath/>
    </parent>
    <artifactId>ivoa-entities</artifactId>
   <groupId>org.javastro.ivoa</groupId>
   <name>ivoa-entities</name>
   <version>0.9.13</version>
   
   <description>JAXB annotated objects for IVOA schema related mainly to registry</description>

   <packaging>jar</packaging>
   <dependencies>
       <dependency> 
         <groupId>org.javastro.ivoa</groupId>
         <artifactId>ivoa-schema</artifactId>
         <version>0.9.12</version>
         </dependency>
       <dependency>
         <groupId>org.javastro</groupId>
         <artifactId>jaxbjpa-utils</artifactId>
         <version>0.2.5</version>
      </dependency>
      <dependency>
         <groupId>org.glassfish.jaxb</groupId>
         <artifactId>jaxb-xjc</artifactId>
         <scope>runtime</scope>
      </dependency>     
      <dependency>
         <groupId>org.glassfish.jaxb</groupId>
         <artifactId>jaxb-runtime</artifactId>
      </dependency>
      <dependency>
         <groupId>org.hibernate.orm</groupId>
         <artifactId>hibernate-core</artifactId>
      </dependency>      
      <dependency>
         <groupId>jakarta.annotation</groupId>
         <artifactId>jakarta.annotation-api</artifactId>
      </dependency>

     <!--provided scope needed for compile annotation processing done so 
         that it does not get included in shaded jar - the annotation processing is 
         not done properly by eclipse - needs to be done manually outside with a maven 
         run -->
      <!-- get rid of metamodel for now - more trouble than it is worth because 
         of https://bugs.eclipse.org/bugs/show_bug.cgi?id=415027 -->
      <!-- <dependency> -->
      <!-- <groupId>org.eclipse.persistence</groupId> -->
      <!-- <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId> -->
      <!-- <scope>provided</scope> -->
      <!-- </dependency> -->
      <dependency>
         <groupId>net.sf.saxon</groupId>
         <artifactId>Saxon-HE</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jvnet.jaxb</groupId>
         <artifactId>jaxb-plugins-runtime</artifactId>
         <version>4.0.3</version>
      </dependency>
       <dependency>
           <groupId>ch.qos.logback</groupId>
           <artifactId>logback-classic</artifactId>
           <scope>test</scope>
       </dependency>

       <!-- https://mvnrepository.com/artifact/net.codesup.util/jaxb-rich-contract-runtime
-->
<dependency>
    <groupId>net.codesup.util</groupId>
    <artifactId>jaxb-rich-contract-runtime</artifactId>
    <version>4.2.1.2</version>
</dependency>

      <dependency>
         <groupId>org.apache.derby</groupId>
         <artifactId>derby</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>com.h2database</groupId>
         <artifactId>h2</artifactId>
         <version>2.2.220</version>
      </dependency>
      <dependency>
         <groupId>com.fasterxml.jackson.core</groupId>
         <artifactId>jackson-databind</artifactId>
      </dependency>
   </dependencies>
   <build>
      <resources>
         <resource>
            <directory>src/main/resources</directory>
            <includes>
               <include>**/*.properties</include>
               <include>**/*.xml</include>
               <include>**/*.xsl</include>
               <include>**/jaxb.index</include>
            </includes>
         </resource>
      </resources>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
               <execution>
                  <id>unpack-xsd-files</id>
                  <phase>initialize</phase>
                  <goals>
                     <goal>unpack</goal>
                  </goals>
                  <configuration>
                     <artifactItems>
                        <artifactItem>
                           <groupId>org.javastro.ivoa</groupId>
                           <artifactId>ivoa-schema</artifactId>
                           <type>jar</type>
                        </artifactItem>
                     </artifactItems>
                     <includes>**/*.xsd</includes>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
             <groupId>org.jvnet.jaxb</groupId> <!-- this is a fork of the original https://github.com/highsource/jaxb-tools - go back now!! -->
               <artifactId>jaxb-maven-plugin</artifactId>
               <configuration>
               <strict>false</strict>
               <verbose>true</verbose>
               <extension>true</extension>
               <forceRegenerate>false</forceRegenerate>
               <episode>true</episode>
               <specVersion>3.0</specVersion>
               <bindingDirectory>${basedir}/build</bindingDirectory>
               <generateDirectory>${project.build.directory}/generated-sources/xjc</generateDirectory>
               <schemaDirectory>${project.build.directory}/dependency/schema/</schemaDirectory>
               <packageLevelAnnotations>true</packageLevelAnnotations>
               <markGenerated>true</markGenerated>
               <noFileHeader>true</noFileHeader>
                <plugins>
                    <!--  <plugin>
                        <groupId>com.github.jaxb-xew-plugin</groupId>
                        <artifactId>jaxb-xew-plugin</artifactId>
                        <version>2.1</version>
                     </plugin> -->
                      <plugin>
                            <groupId>net.codesup.util</groupId>
                            <artifactId>jaxb-rich-contract-plugin</artifactId>
                            <version>4.2.1.2</version>
                        </plugin>
                    <plugin>
                        <groupId>org.jvnet.jaxb</groupId>
                        <artifactId>jaxb-plugins</artifactId>
                        <version>4.0.8</version>
                     </plugin>
                 </plugins>
            </configuration>
            <executions>
               <execution>
                  <id>xjc</id>
                  <phase>generate-sources</phase>
                  <goals>
                     <goal>generate</goal>
                  </goals>
                  <inherited>true</inherited>
                  <configuration>
                     <args>
 <!--                       <arg>-Xxew</arg>
                        <arg>-Xxew:plural</arg>
                        <arg>-Xxew:control</arg>
                        <arg>${basedir}/build/xew-control.txt</arg>  
                        <arg>-Xxew:summary</arg>
                        <arg>xewmanipulations.log</arg> -->
   


                        <arg>-XsimpleEquals</arg>
                        <arg>-XsimpleHashCode</arg>
                        <arg>-XtoString</arg>

                        <arg>-Xjaxbindex</arg>
                        <arg>-Xdefault-value</arg>
                                            
                        <arg>-Xmergeable</arg>
                        <arg>-XenumValue</arg>
                        <arg>-Xnamespace-prefix</arg>
                        <arg>-Xvalue-constructor</arg>
<!--                        <arg>-Xfluent-api</arg>  -->


                        <!-- ** rich contract plugin ** -->
                      <!-- cannot use with immurable <arg>-Xconstrained-properties</arg>
                            <arg>-constrained-properties.constrained=y</arg>
                            <arg>-constrained-properties.bound=y</arg>
                            <arg>-constrained-properties.setterThrows=n</arg>
                            <arg>-constrained-properties.generateTools=y</arg> -->
                        <arg>-Xclone</arg>
                            <arg>-clone.cloneThrows=y</arg>
                        <arg>-Xcopy</arg>
                            <arg>-copy.partial=y</arg>
                            <arg>-copy.generateTools=n</arg>
                            <arg>-copy.constructor=n</arg>
                            <arg>-copy.narrow=n</arg>
                            <arg>-copy.selectorClassName=Selector</arg>
                            <arg>-copy.rootSelectorClassName=Select</arg>
                       <!-- <arg>-Xgroup-contract</arg>
                            <arg>-group-contract.declareSetters=y</arg>
                            <arg>-group-contract.declareBuilderInterface=y</arg>
                            <arg>-group-contract.supportInterfaceNameSuffix=Lifecycle</arg>
                            <arg>-group-contract.upstreamEpisodeFile=META-INF/jaxb-interfaces.episode</arg>
                            <arg>-group-contract.downstreamEpisodeFile=META-INF/jaxb-interfaces.episode</arg> -->
<!--                        <arg>-Ximmutable</arg>
                            <arg>-immutable.fake=n</arg>-->
<!--                            <arg>-immutable.overrideCollectionClass=null</arg> this needs to be set to a collection type if wanted-->
<!--                            <arg>-immutable.constructorAccess=public</arg>-->
                        <arg>-Xmodifier</arg>
                            <arg>-modifier.modifierClassName=Modifier</arg>
                            <arg>-modifier.modifierMethodName=modifier</arg>
                        <arg>-Xfluent-builder</arg>
                            <arg>-fluent-builder.rootSelectorClassName=Select</arg>
                            <arg>-fluent-builder.newBuilderMethodName=builder</arg>
                            <arg>-fluent-builder.newCopyBuilderMethodName=newCopyBuilder</arg>
                            <arg>-fluent-builder.copyToMethodName=copyTo</arg>
                            <arg>-fluent-builder.builderFieldSuffix=_Builder</arg>
                            <arg>-fluent-builder.narrow=n</arg>
                            <arg>-fluent-builder.copyPartial=y</arg>
                            <arg>-fluent-builder.selectorClassName=Selector</arg>
                            <arg>-fluent-builder.builderClassName=Builder</arg>
                            <arg>-fluent-builder.builderInterfaceName=BuildSupport</arg>
                            <arg>-fluent-builder.copyAlways=n</arg>
                            <arg>-fluent-builder.buildMethodName=build</arg>
                            <arg>-fluent-builder.endMethodName=end</arg>
                            <arg>-fluent-builder.generateJavadocFromAnnotations=n</arg>
                            <arg>-fluent-builder.generateTools=n</arg> <!-- some weird classloader issues if not - even though am putting in runtime dependencies -->
                         <arg>-Xmeta</arg>
                            <arg>-meta.generateTools=n</arg>
                            <arg>-meta.extended=y</arg>
                            <arg>-meta.camelCase=n</arg>
                            <arg>-meta.metaClassName=PropInfo</arg>
                            <arg>-meta.allowSet=y</arg>
                            <arg>-meta.visitMethodName=visit</arg>

                     </args>
                     <schemaIncludes>
                        <include>VOResource-v1.1.xsd</include>
                        <include>VODataService-v1.2.xsd</include>
                        <include>ConeSearch-v1.0.xsd</include>
                        <include>SIA-v1.1.xsd</include>
                        <include>VOApplication-1.0.xsd</include>
                        <include>TAPRegExt-v1.0.xsd</include>
                        <include>VOSIAvailability-v1.0.xsd</include>
                        <include>VOSICapabilities-v1.0.xsd</include>
                        <include>VOSITables-v1.1.xsd</include>
                        <include>OAI-PMH.xsd</include>
                         <include>oai_dc.xsd</include>
                         <include>simpledc20021212.xsd</include>
                        <include>UWS-1.1.xsd</include>
                        <include>RegistryInterface-v1.0.xsd</include>
                        <include>VORegistry-v1.0.xsd</include>
                        <include>StandardsRegExt-1.0.xsd</include>
                        <include>SSA-v1.2.xsd</include>
                        <include>xlink.xsd</include>                       
                        <include>vo-dml-v1.0.xsd</include>
                        <include>STC-v1.30.xsd</include>
                        <!-- <include>SLAP-v1.1.xsd</include> not in the autogenerate as enums cause conflicts with SSA -->
                        
                     </schemaIncludes>
                     <bindingIncludes>
                        <include>xjb-binding.xml</include>
                     </bindingIncludes>
                  </configuration>
               </execution>
            </executions>
            <dependencies>
            </dependencies>
         </plugin>
          <plugin>
              <groupId>io.smallrye</groupId>
              <artifactId>jandex-maven-plugin</artifactId>
              <version>3.2.7</version>
              <executions>
                  <execution>
                      <id>make-index</id>
                      <goals>
                          <goal>jandex</goal>
                      </goals>
                  </execution>
              </executions>
          </plugin>

         <!--         <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-antrun-plugin</artifactId>
                         <executions>
                             <execution>
                                 <phase>generate-sources</phase>
                                 <configuration>
                                     <target>
                                         <replace dir="target/generated-sources" value="jakarta.xml.bind">
                                             <include name="**/*.java"/>
                                             <replacetoken>javax.xml.bind</replacetoken>
                                         </replace>
                                     </target>
                                 </configuration>
                                 <goals>
                                     <goal>run</goal>
                                 </goals>
                             </execution>
                         </executions>
                     </plugin>-->
<!--  not sure of generality of this -       <plugin>
            <groupId>de.empulse.eclipselink</groupId>
            <artifactId>staticweave-maven-plugin</artifactId>
            <version>1.0.0</version>
            <executions>
               <execution>
                  <phase>process-classes</phase>
                  <goals>
                     <goal>weave</goal>
                  </goals>
                  <configuration>
                     <logLevel>FINE</logLevel>
                  </configuration>
               </execution>
            </executions>
            <dependencies>
               <dependency>
                  <groupId>org.eclipse.persistence</groupId>
                  <artifactId>org.eclipse.persistence.jpa</artifactId>
                  <version>${eclipselink.version}</version>
               </dependency>
            </dependencies>
         </plugin> -->
      </plugins>
      <pluginManagement>
         <plugins>
            <!--This plugin's configuration is used to store Eclipse m2e 
               settings only. It has no influence on the Maven build itself. -->
            <plugin>
               <groupId>org.eclipse.m2e</groupId>
               <artifactId>lifecycle-mapping</artifactId>
               <version>1.0.0</version>
               <configuration>
                  <lifecycleMappingMetadata>
                     <pluginExecutions>
                        <pluginExecution>
                           <pluginExecutionFilter>
                              <groupId>de.empulse.eclipselink</groupId>
                              <artifactId>staticweave-maven-plugin</artifactId>
                              <versionRange>[1.0.0,)</versionRange>
                              <goals>
                                 <goal>weave</goal>
                              </goals>
                           </pluginExecutionFilter>
                           <action>
                              <ignore></ignore>
                           </action>
                        </pluginExecution>
                     </pluginExecutions>
                  </lifecycleMappingMetadata>
               </configuration>
            </plugin>
         </plugins>
      </pluginManagement>
   </build>
</project>