<?xml version="1.0" encoding="UTF-8"?>
<!--
  JBoss, Home of Professional Open Source
  Copyright 2010, Red Hat Middleware LLC, and individual contributors
  by the @authors tag. See the copyright.txt in the distribution for a
  full listing of individual contributors.

  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.seam</groupId>
      <artifactId>seam-parent</artifactId>
      <version>9</version>
   </parent>

   <groupId>org.jboss.seam.solder</groupId>
   <artifactId>seam-solder-parent</artifactId>
   <packaging>pom</packaging>
   <version>3.0.0.Final</version>

   <name>Seam Solder Project</name>
   <description>A portable CDI extensions library for developing CDI applications, frameworks or other extensions</description>
   <url>http://seamframework.org/Seam3/Solder</url>
   <inceptionYear>2008</inceptionYear>

   <licenses>
      <license>
         <name>Apache License, Version 2.0</name>
         <distribution>repo</distribution>
         <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
      </license>
   </licenses>

   <modules>
      <module>api</module>
      <module>tooling</module>
      <module>impl</module>
      <module>combined</module>
   </modules>

   <properties>
      <seam.version>3.0.0.Final</seam.version>
      <emma.version>2.0.5312</emma.version>
   </properties>

   <!-- Import the BOMs -->
   <dependencyManagement>
      <dependencies>

         <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>seam-bom</artifactId>
            <version>${seam.version}</version>
            <scope>import</scope>
            <type>pom</type>
         </dependency>

         <!-- Override submodule versions from org.jboss.seam:seam-bom -->
         <dependency>
            <groupId>org.jboss.seam.solder</groupId>
            <artifactId>seam-solder-api</artifactId>
            <version>${project.version}</version>
         </dependency>

         <dependency>
            <groupId>org.jboss.seam.solder</groupId>
            <artifactId>seam-solder-impl</artifactId>
            <version>${project.version}</version>
         </dependency>

         <dependency>
            <groupId>org.jboss.seam.solder</groupId>
            <artifactId>seam-solder-tooling</artifactId>
            <version>${project.version}</version>
         </dependency>

         <dependency>
            <groupId>org.jboss.seam.solder</groupId>
            <artifactId>seam-solder</artifactId>
            <version>${project.version}</version>
         </dependency>

      </dependencies>
   </dependencyManagement>

   <profiles>
      <profile>
         <id>distribution</id>
         <activation>
            <property>
               <name>release</name>
            </property>
         </activation>
         <modules>
            <module>docs</module>
            <module>dist</module>
         </modules>
      </profile>
      <profile>
         <id>jboss-public-repository</id>
         <activation>
            <property>
               <name>jboss-public-repository</name>
               <value>!false</value>
            </property>
         </activation>
         <repositories>
            <repository>
               <id>jboss-public-repository-group</id>
               <name>JBoss Public Maven Repository Group</name>
               <url>http://repository.jboss.org/nexus/content/groups/public</url>
               <releases>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
               </releases>
               <snapshots>
                  <enabled>false</enabled>
                  <updatePolicy>never</updatePolicy>
               </snapshots>
            </repository>
         </repositories>
         <pluginRepositories>
            <pluginRepository>
               <id>jboss-public-repository-group</id>
               <name>JBoss Public Maven Repository Group</name>
               <url>http://repository.jboss.org/nexus/content/groups/public</url>
               <releases>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
               </releases>
               <snapshots>
                  <enabled>false</enabled>
                  <updatePolicy>never</updatePolicy>
               </snapshots>
            </pluginRepository>
         </pluginRepositories>
      </profile>
      <profile>
         <id>code-coverage</id>
         <build>
            <pluginManagement>
               <plugins>
                  <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>emma-maven-plugin</artifactId>
                     <executions>
                        <execution>
                           <id>instrumentation</id>
                           <phase>process-test-classes</phase>
                           <goals>
                              <goal>instrument</goal>
                           </goals>
                           <configuration>
                              <verbose>true</verbose>
                           </configuration>
                        </execution>
                     </executions>
                  </plugin>
                  <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-surefire-plugin</artifactId>
                     <configuration>
                        <classesDirectory>${project.build.directory}/classes</classesDirectory>
                     </configuration>
                     <executions>
                        <execution>
                           <id>surefire-it</id>
                           <phase>integration-test</phase>
                           <goals>
                              <goal>test</goal>
                           </goals>
                        </execution>
                     </executions>
                  </plugin>
                  <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-dependency-plugin</artifactId>
                     <executions>
                        <execution>
                           <id>deploy-emma-jar</id>
                           <phase>process-test-sources</phase>
                           <goals>
                              <goal>copy</goal>
                           </goals>
                           <configuration>
                              <artifactItems>
                                 <artifactItem>
                                    <groupId>emma</groupId>
                                    <artifactId>emma</artifactId>
                                    <version>${emma.version}</version>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${env.JBOSS_HOME}/server/default/lib</outputDirectory>
                                 </artifactItem>
                              </artifactItems>
                           </configuration>
                        </execution>
                     </executions>
                  </plugin>
                  <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-antrun-plugin</artifactId>
                     <executions>
                        <execution>
                           <id>complete classpath for tests</id>
                           <phase>process-test-classes</phase>
                           <goals>
                              <goal>run</goal>
                           </goals>
                           <configuration>
                              <tasks>
                                 <echo message="Copy instrumented classes to the regular classes dir" />
                                 <delete dir="${project.build.directory}/classes" />
                                 <mkdir dir="${project.build.directory}/classes" />
                                 <copy todir="${project.build.directory}/classes" overwrite="true">
                                    <fileset dir="${project.build.directory}/generated-classes/emma/classes">
                                       <include name="**/*" />
                                    </fileset>
                                 </copy>
                              </tasks>
                           </configuration>
                        </execution>
                        <execution>
                           <id>retrieve-coverage-file</id>
                           <phase>post-integration-test</phase>
                           <goals>
                              <goal>run</goal>
                           </goals>
                           <configuration>
                              <tasks>
                                 <move file="${env.JBOSS_HOME}/bin/coverage.ec" todir="${basedir}" failonerror="false" verbose="true" />
                              </tasks>
                           </configuration>
                        </execution>
                        <execution>
                           <id>remove-coverage-files</id>
                           <phase>verify</phase>
                           <goals>
                              <goal>run</goal>
                           </goals>
                           <configuration>
                              <tasks>
                                 <delete file="${basedir}/transaction.log" failonerror="false" />
                                 <delete file="${basedir}/coverage.ec" failonerror="false" />
                              </tasks>
                           </configuration>
                        </execution>
                     </executions>
                  </plugin>
                  <plugin>
                     <groupId>org.sonatype.maven.plugin</groupId>
                     <artifactId>emma4it-maven-plugin</artifactId>
                     <executions>
                        <execution>
                           <id>report</id>
                           <phase>post-integration-test</phase>
                           <goals>
                              <goal>report</goal>
                           </goals>
                           <configuration>
                              <sourceSets>
                                 <sourceSet>
                                    <directory>${project.build.sourceDirectory}</directory>
                                 </sourceSet>
                              </sourceSets>
                           </configuration>
                        </execution>
                     </executions>
                  </plugin>
               </plugins>
            </pluginManagement>
         </build>
      </profile>
   </profiles>

   <scm>
      <connection>scm:git:git://github.com/seam/solder.git</connection>
      <developerConnection>scm:git:git://github.com/seam/solder.git</developerConnection>
      <url>http://github.com/seam/solder</url>
   </scm>

   <issueManagement>
      <system>JIRA</system>
      <url>http://issues.jboss.org/browse/SOLDER</url>
   </issueManagement>

   <ciManagement>
      <system>Hudson</system>
      <url>http://hudson.jboss.org/hudson/view/Seam/job/Seam-3.X-solder-CI</url>
   </ciManagement>

   <developers>

      <developer>
         <name>Stuart Douglas</name>
         <url>http://community.jboss.org/people/swd847</url>
         <organization>Red Hat Inc.</organization>
         <timezone>+11</timezone>
         <roles>
            <role>Lead</role>
         </roles>
      </developer>

      <developer>
         <name>Pete Muir</name>
         <email>pete.muir@jboss.org</email>
         <organization>Red Hat Inc.</organization>
         <url>http://in.relation.to/Bloggers/Pete</url>
         <timezone>0</timezone>
         <roles>
            <role>Founder</role>
            <role>Committer</role>
         </roles>
      </developer>

      <developer>
         <name>Shane Bryzak</name>
         <email>shane.bryzak@jboss.org</email>
         <url>http://community.jboss.org/people/shane.bryzak%40jboss.com</url>
         <organization>Red Hat Inc.</organization>
         <timezone>+10</timezone>
         <roles>
            <role>Committer</role>
         </roles>
      </developer>

      <developer>
         <name>Dan Allen</name>
         <email>dan.j.allen@gmail.com</email>
         <url>http://community.jboss.org/people/dan.j.allen</url>
         <organization>JBoss, by Red Hat</organization>
         <timezone>-5</timezone>
         <roles>
            <role>Committer</role>
         </roles>
      </developer>

   </developers>

</project>
