<?xml version="1.0" encoding="UTF-8"?>
<!--

    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

    Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved.

    The contents of this file are subject to the terms of either the GNU
    General Public License Version 2 only ("GPL") or the Common Development
    and Distribution License("CDDL") (collectively, the "License").  You
    may not use this file except in compliance with the License.  You can
    obtain a copy of the License at
    https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
    or packager/legal/LICENSE.txt.  See the License for the specific
    language governing permissions and limitations under the License.

    When distributing the software, include this License Header Notice in each
    file and include the License file at packager/legal/LICENSE.txt.

    GPL Classpath Exception:
    Oracle designates this particular file as subject to the "Classpath"
    exception as provided by Oracle in the GPL Version 2 section of the License
    file that accompanied this code.

    Modifications:
    If applicable, add the following below the License Header, with the fields
    enclosed by brackets [] replaced by your own identifying information:
    "Portions Copyright [year] [name of copyright owner]"

    Contributor(s):
    If you wish your version of this file to be governed by only the CDDL or
    only the GPL Version 2, indicate your decision by adding "[Contributor]
    elects to include this software in this distribution under the [CDDL or GPL
    Version 2] license."  If you don't indicate a single choice of license, a
    recipient has the option to distribute your version of this file under
    either the CDDL, the GPL Version 2 or to extend the choice of license to
    its licensees as provided above.  However, if you add GPL Version 2 code
    and therefore, elected the GPL Version 2 license, then the option applies
    only if the new code is made subject to such option by the copyright
    holder.

-->

<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>net.java</groupId>
        <artifactId>jvnet-parent</artifactId>
        <version>1</version>
    </parent>

    <groupId>org.glassfish.hk2</groupId>
    <artifactId>hk2-parent</artifactId>
    <packaging>pom</packaging>

    <version>1.6.14</version>
    <name>Modules Subsystem</name>
    <description>Generic Modules subsystem</description>

    <organization>
        <name>Oracle Corporation</name>
        <url>http://www.oracle.com</url>
    </organization>

    <developers>
        <developer>
            <id>kohuske</id>
            <name>Kohsuke Kawaguchi</name>
            <url>http://weblogs.java.net/blog/kohsuke</url>
            <organization>InfraDNA</organization>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
        <developer>
            <id>dochez</id>
            <name>Jerome Dochez</name>
            <url>http://blogs.sun.com/dochez</url>
            <organization>Oracle</organization>
            <roles>
                <role>lead</role>
                <role>developer</role>
            </roles>
        </developer>
        <developer>
            <id>ss141213</id>
            <name>Sanjeeb Sahoo</name>
            <url>http://weblogs.java.net/ss141213</url>
            <organization>Oracle</organization>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
        <developer>
            <id>jeff_trent</id>
            <name>Jeff Trent</name>
            <organization>Oracle</organization>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <mailingLists>
        <mailingList>
            <name>dev</name>
            <subscribe>http://java.net/projects/hk2/lists</subscribe>
            <post>dev@hk2.java.net</post>
            <archive>http://java.net/projects/hk2/lists/dev/archive</archive>
        </mailingList>
        <mailingList>
            <name>users</name>
            <subscribe>http://java.net/projects/hk2/lists</subscribe>
            <post>users@hk2.java.net</post>
            <archive>http://java.net/projects/hk2/lists/dev/archive</archive>
        </mailingList>
        <mailingList>
            <name>issues</name>
            <subscribe>http://java.net/projects/hk2/lists</subscribe>
            <post>issues@hk2.java.net</post>
            <archive>http://java.net/projects/hk2/lists/issues/archive</archive>
        </mailingList>
        <mailingList>
            <name>commits</name>
            <subscribe>http://java.net/projects/hk2/lists</subscribe>
            <post>commits@hk2.java.net</post>
            <archive>http://java.net/projects/hk2/lists/commits/archive</archive>
        </mailingList>
    </mailingLists>

    <scm>
      <connection>scm:svn:https://svn.java.net/svn/hk2~svn/tags/hk2-parent-1.6.14</connection>
      <developerConnection>scm:svn:https://svn.java.net/svn/hk2~svn/tags/hk2-parent-1.6.14</developerConnection>
      <url>https://svn.java.net/svn/hk2~svn/tags/hk2-parent-1.6.14</url>
    </scm>
    <repositories>
        <repository>
            <id>glassfish-maven-repository</id>
            <name>Glassfish repository</name>
            <url>http://maven.glassfish.org/content/groups/glassfish-group/</url>
            <snapshots>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>glassfish-maven-repository</id>
            <name>Glassfish repository</name>
            <url>http://maven.glassfish.org/content/groups/glassfish-group/</url>
            <snapshots>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
    <build>
        <sourceDirectory>src/java</sourceDirectory>
        <testSourceDirectory>test/java</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>2.1</version>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <useReleaseProfile>false</useReleaseProfile>
                    <arguments>${release.arguments}</arguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <!--forkMode>always</forkMode-->
                    <argLine>-enableassertions</argLine>
                    <systemProperties>
                        <property>
                            <name>java.util.logging.config.file</name>
                            <value>logging.properties</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <threshold>${findbugs.threshold}</threshold>
                    <excludeFilterFile>${findbugs.exclude}</excludeFilterFile>
                    <findbugsXmlOutput>true</findbugsXmlOutput>
                    <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
             <plugins>
                 <plugin>
                     <groupId>org.apache.felix</groupId>
                     <artifactId>maven-bundle-plugin</artifactId>
                     <version>2.0.0</version>
                     <configuration>
                         <!-- By default, we don't export anything.
                         -->
                         <Export-Package />
                         <instructions>
                             <!-- Read all the configuration from osgi.bundle file, if it exists.
                                  See Felix-699 to find out why we use ${basedir}.
                             -->
                             <_include>-${basedir}/osgi.bundle</_include>
                         </instructions>
                     </configuration>
                 </plugin>
                <plugin>
                    <groupId>org.glassfish.hk2</groupId>
                    <artifactId>osgiversion-maven-plugin</artifactId>
                    <version>${project.version}</version>
                    <executions>
                        <execution>
                            <id>compute-osgi-version</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>compute-osgi-version</goal>
                            </goals>
                            <configuration>
                                <dropVersionComponent>qualifier</dropVersionComponent>
                                <versionPropertyName>project.osgi.version</versionPropertyName>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
             </plugins>
        </pluginManagement>
    </build>
    <modules>
    	<module>class-model</module>
        <module>auto-depends</module>
        <module>apt</module>
        <module>core</module>
        <module>config</module>
        <module>config-generator</module>
        <module>external</module>
        <!--module>toy-http-server</module-->
        <module>hk2-maven</module>
        <module>hk2-maven-plugin</module>
        <module>osgi-adapter</module>
        <module>dependency-verifier</module>
        <module>dependency-visualizer</module>
        <module>osgiversion-maven-plugin</module>
        <module>consolidatedbundle-maven-plugin</module>
        <module>hk2-api</module>
  </modules>

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

    <profiles>
        <profile>
            <!-- this profile is used during the development -->
            <id>debug</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>auto-depends-tests</module>
                <module>apt-test</module>
                <module>test-harness</module>
                <module>hk2</module>
                <module>config-types</module>
                <module>hk2-jsr330</module>
            </modules>
        </profile>
        <profile>
            <!-- this profile is used when maven release plugin runs. see the mojo configuration above -->
            <id>release-modules</id>
            <modules>
                <module>hk2</module>
                <module>config-types</module>
                <module>hk2-jsr330</module>
            </modules>
        </profile>
        <profile>
            <!-- this profile is used for development testing -->
            <id>devtests</id>
            <modules>
                <module>devtests</module>
            </modules>
        </profile>
        <profile>
            <!--
                The hk2 module depends on hk2-maven-plugin as an extension,
                so it causes a chicken and egg problem during a release;
                Maven tries to resolve all extensions early on, but it fails
                because the hk2-maven-plugin is not built yet.

                So the work around is a release in two-phase. First we
                do "mvn release:prepare", which fails due to the problem described above.
                At this point the workspace is left with POM that has non-SNAPSHOT version.
                So now we run "mvn -P release-phase1" and build the whole thing
                except the hk2 module. This puts maven-hk2-jar in local repo,
                so the retry of "mvn release:prepare" now works.
            -->
            <id>release-phase1</id>
        </profile>
    </profiles>

    <properties>
        <java.net.username>${user.name}</java.net.username>
        <asm.version>3.3</asm.version>
        <findbugs.exclude />
        <findbugs.threshold>High</findbugs.threshold>
    </properties>

  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.2</version>
        <reportSets>
          <reportSet>
            <reports>
              <!--
                 Maven release process fails with NPE when a dependency report generation
                 tries to obtain a POM for the system-scope Artifact.
		 See MPIR-37 for the bug report. Kohsuke to file a bug report on this
		 with a proposed patch.
              -->
              <!--report>dependencies</report-->
              <report>project-team</report>
              <report>mailing-list</report>
              <report>cim</report>
              <report>issue-tracking</report>
              <report>license</report>
              <report>scm</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.7</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.2</version>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <threshold>${findbugs.threshold}</threshold>
                    <excludeFilterFile>${findbugs.exclude}</excludeFilterFile>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

</project>
