GithubHelp home page GithubHelp logo

hyperjaxb3-support's People

Contributors

highsource avatar panos-at-har avatar s-man42 avatar sergiishapoval avatar

Watchers

James Cloos avatar  avatar  avatar

hyperjaxb3-support's Issues

Issue with ogc:And

Hi, I am trying to implement your source with a online SLD editor that I am designing. I get the following message though:

Element [{http://www.opengis.net/ogc}ogc:And] is not known in this context and property does not allow DOM.

My XML is as follow:



Custom Style

<Title>Default custom style</Title>
A sample style


Polygon
<Title>Polygon Rule</Title>
Default Style for Polygons
ogc:Filter
ogc:And
ogc:PropertyIsEqualTo
<ogc:Function name="in2">
<ogc:Function name="geometryType">
ogc:PropertyNamethe_geom/ogc:PropertyName
/ogc:Function
ogc:LiteralPolygon/ogc:Literal
ogc:LiteralMultiPolygon/ogc:Literal
/ogc:Function
ogc:Literaltrue/ogc:Literal
/ogc:PropertyIsEqualTo
ogc:PropertyIsEqualTo
ogc:PropertyNameonemap_geom_valid/ogc:PropertyName
ogc:Literaltrue/ogc:Literal
/ogc:PropertyIsEqualTo
/ogc:And
/ogc:Filter
0.0
32000.0


#AAAAAA


#000000
1




Point
<Title>Point Rule</Title>
Default Style for Points
ogc:Filter
ogc:And
ogc:PropertyIsEqualTo
<ogc:Function name="in2">
<ogc:Function name="geometryType">
ogc:PropertyNamethe_geom/ogc:PropertyName
/ogc:Function
ogc:LiteralPoint/ogc:Literal
ogc:LiteralMultiPoint/ogc:Literal
/ogc:Function
ogc:Literaltrue/ogc:Literal
/ogc:PropertyIsEqualTo
ogc:PropertyIsEqualTo
ogc:PropertyNameonemap_geom_valid/ogc:PropertyName
ogc:Literaltrue/ogc:Literal
/ogc:PropertyIsEqualTo
/ogc:And
/ogc:Filter
0.0
32000.0



square

#FF0000


6




Line
<Title>Line Rule</Title>
Default Style for Lines
ogc:Filter
ogc:And
ogc:PropertyIsEqualTo
<ogc:Function name="in3">
<ogc:Function name="geometryType">
ogc:PropertyNamethe_geom/ogc:PropertyName
/ogc:Function
ogc:LiteralLineString/ogc:Literal
ogc:LiteralLinearRing/ogc:Literal
ogc:LiteralMultiLineString/ogc:Literal
/ogc:Function
ogc:Literaltrue/ogc:Literal
/ogc:PropertyIsEqualTo
ogc:PropertyIsEqualTo
ogc:PropertyNameonemap_geom_valid/ogc:PropertyName
ogc:Literaltrue/ogc:Literal
/ogc:PropertyIsEqualTo
/ogc:And
/ogc:Filter
0.0
32000.0


#0000FF
4






Correct hyperjaxb3-ejb-plugin configuration for cxf-codegen-plugin (3.0.4)

Hi @highsource ,

I am trying to generate classes with last version of cxf-codegen-plugin (3.0.4), but I am receiving one of the errors below:

1 Caused by: java.lang.NoClassDefFoundError: com/sun/tools/xjc/outline/Aspect

2 Caused by: java.lang.NoSuchMethodError: com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>([Ljava/lang/Class;Ljava/util/Collection;Ljava/util/Map;Ljava/lang/String;ZLcom/sun /xml/bind/v2/model/annotation/RuntimeAnnotationReader;ZZ)V

3 Caused by: java.lang.NoSuchMethodException: com.sun.tools.xjc.reader.xmlschema.BGMBuilder

I think, it is plugin dependency problem.
I saw only configurations with old CXF version on tutorial.

How I should change cxf-codegen-plugin (3.0.4) dependencies in pom.xml that it will generate classes?

My last pom.xml is below.

P.S. I am trying to generate classes with last version of cxf-codegen-plugin, because I am receiving

javax.xml.ws.soap.SOAPFaultException: No conduit initiator was found for the namespace http://schemas.xmlsoap.org/soap/http. at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156) at com.sun.proxy.$Proxy122.getLocations(Unknown Source)

in builds deployed on heroku. Codeship.com (our testing environment) and localhost never throws such exception.

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>MindBodyCXF</groupId>
    <artifactId>CXFSpring</artifactId>
    <packaging>war</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>CXFSpring Maven Webapp</name>
    <url>http://maven.apache.org</url>
    <properties>
        <cxf.version>3.0.4</cxf.version>
        <hibernate-jpa-2.1-api.version>1.0.0.Final</hibernate-jpa-2.1-api.version>
        <hibernate-entitymanager.version>4.3.8.Final</hibernate-entitymanager.version>
        <hyperjaxb3-ejb.version>0.6.0</hyperjaxb3-ejb.version>
        <hsqldb.version>2.3.2</hsqldb.version>
        <hibernate.maven.plugin.version>2.2</hibernate.maven.plugin.version>
    </properties>
    <dependencies>
        <!-- Spring -->

        <!-- Apache CXF -->
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
            <version>${cxf.version}</version>
            <!--
                        <exclusions>
                            <exclusion>
                                <artifactId>woodstox-core-asl</artifactId>
                                <groupId>org.codehaus.woodstox</groupId>
                            </exclusion>
                            <exclusion>
                                <artifactId>xmlschema-core</artifactId>
                                <groupId>org.apache.ws.xmlschema</groupId>
                            </exclusion>
                        </exclusions>
            -->

        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-bundle</artifactId>
            <version>2.7.15</version>
        </dependency>


        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-tools-common</artifactId>
            <version>2.2.4</version>
        </dependency>


        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http</artifactId>
            <version>${cxf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http-jetty</artifactId>
            <version>${cxf.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-databinding-jaxb</artifactId>
            <version>${cxf.version}</version>
        </dependency>
        <!-- Hibernate -->
        <dependency>
            <groupId>org.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.1-api</artifactId>
            <version>${hibernate-jpa-2.1-api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>${hibernate-entitymanager.version}</version>
        </dependency>
        <!-- Hyperjaxb3 -->
        <dependency>
            <groupId>org.jvnet.hyperjaxb3</groupId>
            <artifactId>hyperjaxb3-ejb-runtime</artifactId>
            <version>${hyperjaxb3-ejb.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>persistence-api</artifactId>
                    <groupId>javax.persistence</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <!--PostgresSQL-->
        <dependency>
            <groupId>postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>9.1-901.jdbc4</version>
        </dependency>
        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.6.1</version>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.7</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-core</artifactId>
            <version>3.0.4</version>
        </dependency>

        <dependency>
            <groupId>commons-net</groupId>
            <artifactId>commons-net</artifactId>
            <version>3.3</version>
        </dependency>
        <dependency>
            <groupId>net.coobird</groupId>
            <artifactId>thumbnailator</artifactId>
            <version>[0.4, 0.5)</version>
        </dependency>

        <dependency>
            <groupId>com.stripe</groupId>
            <artifactId>stripe-java</artifactId>
            <version>1.21.0</version>
        </dependency>

        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
            <version>3.0</version>
        </dependency>

    </dependencies>
    <build>
        <finalName>MindBodyCXF</finalName>
        <plugins>
            <!--hibernate plugin for ddl creation-->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>hibernate3-maven-plugin</artifactId>
                <version>${hibernate.maven.plugin.version}</version>
                <executions>
                    <execution>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>hbm2ddl</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <components>
                        <component>
                            <name>hbm2ddl</name>
                            <implementation>jpaconfiguration</implementation>
                            <outputDirectory>src/main/resources/hbm2ddl</outputDirectory>
                        </component>
                    </components>
                    <componentProperties>
                        <persistenceunit>integration.mindbody</persistenceunit>
                        <propertyfile>src/test/resources/persistence.properties</propertyfile>
                        <outputfilename>schema.ddl</outputfilename>

                        <drop>true</drop>
                        <create>true</create>
                        <export>true</export>
                        <format>true</format>
                    </componentProperties>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>postgresql</groupId>
                        <artifactId>postgresql</artifactId>
                        <version>9.1-901.jdbc4</version>
                    </dependency>
                </dependencies>
            </plugin>

            <!--cxf plugin for wsdl 2 java-->
            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-codegen-plugin</artifactId>
                <version>${cxf.version}</version>
                <executions>
                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>wsdl2java</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sourceRoot>${project.build.sourceDirectory}</sourceRoot>
                    <defaultOptions>
<!--
                        <extraargs>
                            <extraarg>-p</extraarg>
                            <extraarg>http://www.w3.org/2001/XMLSchema=integration.mindbody</extraarg>
                            <extraarg>-p</extraarg>
                            <extraarg>http://clients.mindbodyonline.com/api/0_5=integration.mindbody</extraarg>
                            <extraarg>-p</extraarg>
                            <extraarg>http://clients.mindbodyonline.com/API/0_4=integration.mindbody</extraarg>
                        </extraargs>
-->
                    </defaultOptions>
                    <wsdlOptions>
                        <wsdlOption>
                            <!--convert it separately-->
                            <wsdl>https://api.mindbodyonline.com/0_5/ClientService.asmx?wsdl</wsdl>
                            <!--<wsdl>https://api.mindbodyonline.com/0_5/SaleService.asmx?wsdl</wsdl>-->
                            <!--<wsdl>https://api.mindbodyonline.com/0_5/SiteService.asmx?wsdl</wsdl>-->
                            <!--<wsdl>https://api.mindbodyonline.com/0_5/ClassService.asmx?wsdl</wsdl>-->
                            <!--
                            WARNING: add new schema mindbody to classes and in dll
                            @Table(schema = "mindbody", name
                            to
                            @Table(schema = "mindbody", name
                            -->
                            <bindingFiles>
                                <bindingFile>${basedir}/src/main/wsdl/binding.xml</bindingFile>
                            </bindingFiles>
                            <extraargs>
                                <!-- Turns on the hashCode plugin -->
                                <extraarg>-xjc-XhashCode</extraarg>
                                <!-- Turns on the equals plugin -->
                                <extraarg>-xjc-Xequals</extraarg>
                                <extraarg>-xjc-XtoString</extraarg>
                                <!-- Turns on the Hyperjaxb3 EJB plugin -->
                                <extraarg>-xjc-Xhyperjaxb3-ejb</extraarg>
                                <extraarg>-xjc-XfixJAXB1058</extraarg>
                                <!--<extraarg>-xjc-enableIntrospection</extraarg>-->
                                <extraarg>-xjc-Xinheritance</extraarg>
                                <extraarg>-xjc-extension</extraarg>
                                <extraarg>-xjc-Xannotate</extraarg>
                                <extraarg>-impl</extraarg>
                                <extraarg>-verbose</extraarg>
                            </extraargs>
                        </wsdlOption>
                    </wsdlOptions>

                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.jvnet.jaxb2_commons</groupId>
                        <artifactId>jaxb2-basics</artifactId>
                        <version>0.9.3</version>
                    </dependency>
                    <dependency>
                        <groupId>org.jvnet.hyperjaxb3</groupId>
                        <artifactId>hyperjaxb3-ejb-plugin</artifactId>
                        <version>${hyperjaxb3-ejb.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.sun.xml.bind</groupId>
                        <artifactId>jaxb-xjc</artifactId>
                        <version>2.1.8</version>
                    </dependency>
                    <dependency>
                        <groupId>com.sun.xml.bind</groupId>
                        <artifactId>jaxb-impl</artifactId>
                        <version>2.1.8</version>
                    </dependency>

                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <configuration>
                            <target>
                                <move todir="${project.basedir}/src/main/webapp/META-INF"
                                      overwrite="true">
                                    <fileset dir="${project.build.sourceDirectory}/META-INF"/>
                                </move>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <!--to allow hbm generation-->
        <resources>
            <resource>
                <directory>src/main/wsdl</directory>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>META-INF/persistence.xml</include>
                </includes>
            </resource>
        </resources>
    </build>
</project>

Overriding default naming strategy

Hello dear @highsource.

We are trying to move a legacy project from Java 7 to Java 8.

Using the latest hyperjaxb3 maven plugin (6.1) we get the new naming strategy that adds underscores in table names and removes underscores from enums.

I'm trying to override this (just the table names to begin with) using the example from here and your comments in various issues on Stack Overflow.

When running the build I can see that the spring bean is not loaded, I've tried to trace the cause for this but I had no luck:

17:20:51.335 [main] DEBUG org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loaded 46 bean definitions from location pattern [classpath*:org/jvnet/hyperjaxb3/ejb/jpa2/plugin/applicationContext.xml]
17:20:51.335 [main] DEBUG org.springframework.core.CollectionFactory - Falling back to plain [java.util.HashSet] for linked set
17:20:51.335 [main] DEBUG org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loaded 0 bean definitions from location pattern [classpath*:org/jvnet/hyperjaxb3/ejb/jpa2/plugin/custom/applicationContext.xml]

I've tried to upload a sample project but I do not have proper access. I'll include the files here:

CustomSimpleNoUnderscoreNaming.java

package abc.naming;

import org.jvnet.hyperjaxb3.ejb.strategy.mapping.Mapping;
import org.jvnet.hyperjaxb3.ejb.strategy.naming.impl.DefaultNaming;

public class CustomSimpleNoUnderscoreNaming extends DefaultNaming {

    @Override
    public String getName(Mapping context, final String draftName) {
        // throw new RuntimeException();
        String name = super.getName(context, draftName);
        if (name.endsWith("_")) {
            return name.replace("_", "") + "_";
        } else {
            return name.replace("_", "");
        }
    }
}

applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
	
    <bean name="naming" class="org.abc.naming.CustomSimpleNoUnderscoreNaming">
        <property name="reservedNames" ref="reservedNames"/>
        <property name="ignoring" ref="ignoring"/>
    </bean>
</beans>

pom.xml

<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.abc</groupId>
    <artifactId>abc.naming</artifactId>
    <version>2019.11.08</version>
    <packaging>jar</packaging>
    <dependencies>
        <dependency>
            <groupId>org.jvnet.hyperjaxb3</groupId>
            <artifactId>hyperjaxb3-ejb-plugin</artifactId>
            <version>0.6.2</version>
            <type>jar</type>
        </dependency>
    </dependencies>
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
    </build>
    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
</project>

generated entities pom.xml

<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>
    <groupId>org.abc</groupId>
    <artifactId>abc.generated.entities</artifactId>
    <packaging>jar</packaging>
    <name>abc.generated.entities</name>
    <version>2019.11.08</version>    
    
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>
    
    <build>   
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
            
            <resource> <!--do not distribute documentation -->
                <directory>docs</directory>
                <excludes>
                    <exclude>**</exclude> 
                </excludes>
            </resource>
            
            <resource> 
                <directory>src/test/generated</directory>
                <excludes>
                    <exclude>**/*.java</exclude> 
                </excludes>
            </resource>

        </resources>
        
        <plugins>
            
            <plugin> <!-- for each build, remove the logs for test and execution -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>auto-clean</id>
                        <phase>clean</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>src/main/generated</directory>
                        </fileset> 
                        <fileset>
                            <directory>src/test/generated</directory>
                        </fileset> 
                        <fileset>
                            <directory>test_data</directory>
                        </fileset> 
                    </filesets>
                </configuration>
            </plugin>
            
            
            <plugin>
                <groupId>org.jvnet.hyperjaxb3</groupId>
                <artifactId>maven-hyperjaxb3-plugin</artifactId>
                <version>0.6.1</version>   
                <configuration>
                    <variant>jpa2</variant>
                    <extension>true</extension>
                    <removeOldOutput>true</removeOldOutput>
                    <args>
                        <arg>-Xannotate</arg>
                    </args>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-core</artifactId>
                        <version>${org.hibernate.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.abc</groupId>
                        <artifactId>abc.naming</artifactId>
                        <version>2019.11.08</version>
                    </dependency>
                </dependencies>
                <executions>      
                    <execution>
                        <id>test_data_structure</id>
                        <configuration> 
                            <schemaDirectory>src/test/resources/schemas/</schemaDirectory>
                            <generateDirectory>src/test/generated</generateDirectory>
                        </configuration>                
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>tracker_data_structure</id>
                        <configuration> 
                            <schemaDirectory>src/main/resources/schemas/tracker</schemaDirectory>
                            <bindingDirectory>src/main/resources/schemas/tracker</bindingDirectory>
                            <generateDirectory>src/main/generated</generateDirectory>
                            <removeOldOutput>true</removeOldOutput>
                            <variant>jpa2</variant>
                            <extension>true</extension>
                        </configuration>                
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>

            </plugin>
         
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/main/generated</source>
                                <source>src/test/generated</source>
                            </sources>
                        </configuration>
                    </execution>
              
                </executions>
            </plugin> 
            
           
            <plugin> <!--to configure the jdk version to compile -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <excludes>
                        <exclude>**/*Adapter*.java</exclude> <!--to avoid compiling Adapters from both main and test -->
                    </excludes>
                </configuration>
            </plugin>
            
            <plugin> <!--to configure test environment: junit4, run tests and install with test failure (generate jars)  -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M3</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit4</artifactId>
                        <version>3.0.0-M3</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <testFailureIgnore>false</testFailureIgnore> 
                    <skipTests>false</skipTests>
                    <excludes> <!-- http://ant.apache.org/manual/dirtasks.html -->
                        <exclude>**/IT*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <descriptors>
                        <descriptor>src/assemble/bin.xml</descriptor>
                    </descriptors>
                    <descriptorRefs>
                        <descriptorRef>src</descriptorRef>
                    </descriptorRefs>
                    <formats>
                        <format>jar</format>
                         
                    </formats>
                </configuration>
        
                <executions>
                    <execution>
                        <id>make-assembly</id> 
                        <phase>package</phase> 
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    
    <dependencies>
        <dependency>
            <groupId>org.jvnet.hyperjaxb3</groupId>
            <artifactId>hyperjaxb3-ejb-plugin</artifactId>
            <version>0.6.1</version>
        </dependency>
        <dependency>
            <groupId>org.jvnet.hyperjaxb3</groupId>
            <artifactId>hyperjaxb3-ejb-runtime</artifactId>
            <version>0.6.1</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.1-api</artifactId>
            <version>1.0.2.Final</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>5.1.17.Final</version>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.10.5</version>
        </dependency>   
    </dependencies>
    
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

</project>

Thank you in advance for offering your support,
Xaderfos

How to generate classes with composite key that includes foreign key?

Hi @highsource,
I have met another situation, which I currently can't resolve, maybe you can help:

each site in model I have mentioned before in https://github.com/highsource/hyperjaxb3-support/tree/master/m/MindBody is working separately from each other.
So when I want to persist information from different site in one database I need to create composite key which includes current entity id and make foreign key of site as another part of composite primary key.

For example, composite primary key for Class should consist of id (Class property) and site_mobject_id (foreign key in @manytoone relationship).
If I don't do this, entities will overwrite each other.

I haven't found this case in http://confluence.highsource.org/display/HJ3/Reference+-+single+page#Reference-singlepage-Supportforcompositeprimarykeys

So, how I can edit binding.xml to generate composite primary key that will include current entities' id and id of site (property in @manytoone relationship of @MappedSuperclass MBObject) ?

P.S. I have added the same question in stackoverflow, that others can easily find your answers - http://stackoverflow.com/questions/29465644/how-to-generate-classes-with-composite-key-that-includes-foreign-key-by-hyperjax

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.