mirror of https://github.com/dspinellis/UMLGraph
parent
8c637cf8d8
commit
402d57a502
|
|
@ -6,3 +6,4 @@ UMLGraph-snapshot*
|
|||
UMLGraph-R*
|
||||
CHECKSUM.MD5
|
||||
_vimrc
|
||||
pom.xml
|
||||
|
|
|
|||
145
build.xml
145
build.xml
|
|
@ -1,4 +1,6 @@
|
|||
<project name="umlgraph" default="compile" basedir=".">
|
||||
<project name="umlgraph" default="compile" basedir="."
|
||||
xmlns:artifact="antlib:org.apache.maven.artifact.ant" >
|
||||
|
||||
<description>
|
||||
The specification for the Java-based umlgraph build processes.
|
||||
$Id$
|
||||
|
|
@ -12,6 +14,53 @@
|
|||
<property name="testsrc" location="test/src"/>
|
||||
<property name="testout" location="${basedir}/testdata/dot-out"/>
|
||||
<property name="testref" location="${basedir}/testdata/dot-ref"/>
|
||||
|
||||
<property name="dist" location="dist" />
|
||||
|
||||
<!-- obtain version from git; see http://techblog.41concepts.com/2009/05/08/generating-ant-build-numbers-using-subversion/ -->
|
||||
<macrodef name="gitversion" description="Get git version.">
|
||||
<attribute name="outputproperty"/>
|
||||
<sequential>
|
||||
<echo message="git describe --abbrev=6 => '@{outputproperty}'"/>
|
||||
<exec executable="git"
|
||||
failonerror="true"
|
||||
outputproperty="@{outputproperty}">
|
||||
<arg value="describe"/>
|
||||
<arg value="--abbrev=6"/>
|
||||
<arg value="HEAD"/>
|
||||
<redirector>
|
||||
<outputfilterchain>
|
||||
<tokenfilter>
|
||||
<replaceregex pattern="R" replace=""/>
|
||||
<replaceregex pattern="_" replace="."/>
|
||||
<replaceregex pattern="-" replace="."/>
|
||||
<replaceregex pattern="(-.*)$" replace="-SNAPSHOT"/>
|
||||
</tokenfilter>
|
||||
</outputfilterchain>
|
||||
</redirector>
|
||||
</exec>
|
||||
<echo message="gitversion returned '${@{outputproperty}}'"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<!-- define Maven coordinates; see https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-7c.DeploySnapshotsandStageReleaseswithAnt -->
|
||||
<property name="groupId" value="org.umlgraph" />
|
||||
<property name="artifactId" value="UmlGraph" />
|
||||
<!-- <property name="version" value="1.0-SNAPSHOT" /> -->
|
||||
<gitversion outputproperty="version"/>
|
||||
|
||||
<!-- define artifacts' name, which follows the convention of Maven -->
|
||||
<property name="maven-jar" value="${dist}/lib/${artifactId}-${version}.jar" />
|
||||
<property name="maven-javadoc-jar" value="${dist}/lib/${artifactId}-${version}-javadoc.jar" />
|
||||
<property name="maven-sources-jar" value="${dist}/lib/${artifactId}-${version}-sources.jar" />
|
||||
|
||||
<!-- defined maven snapshots and staging repository id and url -->
|
||||
<!-- passwords are stored in \Users\Diomidis Spinellis\.m2\settings.xml -->
|
||||
<property name="maven-snapshots-repository-id" value="sonatype-nexus-snapshots" />
|
||||
<property name="maven-snapshots-repository-url" value="https://oss.sonatype.org/content/repositories/snapshots/" />
|
||||
<property name="maven-staging-repository-id" value="sonatype-nexus-staging" />
|
||||
<property name="maven-staging-repository-url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2/" />
|
||||
|
||||
<!-- import environment variables -->
|
||||
<property environment="env"/>
|
||||
|
||||
|
|
@ -23,9 +72,9 @@
|
|||
<mkdir dir="${lib}"/>
|
||||
<mkdir dir="testdata/dot-out"/>
|
||||
<mkdir dir="${javadoc}"/>
|
||||
<mkdir dir="${dist}/lib"/>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="version">
|
||||
<exec executable="git"
|
||||
outputproperty="VERSION">
|
||||
|
|
@ -104,5 +153,95 @@ class Version { public static String VERSION = "${VERSION}";}
|
|||
</doclet>
|
||||
</javadoc>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="pom" description="generate the pom.xml file with the correct version">
|
||||
<copy file="pom.template.xml"
|
||||
tofile="pom.xml"
|
||||
filtering="yes" overwrite="yes">
|
||||
<filterchain>
|
||||
<filterreader classname="org.apache.tools.ant.filters.ExpandProperties"/>
|
||||
</filterchain>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="dist" depends="compile" description="generate the distribution">
|
||||
<!-- build the main artifact -->
|
||||
<jar jarfile="${maven-jar}" basedir="${build}" />
|
||||
|
||||
<!-- build the javadoc artifact -->
|
||||
<javadoc sourcepath="${src}" destdir="${dist}/javadoc" />
|
||||
<jar jarfile="${maven-javadoc-jar}">
|
||||
<fileset dir="${dist}/javadoc" />
|
||||
</jar>
|
||||
|
||||
<!-- build the sources artifact -->
|
||||
<jar jarfile="${maven-sources-jar}">
|
||||
<fileset dir="${src}" />
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="deploy" depends="dist,pom" description="deploy snapshot version to Maven snapshot repository">
|
||||
<!-- for this to work install http://maven.apache.org/ant-tasks/download.html into ant/lib -->
|
||||
<artifact:mvn>
|
||||
<arg value="org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy-file" />
|
||||
<arg value="-Durl=${maven-snapshots-repository-url}" />
|
||||
<arg value="-DrepositoryId=${maven-snapshots-repository-id}" />
|
||||
<arg value="-DpomFile=pom.xml" />
|
||||
<arg value="-Dfile=${maven-jar}" />
|
||||
</artifact:mvn>
|
||||
<artifact:mvn>
|
||||
<arg value="org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy-file" />
|
||||
<arg value="-Durl=${maven-snapshots-repository-url}" />
|
||||
<arg value="-DrepositoryId=${maven-snapshots-repository-id}" />
|
||||
<arg value="-DpomFile=pom.xml" />
|
||||
<arg value="-Dfile=${maven-sources-jar}" />
|
||||
<arg value="-Dclassifier=sources" />
|
||||
</artifact:mvn>
|
||||
|
||||
<!-- sign and deploy the javadoc artifact -->
|
||||
<artifact:mvn>
|
||||
<arg value="org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy-file" />
|
||||
<arg value="-Durl=${maven-snapshots-repository-url}" />
|
||||
<arg value="-DrepositoryId=${maven-snapshots-repository-id}" />
|
||||
<arg value="-DpomFile=pom.xml" />
|
||||
<arg value="-Dfile=${maven-javadoc-jar}" />
|
||||
<arg value="-Dclassifier=javadoc" />
|
||||
</artifact:mvn>
|
||||
</target>
|
||||
|
||||
<!-- before this, update project version (both build.xml and pom.xml) from SNAPSHOT to RELEASE -->
|
||||
<target name="stage" depends="dist,pom" description="deploy release version to Maven staging repository">
|
||||
<!-- sign and deploy the main artifact -->
|
||||
<artifact:mvn>
|
||||
<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" />
|
||||
<arg value="-Durl=${maven-staging-repository-url}" />
|
||||
<arg value="-DrepositoryId=${maven-staging-repository-id}" />
|
||||
<arg value="-DpomFile=pom.xml" />
|
||||
<arg value="-Dfile=${maven-jar}" />
|
||||
<arg value="-Pgpg" />
|
||||
</artifact:mvn>
|
||||
|
||||
<!-- sign and deploy the sources artifact -->
|
||||
<artifact:mvn>
|
||||
<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" />
|
||||
<arg value="-Durl=${maven-staging-repository-url}" />
|
||||
<arg value="-DrepositoryId=${maven-staging-repository-id}" />
|
||||
<arg value="-DpomFile=pom.xml" />
|
||||
<arg value="-Dfile=${maven-sources-jar}" />
|
||||
<arg value="-Dclassifier=sources" />
|
||||
<arg value="-Pgpg" />
|
||||
</artifact:mvn>
|
||||
|
||||
<!-- sign and deploy the javadoc artifact -->
|
||||
<artifact:mvn>
|
||||
<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" />
|
||||
<arg value="-Durl=${maven-staging-repository-url}" />
|
||||
<arg value="-DrepositoryId=${maven-staging-repository-id}" />
|
||||
<arg value="-DpomFile=pom.xml" />
|
||||
<arg value="-Dfile=${maven-javadoc-jar}" />
|
||||
<arg value="-Dclassifier=javadoc" />
|
||||
<arg value="-Pgpg" />
|
||||
</artifact:mvn>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,13 @@
|
|||
<notes>
|
||||
<dl>
|
||||
|
||||
<dt>Version 5.6 Under development </dt><dd>
|
||||
<dt>Version 5.7 Under development </dt><dd>
|
||||
</dd>
|
||||
|
||||
<dt>Version 5.6 2012-05-31 </dt><dd>
|
||||
<ul>
|
||||
<li>Maven artifact deployment</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt>Version 5.5 2012-05-13 </dt><dd>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0"?>
|
||||
<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.umlgraph</groupId>
|
||||
<artifactId>umlgraph</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>UMLGraph</name>
|
||||
<version>${version}</version>
|
||||
<description>Declarative Drawing of UML Diagrams</description>
|
||||
<url>http://www.umlgraph.org</url>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>BSD License (original)</name>
|
||||
<url>http://www.opensource.org/licenses/bsd-license.php</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<scm>
|
||||
<url>https://github.com/dspinellis/UMLGraph</url>
|
||||
<connection>git://github.com/dspinellis/UMLGraph.git</connection>
|
||||
</scm>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>dspinellis</id>
|
||||
<name>Diomidis Spinellis</name>
|
||||
<email>dds@aueb.gr</email>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<dependencies/>
|
||||
|
||||
</project>
|
||||
Loading…
Reference in New Issue