Maven Mulitmodule jibx Project

271 Views Asked by At

I have a Multimodule project like this:

  • parent
    • entities
    • jibx-exporter

I have configured jibx in the pom of jibx-exporter like this:

<plugin>
    <groupId>org.jibx</groupId>
    <artifactId>jibx-maven-plugin</artifactId>
    <version>1.2.3</version>
    <configuration>
        <directory>src/main/resources</directory>
        <includes>
            <include>binding0.xml</include>
        </includes>
        <validate>true</validate>
        <verbose>true</verbose>
        <load>false</load>
        <verify>false</verify>
        <multimodule>true</multimodule>
        <modules>
            <module>com.dreipplus.profiler.server.api:profiler-server-api-vo</module>
        </modules>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>bind</goal>
            </goals>
            <phase>process-classes</phase>
        </execution>
    </executions>
</plugin>

When i run mvn clean install on parent it works as expected. But when i execute the application, the jibx bindings of entities are not in the installed jar.

How can i add this Generated files to the local maven repository (.m2)?

greeting Florian Huber

2

There are 2 best solutions below

0
On BEST ANSWER

I have moved the binding into the Entititys Module, all generated Classes are now properly exported!

1
On

I think that the following command solves your problem.

mvn install:install-file -Dfile=xxx.jar -DgroupId=<group-id> -DartifactId=<artifact-id>

http://maven.apache.org/plugins/maven-install-plugin/usage.html