<!--
  Copyright (C) FuseSource, Inc.
  http://fusesource.com

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
    limitations under the License.
  -->

<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.jboss.fuse.bom</groupId>
    <artifactId>jboss-fuse</artifactId>
    <version>7.3.0.redhat-SNAPSHOT</version>
    <relativePath>..</relativePath>
  </parent>

  <groupId>org.fusesource</groupId>
  <artifactId>fuse-project</artifactId>
  <packaging>pom</packaging>
  
  <name>Fuse Fabric :: Parent</name>

  <url>http://fabric.fusesource.org/</url>

    <dependencies>

        <!-- test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit-version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j-version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <defaultGoal>install</defaultGoal>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <pluginManagement>
            <plugins>
               <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${maven-bundle-plugin-version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <excludeDependencies>${fuse.osgi.exclude.dependencies}</excludeDependencies>
                        <instructions>
                            <Bundle-Name>${fuse.osgi.bundle.name}</Bundle-Name>
                            <Bundle-SymbolicName>${fuse.osgi.symbolic.name}</Bundle-SymbolicName>
                            <Bundle-DocURL>http://fabric.fusesource.org/</Bundle-DocURL>
                            <Bundle-Activator>${fuse.osgi.activator}</Bundle-Activator>
                            <Export-Package>${fuse.osgi.export}</Export-Package>
                            <Import-Package>${fuse.osgi.import}</Import-Package>
                            <DynamicImport-Package>${fuse.osgi.dynamic}</DynamicImport-Package>
                            <Private-Package>${fuse.osgi.private.pkg}</Private-Package>
                            <Implementation-Title>FuseSource FON</Implementation-Title>
                            <Implementation-Version>${project.version}</Implementation-Version>
                            <Include-Resource>${fuse.osgi.resource}</Include-Resource>
                            <_versionpolicy>${fuse.osgi.import.default.version}</_versionpolicy>
                            <_failok>${fuse.osgi.failok}</_failok>
                            <Export-Service>${fuse.osgi.services.export}</Export-Service>
                            <Embed-Dependency>${fuse.osgi.embed.dependency}</Embed-Dependency>
                            <Embed-Transitive>${fuse.osgi.embed.transitive}</Embed-Transitive>
                            <Require-Bundle>${fuse.osgi.require.bundle}</Require-Bundle>
                            <Require-Capability>${fuse.osgi.capabilities.require}</Require-Capability>
                            <Provide-Capability>${fuse.osgi.capabilities.provide}</Provide-Capability>
                            <Service-Component>${fuse.osgi.service.component}</Service-Component>
                        </instructions>
                    </configuration>
                    <executions>
                        <execution>
                            <id>cleanVersions</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>cleanVersions</goal>
                            </goals>
                            <configuration>
                                <versions>
                                    <karaf.osgi.version>${karaf-version}</karaf.osgi.version>
                                </versions>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

              <!--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.apache.felix
                          </groupId>
                          <artifactId>
                            maven-bundle-plugin
                          </artifactId>
                          <versionRange>
                            [2.1.0,)
                          </versionRange>
                          <goals>
                            <goal>cleanVersions</goal>
                          </goals>
                        </pluginExecutionFilter>
                        <action>
                          <ignore />
                        </action>
                      </pluginExecution>
                    </pluginExecutions>
                  </lifecycleMappingMetadata>
                </configuration>
              </plugin>

              <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
                <version>${scala-plugin-version}</version>
                <executions>
                  <execution>
                    <goals>
                      <goal>compile</goal>
                      <goal>testCompile</goal>
                    </goals>
                    <configuration>
                      <args>
                        <arg>-deprecation</arg>
                      </args>
                      <compilerPlugins>
                        <compilerPlugin>
                          <groupId>org.fusesource.jvmassert</groupId>
                          <artifactId>jvmassert</artifactId>
                          <version>1.1</version>
                        </compilerPlugin>
                      </compilerPlugins>
                    </configuration>
                  </execution>
                </executions>
                <configuration>
                  <jvmArgs>
                    <jvmArg>-Xmx1024m</jvmArg>
                    <jvmArg>-Xss8m</jvmArg>
                  </jvmArgs>
                  <scalaVersion>${scala-version}</scalaVersion>
                </configuration>
              </plugin>
            </plugins>
          </pluginManagement>


        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin-version}</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.7</version>
            </plugin>

            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>build-helper-maven-plugin</artifactId>
              <version>1.5</version>
            </plugin>

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-archetype-plugin</artifactId>
              <version>2.2</version>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire-version}</version>
                <configuration>
                    <forkMode>once</forkMode>
                    <!-- these settings are mandatory to avoid SureFire giving a bogus system property to the web container -->
                    <useSystemClassLoader>false</useSystemClassLoader>
                    <useManifestOnlyJar>false</useManifestOnlyJar>
                    <failIfNoTests>false</failIfNoTests>
                    <runOrder>alphabetical</runOrder>
                    <includes>
                        <include>**/*Test.*</include>
                    </includes>
                    <excludes>
                    </excludes>
                    <systemPropertyVariables>
                        <basedir>${basedir}</basedir>
                        <project.version>${project.version}</project.version>
                    </systemPropertyVariables>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <inherited>true</inherited>
                <executions>
                    <execution>
                        <id>cleanVersions</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>cleanVersions</goal>
                        </goals>
                        <configuration>
                            <versions>
                                <fuse.osgi.version>${fabric.version}</fuse.osgi.version>
                            </versions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-antrun-plugin</artifactId>
               <version>1.7</version>
           </plugin>

          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-shade-plugin</artifactId>
              <version>1.5</version>
          </plugin>

          <plugin>
              <groupId>org.apache.servicemix.tooling</groupId>
              <artifactId>depends-maven-plugin</artifactId>
              <version>${depends-maven-plugin.version}</version>
          </plugin>
          <plugin>
              <groupId>org.fusesource.mvnplugins</groupId>
              <artifactId>maven-notices-plugin</artifactId>
              <version>1.29</version>
          </plugin>
         
        </plugins>
    </build>

  <profiles>

    <!--
        Do a license check by running       : mvn -P license license:check
        Update the license check by running : mvn -P license license:format
      -->
    <profile>
      <id>license</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.mycila.maven-license-plugin</groupId>
            <artifactId>maven-license-plugin</artifactId>
            <version>1.6.0</version>
            <configuration>
              <quiet>false</quiet>
              <header>src/main/resources/license-header.txt</header>
              <aggregate>true</aggregate>
              <includes>
                  <include>src/**</include>
                  <include>**/pom.xml</include>
              </includes>
              <excludes>
                <!-- can remove once http://code.google.com/p/maven-license-plugin/issues/detail?id=72 is resolved -->
                <exclude>**/*.scaml</exclude>
                <exclude>**/LICENSE.txt</exclude>
                <exclude>**/LICENSE</exclude>
                <exclude>**/.svn/**</exclude>

                <!-- ignore files produced during a build -->
                <exclude>**/target/**</exclude>

                <!-- ignore binary files -->
                <exclude>**/*.jpg</exclude>
                <exclude>**/*.png</exclude>
                <exclude>**/*.gif</exclude>
                <exclude>**/*.ico</exclude>
                <exclude>**/*.keystore</exclude>

              </excludes>
              <useDefaultExcludes>false</useDefaultExcludes>
              <mapping>
                  <jj>JAVADOC_STYLE</jj>
                  <proto>DOUBLESLASH_STYLE</proto>
                  <index>SCRIPT_STYLE</index>
              </mapping>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>snapshots</id>
      <properties>
        <snapshot-build>redhat-610-SNAPSHOT</snapshot-build>
        <activemq-version>5.9.0.${snapshot-build}</activemq-version>
        <aries.blueprint.version>1.0.1.${snapshot-build}</aries.blueprint.version>
        <aries.jmx.version>1.0.1.${snapshot-build}</aries.jmx.version>
        <aries.transaction.version>1.0.1.${snapshot-build}</aries.transaction.version>
        <aries.util.version>1.0.1.${snapshot-build}</aries.util.version>
        <aries.proxy.version>1.0.1.${snapshot-build}</aries.proxy.version>
        <camel-version>2.12.0.${snapshot-build}</camel-version>
        <cxf-version>2.7.0.${snapshot-build}</cxf-version>
        <felix-configadmin-version>1.4.0.${snapshot-build}</felix-configadmin-version>
        <felix-eventadmin-version>1.3.0.${snapshot-build}</felix-eventadmin-version>
        <felix-fileinstall-version>3.3.11.${snapshot-build}</felix-fileinstall-version>
        <felix-framework-version>4.0.3.${snapshot-build}</felix-framework-version>
        <felix-framework-security-version>2.0.1.${snapshot-build}</felix-framework-security-version>
        <karaf-version>2.3.0.${snapshot-build}</karaf-version>
        <servicemix.components.version>2013.01.0.${snapshot-build}</servicemix.components.version>
        <servicemix.features.version>4.5.0.${snapshot-build}</servicemix.features.version>
        <servicemix-nmr-version>1.6.0.${snapshot-build}</servicemix-nmr-version>
        <servicemix-specs-version>2.3.0.${snapshot-build}</servicemix-specs-version>
        <servicemix.utils.version>1.6.0.${snapshot-build}</servicemix.utils.version>
      </properties>
    </profile>

    <profile>
      <!-- builds using the FuseSource private release proxy to test builds before we ship them -->
      <id>rp</id>

      <repositories>
        <repository>
            <id>fusesource.rp</id>
            <name>FuseSource Community Early Access Release Repository</name>
            <url>http://repo.fusesource.com/nexus/content/groups/m2-release-proxy</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
            <id>fusesource.rp</id>
            <name>FuseSource Community Early Access Release Repository</name>
            <url>http://repo.fusesource.com/nexus/content/groups/m2-release-proxy</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>

</project>
