<!--
  ~ Copyright 2010 - org.tinyjee.maven
  ~
  ~    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>

	<packaging>maven-plugin</packaging>

	<groupId>org.tinyjee.dim</groupId>
	<artifactId>doxia-include-macro</artifactId>
	<version>1.1</version>

	<name>Doxia :: Include Macro</name>
	<url>http://doxia-include.sf.net/</url>
	<description>
		This project extends Maven Doxia with a macro offering an advanced way of including content into generated sites &amp; documents.
	</description>

	<properties>
		<application.name>${project.name}</application.name>
		<application.id>doxia-include</application.id>

		<java.code.version>1.5</java.code.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<sonar.language>java</sonar.language>
		<sonar.java.source>${java.code.version}</sonar.java.source>
		<sonar.java.target>${java.code.version}</sonar.java.target>
		<sonar.host.url>https://www.tinyjee.org/sonar/</sonar.host.url>

		<!-- Exclude deprecated classes from Sonar analysis -->
		<sonar.exclusions>**/utils/InterfaceScanner.java, **/utils/PropertiesLoader.java</sonar.exclusions>
	</properties>

	<profiles>
		<profile>
			<id>build-local</id>
			<activation>
				<property>
					<name>!BUILD_NUMBER</name>
				</property>
			</activation>
			<properties>
				<!-- Defaults for a non Hudson build (use "env.HOSTNAME" when local build is on *nix systems) -->
				<!-- Note: These values can be overridden at the commandline using "-DBUILD_NUMBER=1000" -->
				<BUILD_NUMBER>local</BUILD_NUMBER>
				<BUILD_ID>${user.name} (${env.COMPUTERNAME})</BUILD_ID>
			</properties>
		</profile>

		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.4</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>deploy-with-hudson</id>
			<activation>
				<property>
					<name>!performRelease</name>
				</property>
			</activation>

			<distributionManagement>
				<site>
					<id>${application.id}.shell.sourceforge.net</id>
					<name>${application.id}.shell.sourceforge.net</name>
					<url>sftp://web.sourceforge.net/home/groups/d/do/${application.id}/htdocs</url>
				</site>

				<repository>
					<id>maven.tinyjee.org</id>
					<url>sftp://maven.tinyjee.org/var/www/maven.tinyjee.org</url>
				</repository>

				<snapshotRepository>
					<id>maven.tinyjee.org</id>
					<url>sftp://maven.tinyjee.org/var/www/maven.tinyjee.org</url>
					<uniqueVersion>false</uniqueVersion>
				</snapshotRepository>
			</distributionManagement>

			<repositories>
				<repository>
					<id>maven.tinyjee.org</id>
					<url>http://maven.tinyjee.org</url>
				</repository>
			</repositories>

			<!-- Define self reference to allow the usage of the macro in the site building phase -->
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-site-plugin</artifactId>
						<version>3.0</version>
						<dependencies>
							<!-- Setting up the scripting environment -->
							<dependency>
								<groupId>org.codehaus.groovy</groupId>
								<artifactId>groovy</artifactId>
								<version>1.8.6</version>
							</dependency>

							<dependency>
								<groupId>org.jruby</groupId>
								<artifactId>jruby</artifactId>
								<version>1.6.6</version>
							</dependency>

							<dependency>
								<groupId>org.python</groupId>
								<artifactId>jython-standalone</artifactId>
								<version>2.5.2</version>
							</dependency>
							<!-- - - - - - - - - - - - - - - - - - - -->

							<dependency>
								<groupId>org.tinyjee.dim</groupId>
								<artifactId>doxia-include-macro</artifactId>
								<version>${project.version}</version>
							</dependency>
						</dependencies>
						<configuration>

						</configuration>
					</plugin>
				</plugins>
			</build>
			<reporting>
				<plugins>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.8</version>
						<configuration>
							<source>${java.code.version}</source>
							<stylesheetfile>${project.basedir}/assets/apidocs/docs.css</stylesheetfile>
							<javadocDirectory>${project.basedir}/assets/apidocs</javadocDirectory>
							<docfilessubdirs>true</docfilessubdirs>
							<bottom><![CDATA[
<script type='text/javascript' src='{@docRoot}/doc-files/prettify.js'></script>
<script type="text/javascript">
	var currentOnLoadFunction = window.onload;
	window.onload = function() {
	    try {
			if (currentOnLoadFunction) currentOnLoadFunction();
		} finally {
			var tags = document.getElementsByTagName('CODE');
			for (var i = 0, len = tags.length; i < len; i++) tags[i].className += ' prettyprint'; if (prettyPrint) prettyPrint();
		}
	}
</script> 		            ]]></bottom>
							<quiet>true</quiet>
							<show>protected</show>
							<detectLinks>true</detectLinks>
							<links>
								<link>http://qdox.codehaus.org/javadoc/</link>
								<link>http://jackson.codehaus.org/1.9.0/javadoc/</link>
							</links>
						</configuration>
					</plugin>

					<plugin>
						<artifactId>maven-jxr-plugin</artifactId>
						<version>2.3</version>
					</plugin>

					<plugin>
						<artifactId>maven-project-info-reports-plugin</artifactId>
						<version>2.4</version>
					</plugin>
				</plugins>
			</reporting>
		</profile>
	</profiles>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<issueManagement>
		<system>SourceForge BugTracker</system>
		<url>https://sourceforge.net/p/${application.id}/tickets/</url>
	</issueManagement>

	<ciManagement>
		<system>hudson</system>
		<url>http://www.tinyjee.org/hudson/view/All/job/Doxia%20-%20Include%20Macro%20(Dev)/</url>
	</ciManagement>

	<scm>
		<connection>scm:hg:http://hg.code.sf.net/p/doxia-include/code</connection>
		<developerConnection>scm:hg:ssh://hg.code.sf.net/p/doxia-include/code</developerConnection>
		<url>http://sourceforge.net/p/doxia-include/code/</url>
	</scm>

	<developers>
		<developer>
			<id>jkellerer</id>
			<name>Juergen Kellerer</name>
			<timezone>+1</timezone>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
	</developers>

	<dependencies>
		<dependency>
			<groupId>org.mozilla</groupId>
			<artifactId>rhino</artifactId>
			<version>1.7R3</version>
		</dependency>

		<dependency>
			<groupId>com.thoughtworks.qdox</groupId>
			<artifactId>qdox</artifactId>
			<version>1.12</version>
		</dependency>

		<dependency>
			<groupId>net.sourceforge.jchardet</groupId>
			<artifactId>jchardet</artifactId>
			<version>1.0</version>
		</dependency>

		<dependency>
			<groupId>org.codehaus.jackson</groupId>
			<artifactId>jackson-core-asl</artifactId>
			<version>1.9.0</version>
		</dependency>

		<dependency>
			<groupId>org.apache.xmlgraphics</groupId>
			<artifactId>batik-transcoder</artifactId>
			<version>1.7</version>
			<exclusions>
				<exclusion>
					<groupId>xalan</groupId>
					<artifactId>xalan</artifactId>
				</exclusion>
				<exclusion>
					<groupId>xml-apis</groupId>
					<artifactId>xml-apis</artifactId>
				</exclusion>
				<exclusion>
					<groupId>xml-apis</groupId>
					<artifactId>xml-apis-ext</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.apache.xmlgraphics</groupId>
			<artifactId>batik-script</artifactId>
			<version>1.7</version>
			<exclusions>
				<exclusion>
					<groupId>xalan</groupId>
					<artifactId>xalan</artifactId>
				</exclusion>
				<exclusion>
					<groupId>xml-apis</groupId>
					<artifactId>xml-apis</artifactId>
				</exclusion>
				<exclusion>
					<groupId>xml-apis</groupId>
					<artifactId>xml-apis-ext</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.xmlgraphics</groupId>
					<artifactId>batik-js</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>2.1</version>
		</dependency>

		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
			<version>2.1.13</version>
		</dependency>

		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-xjc</artifactId>
			<version>2.1.13</version>
		</dependency>

		<dependency>
			<groupId>javax.xml.ws</groupId>
			<artifactId>jaxws-api</artifactId>
			<version>2.1</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.sun.phobos</groupId>
			<artifactId>jsr223-api</artifactId>
			<version>1.0</version>
			<scope>provided</scope>
		</dependency>


		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-core</artifactId>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.maven.doxia</groupId>
			<artifactId>doxia-core</artifactId>
			<version>1.1.2</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.maven.doxia</groupId>
			<artifactId>doxia-sink-api</artifactId>
			<version>1.1.2</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.maven.doxia</groupId>
			<artifactId>doxia-module-apt</artifactId>
			<version>1.1.2</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.maven.doxia</groupId>
			<artifactId>doxia-module-fml</artifactId>
			<version>1.1.2</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.maven.doxia</groupId>
			<artifactId>doxia-module-xdoc</artifactId>
			<version>1.1.2</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.maven.doxia</groupId>
			<artifactId>doxia-site-renderer</artifactId>
			<version>1.1.2</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.velocity</groupId>
			<artifactId>velocity</artifactId>
			<version>1.5</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.velocity</groupId>
			<artifactId>velocity-tools</artifactId>
			<version>2.0</version>
		</dependency>

		<dependency>
			<groupId>org.codehaus.plexus</groupId>
			<artifactId>plexus-utils</artifactId>
			<version>1.5.1</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.9</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>1.8.5</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.8</version>
					<configuration>
						<stylesheetfile>${project.basedir}/assets/apidocs/docs.css</stylesheetfile>
						<javadocDirectory>${project.basedir}/assets/apidocs</javadocDirectory>
						<docfilessubdirs>true</docfilessubdirs>
						<quiet>true</quiet>
						<show>protected</show>
						<detectLinks>true</detectLinks>
						<links>
							<link>http://qdox.codehaus.org/javadoc/</link>
							<link>http://jackson.codehaus.org/1.9.0/javadoc/</link>
						</links>
					</configuration>
				</plugin>

				<!-- Add build number to JARs -->
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.3</version>
					<configuration>
						<archive>
							<manifestEntries>
								<Specification-Title>${project.groupId}:${project.artifactId}</Specification-Title>
								<Specification-Version>${project.version}</Specification-Version>
								<Implementation-Version>build-${BUILD_NUMBER} ${BUILD_ID}</Implementation-Version>
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<!-- Configure the compiler -->
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>${java.code.version}</source>
					<target>${java.code.version}</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-maven-plugin</artifactId>
				<version>1.3.8</version>
				<executions>
					<execution>
						<goals>
							<goal>descriptor</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Configure the creation of source and javadoc packages -->
			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.1.2</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<configuration>
					<attach>true</attach>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>

		<extensions>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-ssh</artifactId>
				<version>2.0</version>
			</extension>
		</extensions>
	</build>
</project>
