<?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>
    <groupId>org.jibx.config</groupId>
    <artifactId>main-reactor</artifactId>
    <version>1.3.1</version>
  </parent>

  <groupId>org.jibx</groupId>
  <artifactId>jibx-run</artifactId>
  <packaging>bundle</packaging>

  <name>jibx-run - JiBX runtime</name>
  <description>JiBX runtime code</description>
  
  <profiles>
    <profile> 
      <id>sonatype-oss-release</id>
      <build>
      <!-- ***CAREFUL*** This logic moves the source code to the current project, then
      does NOT compile it. This way, the api and source are in maven central. -->
	    <plugins>
	      <plugin>
	        <artifactId>maven-resources-plugin</artifactId>
	        <version>2.4.3</version>
	        <executions>
	          <execution>
	            <id>copy-jibx-run</id>
	            <phase>validate</phase>
	            <goals>
	              <goal>copy-resources</goal>
	            </goals>
	            <configuration>
	              <outputDirectory>${basedir}/src/main/java</outputDirectory>
	              <resources>          
	                <resource>
	                  <directory>${coreSourceDir}</directory>
	                  <filtering>false</filtering>
	                  <includes>
	                    <include>org/jibx/runtime/**/*.java</include>
	                  </includes>
	                </resource>
	              </resources>              
	            </configuration>            
	          </execution>
	        </executions>
	      </plugin>
	    </plugins>
      </build>
    </profile>
  </profiles>
  
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Export-Package>
                org.jibx.runtime.*;version=${project.version},
            </Export-Package>
	    <Include-Resource>@${jibxLibDir}/jibx-run.jar;inline=**</Include-Resource>
	    <Main-Class>org.jibx.runtime.PrintInfo</Main-Class>
	    <Class-Path>xpp3.jar stax-api.jar wstx-asl.jar</Class-Path>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
    </dependency>
    <dependency>
      <groupId>xpp3</groupId>
      <artifactId>xpp3</artifactId>
    </dependency>
  </dependencies>

</project>
