<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>
  <parent>
    <groupId>org.overlord.sramp.demos</groupId>
    <artifactId>s-ramp-demos</artifactId>
    <version>0.4.0.Final</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <artifactId>s-ramp-demos-switchyard</artifactId>
  <name>S-RAMP Demos: Switchyard Deployment</name>

  <properties>
    <switchyard.version>1.1.0.Final</switchyard.version>
  </properties>

  <repositories>
    <repository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>http://repository.jboss.org/nexus/content/groups/developer/</url>
      <layout>default</layout>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </snapshots>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>http://repository.jboss.org/nexus/content/groups/developer/</url>
      <layout>default</layout>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <dependencies>
    <dependency>
      <groupId>org.switchyard</groupId>
      <artifactId>switchyard-api</artifactId>
      <version>${switchyard.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.switchyard</groupId>
      <artifactId>switchyard-plugin</artifactId>
      <version>${switchyard.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.switchyard.components</groupId>
      <artifactId>switchyard-component-bean</artifactId>
      <version>${switchyard.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.switchyard.components</groupId>
      <artifactId>switchyard-component-soap</artifactId>
      <version>${switchyard.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <finalName>${project.artifactId}</finalName>
    <extensions>
      <extension>
        <groupId>org.overlord.sramp</groupId>
        <artifactId>s-ramp-wagon</artifactId>
      </extension>
    </extensions>
    <plugins>
      <plugin>
        <groupId>org.switchyard</groupId>
        <artifactId>switchyard-plugin</artifactId>
        <version>${switchyard.version}</version>
        <configuration>
          <scannerClassNames>
            <param>org.switchyard.component.bean.config.model.BeanSwitchYardScanner</param>
            <param>org.switchyard.transform.config.model.TransformSwitchYardScanner</param>
          </scannerClassNames>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>configure</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.switchyard</groupId>
                    <artifactId>switchyard-plugin</artifactId>
                    <versionRange>[1.0.0.Final,)</versionRange>
                    <goals>
                      <goal>configure</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>demo</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <configuration>
              <skip>false</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <repository>
          <id>local-sramp-repo</id>
          <name>S-RAMP Releases Repository</name>
          <url>sramp://localhost:8080/s-ramp-server/?artifactType=SwitchYardApplication</url>
        </repository>
        <snapshotRepository>
          <id>local-sramp-repo-snapshots</id>
          <name>S-RAMP Snapshots Repository</name>
          <url>sramp://localhost:8080/s-ramp-server/?artifactType=SwitchYardApplication</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
  </profiles>

</project>
