Commits

dloy committed 036c377

BitBucket

  • Participants
  • Parent commits a87dd12

Comments (0)

Files changed (4)

fixity-demo/make-fixity-home.xml

+<?xml version="1.0" encoding="UTF-8"?>
    <target name="-init">
        <echo message="-init entered"/>
        <available file="../fixity-conf/properties/Fixity.properties" property="fixitydemo.properties.present"/>
    </target>
    
    <target name="-initProp">
        <echo message="-initProp entered"/>
        <property file="make-repository.properties"/>
    </target>
    <target name="create" depends="-init">
        <antcall target="-if-repository"/>
    </target>
    <target name="-if-repository" if="fixitydemo.properties.present">
        <property file="../fixity-conf/properties/Fixity.properties"/>
        <echo message="fixitydemo.properties - FixityService=${FixityService}"/>
        <echo message="fixitydemo.properties - db.url=${db.url}"/>
        <echo message="fixitydemo.properties - db.user=${db.user}"/>
        <echo message="fixitydemo.properties - db.password=${db.password}"/>
        <antcall target="handle-repository"/>
    </target>
    <target name="handle-repository"
        depends="-set-conditions, -delete-fixity-home, -test-available, -build-fixity-home">
        <echo message="handle-repository entered"/>
    </target>
    <target name="-set-conditions">
        <echo message="exists.FixityService=${exists.FixityService}"/>
        <condition property="delete.FixityService">
            <equals arg1="${exists.FixityService}" arg2="delete" />
        </condition>
        <echo message="delete.FixityService=${delete.FixityService}"/>
    </target>
    <target name="-delete-fixity-home" if="delete.FixityService">
        <echo message="delete.FixityService entered"/>
        <delete dir="${FixityService}"/>
    </target>
    <target name="-test-available">
        <available file="${FixityService}" property="FixityService.present"/>
        <echo message="test-available entered"/>
        <echo message="FixityService.present=${FixityService.present}"/>
    </target>
    <target name="-build-fixity-home" unless="FixityService.present">
        <echo message="build-fixity-home entered"/>
        <mkdir dir="${FixityService}"/>
        <copy todir="${FixityService}">
            <fileset dir="make/fixity"/>
        </copy>
        <mkdir dir="${FixityService}/log"/>
    </target>

fixity-demo/make/fixity/0=fixity_1.0

+Fixity/0.2/1.0

fixity-demo/make/fixity/fixity-info.txt

+name: UC3
+description: UC3 fixity micro-service
+intervalDays: 0
+threadPool: 1
+queueSleepSeconds: 1
+serviceScheme: Fixity/0.2/1.0
+baseURI: http://fixity.cdlib.org/
+notificationEmail: mailto:dloy@ucop.edu
+supportURI: mailto:uc3-support@ucop.edu
+periodicReportFrequencyHours: 1
+periodicReportFormat: xhtml

fixity-demo/pom.xml

+<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.cdlib.mrt</groupId>
+  <artifactId>mrt-fixitydemo</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>UC3-mrtFixityDemo</name>
+  <packaging>pom</packaging>
+  <url>http://uc3.cdlib.org</url>
+
+  <!-- force UTF-8 -->
+  <properties>
+      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <build>
+    <plugins>
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>1.4</version>
+            <executions>
+                <execution>
+                    <phase>compile</phase>
+                    <configuration>
+                        <tasks>
+        <ant dir="." antfile="make-fixity-home.xml" target="create"/>
+                        </tasks>
+                    </configuration>
+                    <goals>
+                      <goal>run</goal>
+                    </goals>
+                </execution>
+            </executions>
+
+       </plugin>
+
+    </plugins>
+</build>
+</project>