Currently, the way I integrate maven2 and jibx into my project is to specify the repository inside my POM:

  <repositories>
    <!-- add in jibx repository -->
    <repository>
      <releases>
            <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>jibx.sf.net</id>
          <name>JiBX Repository</name>
          <url>http://jibx.sf.net/maven2</url>
        </repository>
  </repositories>

Then I add the dependency:

      <dependency>
        <groupId>org.jibx</groupId>
        <artifactId>jibx-extras</artifactId>
        <version>1.1</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jibx</groupId>
        <artifactId>jibx-bind</artifactId>
        <version>1.1</version>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>bcel</groupId>
        <artifactId>bcel</artifactId>
        <version>5.1</version>
        <scope>compile</scope>
      </dependency>
    <dependency>
      <groupId>xpp3</groupId>
      <artifactId>xpp3</artifactId>
      <version>1.1.3.4.O</version>
    </dependency>
    <dependency>
      <groupId>org.jibx</groupId>
      <artifactId>jibx-run</artifactId>
      <version>1.1</version>
    </dependency>

Currently, I don't believe there's a jibx plugin to work with maven2 to do the binding, so I am using ANT script within maven2 to do the jibx binding right after compilation:

        <!-- run jibx binding after classes are compiled -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <executions>
            <execution>
              <phase>process-classes</phase>
              <configuration>
                <tasks>
                  <taskdef name="bind" classname="org.jibx.binding.ant.CompileTask">
                    <classpath refid="maven.compile.classpath"/>
                  </taskdef>
                  <bind verbose="false" load="true">
                    <bindingfileset dir="${basedir}/bindings"/>
                    <classpathset dir="${project.build.outputDirectory}"/>
                  </bind>
                </tasks>
              </configuration>
              <goals>
                <goal>run</goal>
              </goals>
              <inherited>true</inherited>
            </execution>
          </executions>
        </plugin>

This is working out perfectly because right after compilation, it will process the classes and do the bindings.  After that, it will run the tests, which essentially works as expected.

Hope this helps.

Thanks,
Chris

On Jun 26, 2006, at 9:39 PM, Henri Dupre wrote:



On 6/26/06, Chris Chen <[EMAIL PROTECTED]> wrote:
JiBX has a semi-working maven2 remote repository hosting its own jibx
jar files at

http://jibx.sf.net/maven2/

You will need to add this repository into your POM file and it should
work fine, but you'll get some warnings during downloading and such.
 
Hmmm ok, I'm still a maven ignorant... By setting this repository, will something magical compile with jibx my files?
That's the part I'm worried... I'd like maven2 to make me a war file and in the process also compile my jibx files.
 
Thanks,

Henri.
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
_______________________________________________
jibx-users mailing list

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to