<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements. See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership. The ASF licenses this file
  to you 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>
  <groupId>org.apache.ws.commons.schema</groupId>
  <artifactId>XmlSchema</artifactId>
  <packaging>bundle</packaging>
  <name>XmlSchema</name>
  <version>2.0-SNAPSHOT</version>
  <description>Commons XMLSchema is a light weight schema object model that can be used to manipulate or
        generate XML schema.</description>
  <url>http://ws.apache.org/commons/XmlSchema</url>
  <issueManagement>
    <system>JIRA</system>
    <url>http://issues.apache.org/jira/browse/WSCOMMONS</url>
  </issueManagement>
  <mailingLists>
    <mailingList>
      <name>WS Commons Developers</name>
      <subscribe>commons-dev-subscribe@ws.apache.org</subscribe>
      <unsubscribe>commons-dev-unsubscribe@ws.apache.org</unsubscribe>
      <post>commons-dev@ws.apache.org</post>
      <archive>http://mail-archives.apache.org/mod_mbox/ws-commons-dev/</archive>
    </mailingList>
  </mailingLists>
  <inceptionYear>2004</inceptionYear>
  <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>
  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/XmlSchema</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/XmlSchema</developerConnection>
    <url>http://svn.apache.org/viewvc/webservices/commons/branches/trunk/XmlSchema</url>
  </scm>
  <organization>
    <name>The Apache Software Foundation</name>
    <url>http://www.apache.org/</url>
  </organization>
  <build>
<!-- adding relevant resources to the jar files -->
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>src/test/test-resources</directory>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
          <outputDirectory>${eclipse.outputDirectory}</outputDirectory>
          <buildcommands>
            <java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
            <java.lang.String>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</java.lang.String>
            <java.lang.String>net.sourceforge.pmd.eclipse.plugin.pmdBuilder</java.lang.String>
          </buildcommands>
          <projectnatures>
            <nature>org.eclipse.jdt.core.javanature</nature>
            <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
            <nature>net.sourceforge.pmd.eclipse.plugin.pmdNature</nature>
          </projectnatures>
          <additionalConfig>
            <file>
              <name>.checkstyle</name>
              <location>etc/xmlschema-eclipse-checkstyle</location>
            </file>
            <file>
              <name>.pmd</name>
              <location>etc/xmlschema-eclipse-pmd</location>
            </file>
            <file>
              <name>.ruleset</name>
              <location>etc/xmlschema-pmd-ruleset.xml</location>
            </file>
          </additionalConfig>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <version>1.0</version>
        <executions>
          <execution>
            <goals>
              <goal>process</goal>
            </goals>
            <configuration>
              <resourceBundles>
                <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
              </resourceBundles>
              <properties>
                <projectName>Apache WebServices - XmlSchema</projectName>
              </properties>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>2.0.0</version>
          <extensions>true</extensions>
          <configuration>
              <instructions>
                  <Import-Package>org.apache.ws.commons.schema*;version=${pom.version},*</Import-Package>
                  <Export-Package>org.apache.ws.commons.schema*;version="${pom.version}"</Export-Package>
              </instructions>
          </configuration>
      </plugin>
    </plugins>
    <defaultGoal>install</defaultGoal>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <configuration>
            <archive>
              <manifestFile>target/classes/META-INF/MANIFEST.MF</manifestFile>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.0-beta-8</version>
          <configuration>
            <tagBase>https://svn.apache.org/repos/asf/webservices/commons/tags/XmlSchema</tagBase>
            <useReleaseProfiles>false</useReleaseProfiles>
            <goals>deploy</goals>
            <arguments>-Prelease</arguments>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <source>1.5</source>
            <target>1.5</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>2.2</version>
          <dependencies>
            <dependency>
              <groupId>org.codehaus.plexus</groupId>
              <artifactId>plexus-velocity</artifactId>
              <version>1.1.3</version>
              <exclusions>
                <exclusion>
<!-- Use the version specified by checkstyle:checkstyle instead -->
                  <artifactId>commons-collections</artifactId>
                  <groupId>commons-collections</groupId>
                </exclusion>
                <exclusion>
                  <artifactId>plexus-utils</artifactId>
                  <groupId>plexus</groupId>
                </exclusion>
              </exclusions>
            </dependency>
          </dependencies>
          <configuration>
            <encoding>UTF-8</encoding>
          </configuration>
          <executions>
            <execution>
              <id>validate</id>
              <phase>validate</phase>
              <configuration>
                <configLocation>etc/xmlschema-checkstyle.xml</configLocation>
                <consoleOutput>true</consoleOutput>
                <failsOnError>true</failsOnError>
                <linkXRef>false</linkXRef>
                <suppressionsLocation>etc/xmlschema-checkstyle-suppressions.xml</suppressionsLocation>
                <sourceDirectory>${basedir}/src</sourceDirectory>
              </configuration>
              <goals>
                <goal>checkstyle</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
	    <forkMode>never</forkMode>
	    <additionalClasspathElements>
	      <additionalClasspathElement>w3c-testcases</additionalClasspathElement>
	    </additionalClasspathElements>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <configuration>
            <descriptors>
              <descriptor>src/main/assembly/bin.xml</descriptor>
              <descriptor>src/main/assembly/src.xml</descriptor>
              <descriptor>src/main/assembly/doc.xml</descriptor>
            </descriptors>
            <tarLongFileMode>gnu</tarLongFileMode>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <executions>
            <execution>
              <id>site</id>
              <phase>package</phase>
              <goals>
                <goal>site</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <executions>
            <execution>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <attach>true</attach>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <property>
          <name>release</name>
          <value/>
        </property>
      </activation>
      <build>
        <plugins>
<!--
    We want to sign the artifact, the POM, and all attached artifacts
-->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
<!--
    We want to deploy the artifact to a staging location for perusal
-->
          <plugin>
            <artifactId>maven-site-plugin</artifactId>
            <executions>
              <execution>
                <id>site</id>
                <phase>validate</phase>
                <goals>
                  <goal>site</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>single</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <inherited>true</inherited>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <configuration>
              <altDeploymentRepository>${deploy.altRepository}</altDeploymentRepository>
              <updateReleaseInfo>true</updateReleaseInfo>
            </configuration>
          </plugin>
          <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>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <encoding>${project.build.sourceEncoding}</encoding>
              <attach>true</attach>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>single</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>DefaultTest</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
    </profile>
    <profile>
      <id>IBMTest</id>
      <activation>
        <property>
          <name>java.vendor</name>
          <value>IBM Corporation</value>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.apache.bcel</groupId>
          <artifactId>bcel</artifactId>
          <version>5.2</version>
        </dependency>
        <dependency>
          <groupId>xalan</groupId>
          <artifactId>xalan</artifactId>
          <version>2.7.0</version>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <systemProperties>
<!--
									The default xalan TransformerFactory on the ibm jdk is
									org.apache.xalan.processor.TransformerFactoryImpl which has a
									known issue with implicit namespaces. Set this property to use
									the xsltc TransformerFactory (which the sun jdk seems to
									default to).
								-->
                <property>
                  <name>
										javax.xml.transform.TransformerFactory
        							</name>
                  <value>
										org.apache.xalan.xsltc.trax.TransformerFactoryImpl
        							</value>
                </property>
              </systemProperties>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>setup.eclipse</id>
      <properties>
        <eclipse.workspace.dir>${basedir}/../workspace</eclipse.workspace.dir>
      </properties>
      <build>
        <defaultGoal>process-test-sources</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-eclipse-plugin</artifactId>
            <inherited>false</inherited>
            <executions>
              <execution>
                <id>setup.eclipse.workspace</id>
                <phase>process-test-sources</phase>
                <goals>
                  <goal>configure-workspace</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <workspace>${eclipse.workspace.dir}</workspace>
              <workspaceCodeStylesURL>file:${basedir}/etc/eclipse/XmlSchemaCodeFormatter.xml</workspaceCodeStylesURL>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <inherited>false</inherited>
            <dependencies>
              <dependency>
                <groupId>ant</groupId>
                <artifactId>ant-nodeps</artifactId>
                <version>1.6.5</version>
              </dependency>
              <dependency>
                <groupId>ant</groupId>
                <artifactId>ant-trax</artifactId>
                <version>1.6.5</version>
              </dependency>
            </dependencies>
            <executions>
              <execution>
                <id>setup.workspace</id>
                <phase>validate</phase>
                <configuration>
                  <tasks>
                    <path id="ecp.ws.path" location="${eclipse.workspace.dir}"/>
                    <property name="full.eclipse.workspace" refid="ecp.ws.path"/>
                    <property name="checkstyle.url" location="etc/xmlschema-checkstyle.xml"/>
                    <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings"/>
                    <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle"/>
                    <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/net.sourceforge.pmd.eclipse"/>
                    <get src="file:${checkstyle.url}" dest="${full.eclipse.workspace}/xmlschema-checkstyle.xml"/>
<!-- Add checkstyle config -->
                    <copy file="${basedir}/etc/eclipse/template.checkstyle-config.xml" tofile="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml" overwrite="no">
                      <filterset>
                        <filter token="CHECKSTYLE_CONFIG_FILE" value="${full.eclipse.workspace}/xmlschema-checkstyle.xml"/>
                      </filterset>
                    </copy>
                    <xslt style="${basedir}/etc/eclipse/addcheckstyle.xsl" in="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml" out="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml.new">
                      <param name="checkstyleconfig" expression="${full.eclipse.workspace}/xmlschema-checkstyle.xml"/>
                    </xslt>
                    <copy file="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml.new" tofile="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml" overwrite="yes"/>
<!-- Add warning flags that we want -->
                    <propertyfile file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs">
                      <entry key="org.eclipse.jdt.core.compiler.problem.missingSerialVersion" value="ignore"/>
                      <entry key="org.eclipse.jdt.core.compiler.problem.unusedImport" value="ignore"/>
                      <entry key="org.eclipse.jdt.core.compiler.problem.annotationSuperInterface" value="ignore"/>
                      <entry key="org.eclipse.jdt.core.compiler.problem.rawTypeReference" value="ignore"/>
                    </propertyfile>
<!-- Add code format rules -->
                    <loadfile property="eclipse.code.cleanup" srcFile="${basedir}/etc/eclipse/XmlSchemaCleanUp.xml"/>
                    <loadfile property="eclipse.code.templates" srcFile="${basedir}/etc/eclipse/codetemplates.xml"/>
                    <loadfile property="eclipse.xml.templates" srcFile="${basedir}/etc/eclipse/xmltemplates.xml"/>
                    <propertyfile file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs">
                      <entry key="cleanup_profile" value="XmlSchema"/>
                      <entry key="org.eclipse.jdt.ui.cleanupprofiles" value="${eclipse.code.cleanup}"/>
                      <entry key="org.eclipse.jdt.ui.text.custom_code_templates" value="${eclipse.code.templates}"/>
<!-- Add import order -->
                      <entry key="org.eclipse.jdt.ui.importorder" value="java;javax;org.w3c;org.xml;org.junit;#org.junit"/>
<!-- Sort order -->
                      <entry key="org.eclipse.jdt.ui.visibility.order" value="B,R,D,V,"/>
                      <entry key="outlinesortoption" value="T,SF,F,SI,I,C,SM,M,"/>
                      <entry key="org.eclipse.jdt.ui.enable.visibility.order" value="true"/>
                    </propertyfile>
                    <propertyfile file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.xml.ui.prefs">
                      <entry key="eclipse.preferences.version" value="1"/>
                      <entry key="org.eclipse.wst.sse.ui.custom_templates" value="${eclipse.xml.templates}"/>
                    </propertyfile>
                  </tasks>
                </configuration>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>sourcecheck</id>
      <activation>
	<activeByDefault>true</activeByDefault> 
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <showDeprecation>true</showDeprecation>
              <showWarnings>true</showWarnings>
              <compilerArgument>${compile.flags}</compilerArgument>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <pluginRepositories>
    <pluginRepository>
      <id>snapshot</id>
      <name>Snapshot repository</name>
      <url>http://snapshots.maven.codehaus.org/maven2/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </pluginRepository>
    <pluginRepository>
      <id>snapshot-apache</id>
      <name>Apache Snapshot repository</name>
      <url>http://people.apache.org/repo/m2-snapshot-repository</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </pluginRepository>
  </pluginRepositories>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>xmlunit</groupId>
      <artifactId>xmlunit</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jdepend-maven-plugin</artifactId>
        <version>2.0-beta-2</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>

    <distributionManagement>
        <repository>
            <id>apache.releases.https</id>
            <name>Apache Release Distribution Repository</name>
            <url>https://repository.apache.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>apache.snapshots.https</id>
            <name>Apache Development Snapshot Repository</name>
            <url>https://repository.apache.org/content/repositories/snapshots</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
        <site>
            <id>apache.cxf.site</id>
            <url>scpexe://people.apache.org/www/ws.apache.org/commons/XmlSchema/mvn_site</url>
        </site>
    </distributionManagement>
</project>
