<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">
   <parent>
      <groupId>org.jboss</groupId>
      <artifactId>jboss-parent</artifactId>
      <version>3</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.jboss.security</groupId>
   <artifactId>jbosssx</artifactId>
   <packaging>pom</packaging>
   <version>2.0.2.beta</version>
   <name>JBoss Security Implementation for the JBAS - Aggregator</name>
   <url>http://labs.jboss.org/portal/jbosssecurity/</url>
   <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
   <licenses>
      <license>
         <name>lgpl</name>
         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
      </license>
   </licenses>
   <organization>
      <name>JBoss Inc.</name>
      <url>http://www.jboss.org</url>
   </organization>
   <repositories>
    <repository>
      <id>repository.jboss.org</id>
      <name>JBoss Repository</name>
      <layout>default</layout>
      <url>http://repository.jboss.org/maven2/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>

    <repository>
      <id>snapshots.jboss.org</id>
      <name>JBoss Snapshots Repository</name>
      <layout>default</layout>
      <url>http://snapshots.jboss.org/maven2/</url>
      <snapshots>
         <enabled>true</enabled>
      </snapshots>
      <releases>
         <enabled>false</enabled>
      </releases>
    </repository>
  </repositories>
   <modules>
     <module>identity</module>
     <module>jbosssx</module>
     <module>jbosssx-client</module>
     <module>acl</module>
   </modules>
   <profiles>
    <!--    mvn install -Psecurity-manager    -->
    <profile>
      <id>security-manager</id>
      <activation>
         <activeByDefault>false</activeByDefault>
      </activation>
      <properties>
         <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
         <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
         <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} ${test.env}</surefire.jvm.args>
      </properties>
      <modules>
        <module>jbosssx</module>
      </modules>
    </profile>
    <!--     mvn install -Psecurity-manager-debug   -->
    <!-- Best Practice:    mvn install -Psecurity-manager-debug  2>&1 > logfile2>&1 > logfile -->
    <profile>
      <id>security-manager-debug</id>
      <activation>
         <activeByDefault>false</activeByDefault>
      </activation>
      <properties>
         <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
         <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
         <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} -Djava.security.debug=failure,access ${test.env}</surefire.jvm.args>
      </properties>
      <modules>
        <module>jbosssx</module>
      </modules>
    </profile>
   </profiles>

   <build>
    <plugins>
      <!-- define that we wish to create src jars -->
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.0</version>
        <inherited>true</inherited>
        <executions>
          <execution>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
     </plugin>
     <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <printSummary>true</printSummary>
          <disableXmlReport>false</disableXmlReport>
          <testFailureIgnore>true</testFailureIgnore>
          <includes>
             <include>**/**TestCase.java</include>
          </includes>
          <forkMode>pertest</forkMode>
          <argLine>${surefire.jvm.args}</argLine>
          <useFile>false</useFile>
          <trimStackTrace>false</trimStackTrace>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>attached</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <descriptors>
            <descriptor>assembly/bin.xml</descriptor>
            <descriptor>assembly/sources.xml</descriptor>
          </descriptors>
        </configuration>
        <inherited>false</inherited>
      </plugin>
      <plugin>
        <groupId>org.jboss.maven.plugins</groupId>
        <artifactId>maven-jboss-deploy-plugin</artifactId>
        <version>1.5-SNAPSHOT</version>
        <executions>
          <execution>
            <id>jboss-deploy</id>
            <goals>
              <goal>jboss-deploy</goal>
            </goals>
            <phase>deploy</phase>
          </execution>
        </executions>
        <configuration>
          <groupId>jboss</groupId>
          <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
        </configuration>
      </plugin>  
    </plugins>
   </build>
   <dependencies>
     <dependency>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-common-core</artifactId>
        <version>2.2.1.GA</version>
        <scope>compile</scope>
     </dependency>
     <dependency>
        <groupId>jboss</groupId>
        <artifactId>jboss-logging-spi</artifactId>
        <version>2.0.2.GA</version>
        <scope>compile</scope>
     </dependency>
     <dependency>
        <groupId>jboss</groupId>
        <artifactId>jboss-logging-log4j</artifactId>
        <version>2.0.2.GA</version>
        <scope>runtime</scope>
     </dependency>
      <dependency>
         <groupId>org.jboss.security</groupId>
         <artifactId>jboss-security-spi</artifactId>
         <version>2.0.2.beta</version>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>apache-log4j</groupId>
         <artifactId>log4j</artifactId>
         <version>1.2.14</version>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>3.8.1</version>
         <scope>compile</scope>
      </dependency>
   </dependencies>
   <distributionManagement>
    <repository>
      <!-- Copy the distribution jar file to a local checkout of the maven rep
ositry
        -  This variable can be set in $MAVEN_HOME/conf/settings.xml -->
      <id>repository.jboss.org</id>
      <url>file://${maven.repository.root}</url>
    </repository>
    <snapshotRepository>
      <id>snapshots.jboss.org</id>
      <name>JBoss Inc. Repository</name>
      <layout>default</layout>
      <url>dav:https://snapshots.jboss.org/maven2/</url>
    </snapshotRepository>
   </distributionManagement>
</project>
