<?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.2.3</version>
  </parent>

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

  <name>jibx-tools - JiBX tools</name>
  <description>JiBX tools 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 the repo. -->
	    <plugins>
	      <plugin>
	        <inherited>true</inherited>
	        <groupId>org.apache.maven.plugins</groupId>
	        <artifactId>maven-compiler-plugin</artifactId>
	        <configuration>
	          <excludes>
	            <exclude>**/**</exclude>	<!-- This will not compile any, but include the source in the dist -->
	          </excludes>
	        </configuration>
	      </plugin>
	      <plugin>
	        <artifactId>maven-resources-plugin</artifactId>
	        <version>2.4.3</version>
	        <executions>
          <execution>
            <id>copy-jibx-tools</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/schema/codegen/**/*.java</include>
                    <include>org/jibx/schema/generator/**/*.java</include>
                    <include>org/jibx/binding/generator/**/*.java</include>
                    <include>org/jibx/custom/**/*.java</include>
                    <include>org/jibx/ws/wsdl/**/*.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.schema.codegen.*;version=${project.version},  <!-- In jibx-tools -->
                org.jibx.schema.generator.*;version=${project.version},  <!-- In jibx-tools -->
                org.jibx.binding.generator.*;version=${project.version},  <!-- In jibx-tools -->
                org.jibx.custom.*;version=${project.version},  <!-- In jibx-tools -->
                org.jibx.ws.*;version=${project.version},  <!-- In jibx-tools -->
            </Export-Package>
	    <Include-Resource>@${jibxLibDir}/jibx-tools.jar;inline=**</Include-Resource>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>jibx-schema</artifactId>
      <version>1.2.3</version>
    </dependency>

      <!-- Eclipse dependencies -->
      <dependency>
          <groupId>org.eclipse.jdt</groupId>
          <artifactId>core</artifactId>
          <exclusions>
              <exclusion>
                  <groupId>org.eclipse.equinox</groupId>
                  <artifactId>common</artifactId>
              </exclusion>
              <exclusion>
                  <groupId>org.eclipse.equinox</groupId>
                  <artifactId>app</artifactId>
              </exclusion>
          </exclusions>
      </dependency>
      <dependency>
          <groupId>org.eclipse.equinox</groupId>
          <artifactId>common</artifactId>
      </dependency>
  </dependencies>

</project>
