<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/xsd/maven-4.0.0.xsd">
<!--
 * Copyright 2001-2009 The Apache Software Foundation.
 *
 * 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.
 *
 */ -->

  <modelVersion>4.0.0</modelVersion>
  <parent>
	<groupId>org.apache.juddi</groupId>
	<artifactId>juddi-parent</artifactId>
	<version>3.2.0-SNAPSHOT</version>
	<relativePath>../../pom.xml</relativePath>
  </parent>
  <groupId>org.apache.juddi</groupId>
  <artifactId>userguide</artifactId>
  <packaging>jdocbook</packaging>
  <name>jUDDI User Guide -(en-US)</name>

  <properties>
    <translation>en-US</translation>
    <docname>userguide</docname>
    <bookname>jUDDI User Guide</bookname>
  </properties> 
    <repositories>
        <repository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Repository Group</name>
            <url>http://repository.jboss.org/nexus/content/groups/public/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

  <pluginRepositories>
        <pluginRepository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Repository Group</name>
            <url>http://repository.jboss.org/nexus/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>

    <pluginRepository>
		<id>snapshots</id>
		<name>Apache SnapShot Repository</name>
		<layout>default</layout>
		<url>http://people.apache.org/repo/m2-snapshot-repository</url>
		<snapshots>
			<enabled>true</enabled>
		</snapshots>
	</pluginRepository>
  </pluginRepositories>
  
  <profiles>

    <!-- mvn compile -->
    <profile>
      <id>all</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
    		<plugins>
    			<plugin>
    				<groupId>org.jboss.maven.plugins</groupId>
    				<artifactId>maven-jdocbook-plugin</artifactId>
    				<version>2.2.0</version>
    				<extensions>true</extensions>
                                <dependencies>
                                <!-- Overwrite jboss-highlight -->
                                <dependency>
                                    <groupId>org.richfaces.docs</groupId>
                                    <artifactId>highlight</artifactId>
                                    <version>3.3.3.Final</version>
                                </dependency>
			        </dependencies>
    				<configuration>
    				  <formats>
        				<format>
        				  <formatName>pdf</formatName>
        					<stylesheetResource>classpath:/xslt/org/apache/juddi/pdf.xsl</stylesheetResource>
        					<finalName>${docname}.pdf</finalName>
        				</format>
    					<format>
    					  <formatName>html</formatName>
    					  <stylesheetResource>classpath:/xslt/org/apache/juddi/xhtml.xsl</stylesheetResource>
    					  <finalName>index.html</finalName>
    					  </format>
        				<format>
        				  <formatName>html_single</formatName>
        				  <stylesheetResource>classpath:/xslt/org/apache/juddi/xhtml-single.xsl</stylesheetResource>
        				  <finalName>index.html</finalName>
        				</format>
    					</formats>
                                        <options>
                                           <xincludeSupported>true</xincludeSupported>
                                           <xmlTransformerType>saxon</xmlTransformerType>
                                           <docbookVersion>1.72.0</docbookVersion>
                                        </options>
  					</configuration>
  				</plugin>
				</plugins>
			</build>
		</profile>

    <!-- mvn compile -Phtml -->
    <profile>
      <id>html</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
    		<plugins>
    			<plugin>
    				<groupId>org.jboss.maven.plugins</groupId>
    				<artifactId>maven-jdocbook-plugin</artifactId>
    				<version>2.2.0</version>
    				<extensions>true</extensions>
    				<configuration>
    				  <formats>
    					  <format>
    					    <formatName>html</formatName>
    						  <stylesheetResource>classpath:/xslt/org/apache/juddi/xhtml.xsl</stylesheetResource>
    						  <finalName>index.html</finalName>
    					  </format>
    					</formats>
  					</configuration>
  				</plugin>
				</plugins>
			</build>
		</profile>

    <!-- mvn compile -Phtml-single -->
    <profile>
      <id>html-single</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
    		<plugins>
    			<plugin>
    				<groupId>org.jboss.maven.plugins</groupId>
    				<artifactId>maven-jdocbook-plugin</artifactId>
    				<version>2.2.0</version>
    				<extensions>true</extensions>
    				<configuration>
    				  <formats>
        				<format>
        				  <formatName>html_single</formatName>
        					<stylesheetResource>classpath:/xslt/org/apache/juddi/xhtml-single.xsl</stylesheetResource>
        					<finalName>index.html</finalName>
        				</format>
    					</formats>
  					</configuration>
  				</plugin>
				</plugins>
			</build>
		</profile>

    <!-- mvn compile -Ppdf -->
    <profile>
      <id>pdf</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
    		<plugins>
    			<plugin>
    				<groupId>org.jboss.maven.plugins</groupId>
    				<artifactId>maven-jdocbook-plugin</artifactId>
    				<version>2.2.0</version>
    				<extensions>true</extensions>
    				<configuration>
    				  <formats>
        				<format>
        				  <formatName>pdf</formatName>
        					<stylesheetResource>classpath:/xslt/org/apache/juddi/pdf.xsl</stylesheetResource>
        					<finalName>${docname}.pdf</finalName>
        				</format>
    					</formats>
  					</configuration>
  				</plugin>
				</plugins>
			</build>
		</profile>

  </profiles>

	<build>
		<plugins>
			<plugin>
				<groupId>org.jboss.maven.plugins</groupId>
				<artifactId>maven-jdocbook-plugin</artifactId>
				<version>2.2.0</version>
				<extensions>true</extensions>
				  
				<dependencies>	
					<dependency>
						<groupId>org.apache.juddi</groupId>
						<artifactId>juddi-docbook-xslt</artifactId>
						<version>1.0.1-SNAPSHOT</version>
					</dependency>
					<dependency>
						<groupId>org.apache.juddi</groupId>
						<artifactId>juddi-docbook-style</artifactId>
						<version>1.0.1-SNAPSHOT</version>
						<type>jdocbook-style</type>
					</dependency>
				</dependencies>
				
				<configuration>
		      		<sourceDocumentName>jUDDI_User_Guide.xml</sourceDocumentName>
			  	<sourceDirectory>.</sourceDirectory>
				<imageResource>
					  <directory>${basedir}/${translation}</directory>
					  <includes>
						  <include>images/*</include>
					  </includes>
				  </imageResource>
				  <options>
					  <xincludeSupported>true</xincludeSupported>
					  <xmlTransformerType>saxon</xmlTransformerType>
					  <!-- needed for uri-resolvers; can be ommitted if using 'current' uri scheme -->
					  <!--     could also locate the docbook dependency and inspect its version... -->
					  <docbookVersion>1.72.0</docbookVersion>
    				<transformerParameters>
    				  <property>
    					  <name>javax.xml.parsers.DocumentBuilderFactory</name>
    						<value>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl</value>
    					</property>
    					<property>
    						<name>javax.xml.parsers.SAXParserFactory</name>
    						<value>org.apache.xerces.jaxp.SAXParserFactoryImpl</value>
    					</property>
    				</transformerParameters>
    			</options>
			  </configuration>
		  </plugin>
		  
	  </plugins>
  </build>

</project>
