<!--
Copyright (c) 2018-2019 Mozilla Foundation

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-->
<project name="html5-cssvalidator" basedir="."
  xmlns:artifact="antlib:org.apache.maven.artifact.ant">
  <property name="cssvalidator-base" location="${dist}/cssvalidator-${version}" />
  <property name="cssvalidator-src" location="../css-validator/org" />
  <property name="cssvalidator-javadoc-jar" value="${cssvalidator-base}-javadoc.jar" />
  <property name="cssvalidator-sources-jar" value="${cssvalidator-base}-sources.jar" />
  <property name="cssvalidator-bundle-jar" value="${cssvalidator-base}-bundle.jar" />
  <target name="cssvalidator-javadoc-jar">
    <javadoc destdir="${javadoc-dir}" additionalparam="-html5 -Xdoclint:none">
      <fileset dir="${cssvalidator-src}"/>
    </javadoc>
    <jar destfile="${cssvalidator-javadoc-jar}">
      <fileset dir="${javadoc-dir}" />
    </jar>
    <delete dir="${javadoc-dir}"/>
  </target>
  <target name="cssvalidator-sources-jar">
    <jar destfile="${cssvalidator-sources-jar}">
      <fileset dir="${cssvalidator-src}"/>
    </jar>
  </target>
  <target name="cssvalidator-artifacts" depends="cssvalidator-javadoc-jar, cssvalidator-sources-jar">
    <delete file="${dist}/VERSION" />
    <artifact:pom
      id="cssvalidator-pom"
      groupId="nu.validator"
      artifactId="cssvalidator"
      version="${version}"
      name="cssvalidator"
      description="Backend for the W3C CSS Validation Service"
      url="https://jigsaw.w3.org/css-validator/about.html"
      packaging="jar">
      <license
        name="W3C Software and Document Notice and License"
        distribution="repo"
        url="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document"/>
      <scm
        connection="scm:git:git@github.com:w3c/css-validator.git"
        developerConnection="scm:git:git@github.com:w3c/css-validator.git"
        url="https://github.com/w3c/css-validator"/>
      <issueManagement
        system="GitHub Issues"
        url="https://github.com/w3c/css-validator/issues"/>
      <ciManagement
        system="Travis CI"
        url="https://travis-ci.org/w3c/css-validator"/>
      <developer
        name="Yves Lafon"
        id="ylafon"
        email="yves@w3.org"
        url="https://github.com/ylafon"/>
      <developer
        name="Michael[tm] Smith"
        id="sideshowbarker"
        email="mike@w3.org"
        url="https://people.w3.org/mike/"/>
    </artifact:pom>
    <artifact:writepom pomRefId="cssvalidator-pom" file="${cssvalidator-base}.pom"/>
    <copy file="../css-validator/css-validator.jar" tofile="${cssvalidator-base}.jar"/>
  </target>
  <target name="cssvalidator-bundle">
    <jar basedir="${dist}" destfile="${cssvalidator-bundle-jar}"/>
  </target>
</project>
