<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>
	<groupId>org.cdisource</groupId>
	<artifactId>cdisource-parent</artifactId>
	<packaging>pom</packaging>
	<version>0.9</version>

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>3</version>
	</parent>

	<name>CDI Advocate Parent</name>

	<!-- Full metadata -->
	<url>TODO put address to website here</url>

	<description>
      The parent POM for Weld, specifying the build parameters
   </description>

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

	<developers>
		<developer>
			<name>Rob Williams</name>
		</developer>
		<developer>
			<name>Andy Gibson</name>
		</developer>
		<developer>
			<name>Rick Hightower</name>
		</developer>
	</developers>

	<organization>
		<name>CDI Advocate</name>
		<url>TODO Put URL here</url>
	</organization>

	<properties>
		<!-- Force encoding to UTF-8 (bug on OS X) -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
	</properties>

	<prerequisites>
		<maven>3.0</maven>
	</prerequisites>


	<dependencies>
		<dependency>
				<groupId>javax.enterprise</groupId>
				<artifactId>cdi-api</artifactId>
				<version>1.0-SP1</version>
				<scope>provided</scope>
				<type>jar</type>
		</dependency>
	</dependencies>

	<!-- Configure the build -->
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<inherited>true</inherited>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>buildnumber-maven-plugin</artifactId>
			</plugin>
		</plugins>
		<defaultGoal>package</defaultGoal>

		<!-- Configure all plugins, including versions to use in the build -->
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>1.3</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>			
					<configuration>
						<arguments>-Drelease </arguments>
						<autoVersionSubmodules>true</autoVersionSubmodules>
						<mavenExecutorId>forked-path</mavenExecutorId>
						<gpg.useagent>true</gpg.useagent>
					</configuration>
					<version>2.0-beta-9</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-report-plugin</artifactId>
					<version>2.6</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.6</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>2.4.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.5</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>2.2-beta-5</version>
					<executions>
						<execution>
							<id>distribution</id>
							<phase>package</phase>
							<goals>
								<goal>single</goal>
							</goals>
							<configuration>
								<descriptors>
									<descriptor>src/main/assembly/assembly.xml</descriptor>
								</descriptors>
								<finalName>${project.build.finalName}-${project.version}</finalName>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.3.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>2.0.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.1.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.4.3</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>2.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.7</version>
					<configuration>
						<keywords>true</keywords>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>exec-maven-plugin</artifactId>
					<version>1.1.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>1.0-beta-1</version>
					<executions>
						<execution>
							<id>enforce</id>
							<goals>
								<goal>enforce</goal>
							</goals>
							<configuration>
								<rules>
									<requireMavenVersion>
										<version>[${minimum.maven.version},)</version>
									</requireMavenVersion>
									<requirePluginVersions>
										<unCheckedPlugins>
											<unCheckedPlugin>org.apache.maven.plugins:maven-eclipse-plugin</unCheckedPlugin>
											<unCheckedPlugin>org.codehaus.mojo:versions-maven-plugin</unCheckedPlugin>
										</unCheckedPlugins>
									</requirePluginVersions>
								</rules>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>2.3.1</version>
					<configuration>
						<source>1.6</source>
						<target>1.6</target>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.3.1</version>
					<configuration>
						<archive>
							<manifestEntries>
								<Implementation-URL>${project.url}</Implementation-URL>
								<Implementation-Title>${project.name}</Implementation-Title>
								<Implementation-Version>${maven.build.timestamp}</Implementation-Version>
								<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
								<Specification-Title>${project.name}</Specification-Title>
								<Specification-Version>${parsedVersion.osgiVersion}</Specification-Version>
								<Specification-Vendor>${project.organization.name}</Specification-Vendor>
							</manifestEntries>
							<manifestSections>
								<manifestSection>
									<name>Build-Information</name>
									<manifestEntries>
										<Maven-Version>${maven.version}</Maven-Version>
										<Java-Version>${java.version}</Java-Version>
										<Java-Vendor>${java.vendor}</Java-Vendor>
										<Os-Name>${os.name}</Os-Name>
										<Os-Arch>${os.arch}</Os-Arch>
										<Os-Version>${os.version}</Os-Version>
										<SCM>r${buildNumber}</SCM>
										<Build-Time>${maven.build.timestamp}</Build-Time>
									</manifestEntries>
								</manifestSection>
							</manifestSections>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>1.5</version>
					<executions>
						<execution>
							<phase>validate</phase>
							<goals>
								<goal>maven-version</goal>
								<goal>parse-version</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-eclipse-plugin</artifactId>
					<configuration>
						<classpathContainers>
							<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
						</classpathContainers>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>buildnumber-maven-plugin</artifactId>
					<version>1.0-beta-4</version>
					<executions>
						<execution>
							<id>set-build-properties</id>
							<goals>
								<goal>create</goal>
							</goals>
							<!-- Disabled, as this plugin doesn't work for git -->
							<phase>none</phase>
							<configuration>
								<getRevisionOnlyOnce>true</getRevisionOnlyOnce>
								<revisionOnScmFailure>unavailable</revisionOnScmFailure>
								<timestampFormat>{0, date, long} {0, time, long}</timestampFormat>
							</configuration>
						</execution>
					</executions>
					<inherited>true</inherited>
				</plugin>
				<plugin>
					<groupId>org.twdata.maven</groupId>
					<artifactId>maven-cli-plugin</artifactId>
					<version>1.0.3</version>
				</plugin>
				<plugin>
					<groupId>org.glassfish</groupId>
					<artifactId>maven-embedded-glassfish-plugin</artifactId>
					<version>3.0</version>
					<configuration>
						<goalPrefix>glassfish</goalPrefix>
						<app>${project.build.directory}/${project.build.finalName}.war</app>
						<port>7070</port>
						<contextRoot>${project.build.finalName}</contextRoot>
					</configuration>
					<executions>
						<execution>
							<phase>install</phase>
							<goals>
								<goal>run</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.mortbay.jetty</groupId>
					<artifactId>maven-jetty-plugin</artifactId>
					<version>6.1.21</version>
					<configuration>
						<!-- Delete this block to have Jetty run default port (8080) -->
						<connectors>
							<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
								<port>9090</port>
							</connector>
						</connectors>
						<!-- force friendly name instead of artifact name + version -->
						<contextPath>${project.build.finalName}</contextPath>
						<!-- Where the BeanManager is constructed. This is where you'll declare 
							datasources. -->
						<jettyEnvXml>${basedir}/src/main/resources/jetty-env.xml</jettyEnvXml>
						<!-- This parameter will auto-deploy modified classes. -->
						<!-- You can save changes in a file or class and refresh your browser 
							to view the changes. -->
						<scanIntervalSeconds>3</scanIntervalSeconds>
					</configuration>
				</plugin>

				<!-- Embedded Tomcat (package tomcat:run) -->
				<!-- Standalone Tomcat (package tomcat:deploy) -->
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>tomcat-maven-plugin</artifactId>
					<version>1.0-beta-1</version>
					<inherited>true</inherited>
					<configuration>
						<path>/${project.build.finalName}</path>
						<!-- Embedded port -->
						<port>6060</port>
						<!-- The default authentication credentials for remote deployment are 
							username "admin" with no password To override credentials, define a server 
							in settings.xml and activate it using the <server> element -->
						<url>http://localhost:8080/manager</url>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-war-plugin</artifactId>
					<version>2.1-beta-1</version>
					<inherited>true</inherited>
					<configuration>
						<failOnMissingWebXml>false</failOnMissingWebXml>
						<warName>${project.build.finalName}</warName>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-archetype-plugin</artifactId>
					<version>2.0-alpha-5</version>
					<extensions>true</extensions>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>jboss-maven-plugin</artifactId>
					<version>1.4</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>emma-maven-plugin</artifactId>
					<version>1.0-alpha-2</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.maven.plugin</groupId>
					<artifactId>emma4it-maven-plugin</artifactId>
					<version>1.3</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.cargo</groupId>
					<artifactId>cargo-maven2-plugin</artifactId>
					<version>1.0.1</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>selenium-maven-plugin</artifactId>
					<version>1.0.1</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>failsafe-maven-plugin</artifactId>
					<version>2.4.3-alpha-1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-scm-plugin</artifactId>
					<version>1.4</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>release</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<configuration>
							<passphrase>${gpg.passphrase}</passphrase>
							<useAgent>${gpg.useAgent}</useAgent>
						</configuration>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-maven-plugin</artifactId>
						<configuration>
							<auto>true</auto>
							<description>[nexus-maven-plugin] closing
								repository after
								release:perform</description>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>buildnumber-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>validate-scm</id>
								<goals>
									<goal>create</goal>
								</goals>
								<!-- Disabled, doesn't support git -->
								<phase>none</phase>
								<configuration>
									<doUpdate>true</doUpdate>
									<doCheck>true</doCheck>
								</configuration>
							</execution>
						</executions>
						<inherited>true</inherited>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>distribution</id>
			<activation>
				<property>
					<name>dist</name>
				</property>
			</activation>
			<properties>
				<!-- Skip failing tests when building dist -->
				<maven.test.failure.ignore>true</maven.test.failure.ignore>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>javadoc</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-deploy-plugin</artifactId>
						<configuration>
							<skip>${maven.deploy.skip}</skip>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>code-coverage</id>
			<activation>
				<property>
					<name>code-coverage</name>
				</property>
			</activation>
			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>org.codehaus.mojo</groupId>
							<artifactId>emma-maven-plugin</artifactId>
							<executions>
								<execution>
									<id>instrumentation</id>
									<phase>process-classes</phase>
									<goals>
										<goal>instrument</goal>
									</goals>
									<configuration>
										<verbose>true</verbose>
									</configuration>
								</execution>
								<execution>
									<id>instrumentation-clean</id>
									<phase>clean</phase>
									<goals>
										<goal>clean</goal>
									</goals>
								</execution>
							</executions>
						</plugin>

						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-surefire-plugin</artifactId>
							<inherited>true</inherited>
							<configuration>
								<forkMode>once</forkMode>
								<classesDirectory>${project.build.directory}/generated-classes/emma/classes</classesDirectory>
							</configuration>
						</plugin>

						<plugin>
							<groupId>org.sonatype.maven.plugin</groupId>
							<artifactId>emma4it-maven-plugin</artifactId>
							<executions>
								<execution>
									<id>report</id>
									<phase>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 and Distribution Management -->

<!--	<distributionManagement>
		<repository>
			<id>cdi.advocate</id>
			<name>CDI Advocacy</name>
			<url>http://jee6-cdi.googlecode.com/svn/m2/repository/</url>
		</repository>
		<snapshotRepository>
			<id>TBD</id>
			<name>TBD</name>
			<url>TBD</url>
		</snapshotRepository>
	</distributionManagement> -->


	<repositories>
		<repository>
			<id>cdi.advocate</id>
			<name>CDI Advocacy</name>
			<url>http://jee6-cdi.googlecode.com/svn/m2/repository/</url>
		</repository>
		<repository>
			<id>java.net</id>
			<name>Java.net repository for common APIs</name>
			<url>http://download.java.net/maven/2/</url>
		</repository>
	</repositories>
</project>
