Skip to content

Commit a9d7b0b

Browse files
author
Pete Pickerill
authored
Merge pull request #1 from IBM-UrbanCode/DVONE-5333
Dvone 5333
2 parents 1db3b93 + 4a5204b commit a9d7b0b

41 files changed

Lines changed: 1964 additions & 1965 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ignore all dotfiles by except git specific ones
2+
.*
3+
!.gitignore
4+
!.git*
5+
!.travis.yml
6+
7+
# ignore all temporary files and ahp specific files
8+
*.bak
9+
*.bom
10+
*.swp
11+
*~
12+
13+
# ignore compilation related directories in the root of the project
14+
/releases
15+
/build
16+
/lib

.project

Lines changed: 0 additions & 11 deletions
This file was deleted.

.travis.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
language: groovy
2+
rvm:
3+
- 1.8.8
4+
install:
5+
- ant install-ivy -DfailIvy=false
6+
before_script:
7+
- export BUILD_LIFE=${TRAVIS_TAG}
8+
- ant run-tests
9+
script:
10+
- ant -DbuildLife=${BUILD_LIFE}
11+
jdk:
12+
- oraclejdk8
13+
- oraclejdk7
14+
- openjdk7
15+
- openjdk6
16+
notifications:
17+
slack:
18+
secure: IHx7lyduKZq2euHqoNtARinzdNMVHPwMZ74jAf48c2a4dqu/aJfEvbJ9VNN2A+xLnNwf7wK46TNBtRIRbJZBeOFMf+aRZnHSRJFAWFXAg37uezeL6oN0KHo0CUl0Wib9hvyiM3pVzs0ZQ4qdxelwEhDn4CLulfo/haV0OFVoNeN3ldfs8VwXENU4+K1quxgDMz4XTd5mHjssaLcSLvDlbM3E+yoam/rRVl6w+LD2NkxyszZRloOMn9wcAVhadA47kv5/TmTL8ONz67efSLxN6vbPx7CQuWMV050NcUCczZNxDxom7bXp4+i19thjCUO08BR9nVprExiGNXk16msslsGpG2ietNUeMUbLq2hA5ih6OVgqOEZhHiO/7L7zYXuhNkN7fTcW/MR8On1W+jzBhVpUjdQ9LDiRA+yS9JXvgbvoAYd5b22C3BZqpzVVxOhK/Uq1ekDhIfGk7uVuSVtkqk0NLkDrmfc7AReMCQbJEAlEgI8kBZBamKDYFamzLY2NMiF2KZnVOBazmK6/y+rafqwnp5hQ77B7wa3Gb0pjIXeLwljfUQWxayZNWJhOpOYJUJ+2OIRRCMKNDuk9/7TMPZrv6mBIDkJR/2Rr/FhIZCCQjU2fO43gBGzAIL2tI7Mqnc+b3nsyvEQ5SGFLXrBhnYu9k9g4tpD2aZveeBwdF58=
19+
on_success: change
20+
on_failure: change
21+
email: false
22+
deploy:
23+
provider: releases
24+
api_key:
25+
secure: DBNiMwcQRIDD3G0xbOek4ED1+iYCqt1DddcKIC0FyH5xeGhhdq1sNYuRyN96dcqof0q+70vBfhWT5pEWGbaOQMQ313DWzUv7zDdwW64ym/ZExOuaSoQsUCoGM0JB7IUtm0mUG3MOF4sq+1abJxLEp3IhO7e7/dwCyl+3jPXyNVzqFZEh0iIgEAc3wVDTKFEvKBKy5XuoHDa399/BvE4aMk7neSFhECZvLAutrw1p3jvUm6L273WyF6NB6CY1PFeoOXPAzicgS6pyWdUSCGRKG9nNrpYtIJVxky/YQ8rMxC8J0rDJE2ak4R5XXCfqxJxCRB5bR7U695gheQqcqkXelfsUMlaLYYakIWIgQS+RsTAeF1Qf163oB02bGSrmjti50zzndyGQ6cOa+2zSBm9aPLclCeXU5syBYYikmRByyNNYNaPPwnCqQ9FWFW+lW4cWnQ5EJDSaBKADy10hlBWlKQTuF5uKWM0fOMhAL8q5y9+mVXIcqmCLYRvmrq3TcI5OWIwxhhTcVKuGC1sJJkCmMa1tIfho/DWdksUISEiMuE01YWAeHKUEH0OB7OtXXQ1WtnnFNQVTn6OBFi8xkZPlBGA8t40PdjvDgq/JBVKlUsGenSt2GWe5AEtPr+72P1nEkqFBH8zpQnPu0u3GlZXhY5B7FtKtXoRYj4M4PHC9NRk=
26+
file_glob: true
27+
file: releases/*.zip
28+
skip_cleanup: true
29+
on:
30+
tags: true
31+
repo: IBM-UrbanCode/DaticalDB-UCD-UCB

README.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,30 @@
1-
DaticalDB4UrbanCode
1+
IBM UrbanCode Deploy and Build DaticalDB Plugin [![Build Status](https://travis-ci.org/IBM-UrbanCode/DaticalDB-UCD-UCB.svg?branch=master)](https://travis-ci.org/IBM-UrbanCode/DaticalDB-UCD-UCB)
22
=================
33

44
This plugin brings Datical DB functionality to IBM UrbanCode Deploy and Build.
55

66
Two properties in the plugin step, Datical DB Install Directory and Datical DB Drivers Directory, read a default property at the resource (Agent) level. For each agent that is going to execute Datical DB, create a Resource Property called daticalDBCmd and daticalDBDriversDir.
77

8+
Note: This is not the plug-in distributable! The full plugin can be found under the releases tab.
9+
10+
### License
11+
This plug-in is protected under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0)
12+
13+
### Compatibility
14+
This plug-in requires version 6.1.1 or later of IBM UrbanCode Deploy.
15+
This plug-in requires version 6.1.0 or later of IBM UrbanCode Build.
16+
17+
818
Release Notes:
919

20+
### Version 22.223 - October 25, 2016
21+
22+
Community GitHub Release
23+
24+
### Version 1.220 - December 3, 2015
25+
26+
Rebranding for UrbanCode as plugin works for both Deploy and Build
27+
1028
### Version 1.219 - March 10, 2015
1129

1230
- Added support for arbitrary Groovy Script execution.
@@ -16,7 +34,7 @@ Release Notes:
1634

1735
- Added support for creating new projects using our project_creator.groovy script. New Step Name is "Create Datical DB Project".
1836
- Added support for baselining existing projects using our project_baseline.groovy script. New Step Name is "Register and Baseline Datical DB Project"
19-
37+
2038
### Version 1.195 - March 3, 2015
2139

2240
- Added support for "show version"
@@ -56,9 +74,3 @@ Examples:
5674
Thus, we've added new new text boxes to each Datical DB Step, Datical DB JVM and Datical DB JVM Arguments. Neither are required.
5775

5876
There is a known issue with placing multiple arguments in the "Datical DB JVM Arguments" text box. IBM Rational UrbanCode Deploy passes all properties as quoted strings. Thus, *--vmargs -Xms512M -Dmx512M* becomes *--vmargs "-Xms512M -Dmx512M"*. We are working with IBM on a resolution to this issue.
59-
60-
### Version 1.220 - December 3, 2015
61-
62-
Rebranding for UrbanCode as plugin works for both Deploy and Build
63-
64-

build.number

Lines changed: 0 additions & 3 deletions
This file was deleted.

build.xml

Lines changed: 249 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,249 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<project name="DaticalDB4UrbanCode" default="dist" basedir=".">
3-
<description>
4-
simple example build file
5-
</description>
6-
7-
<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"/>
8-
<!-- set global properties for this build -->
9-
<property name="src" location="src" />
10-
<property name="build" location="build" />
11-
<property name="dist" location="dist" />
12-
13-
<target name="dist" depends="clean" description="generate the distribution">
14-
<buildnumber />
15-
16-
<property file="build.number"/>
17-
<echo>build.number=${build.number}</echo>
18-
19-
<xmltask source="info.xml" dest="info.xml" report="true" failwithoutmatch="true">
20-
<replace path="/pluginInfo/release-version/text()" withText="1.${build.number}"/>
21-
</xmltask>
22-
23-
<mkdir dir="${dist}" />
24-
25-
<zip destfile="${dist}/DaticalDB4UrbanCode-1.${build.number}.zip" basedir="." excludes=".git/*,**/dist,dist/*,**/doc" />
26-
</target>
27-
28-
<target name="clean" description="clean up">
29-
<delete dir="${dist}" />
30-
</target>
31-
</project>
1+
<!--
2+
© Copyright IBM Corporation 2016.
3+
This is licensed under the following license.
4+
The Eclipse Public 1.0 License (http://www.eclipse.org/legal/epl-v10.html)
5+
U.S. Government Users Restricted Rights: Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
6+
-->
7+
8+
<project name="DaticalDB4UrbanCode" default="main" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
9+
10+
<property name="build.dir" value="${basedir}/build" />
11+
<property name="build.plugin.dir" value="${build.dir}/plugin" />
12+
<property name="build.tmp.dir" value="${build.dir}/tmp" />
13+
<property name="build.tmp.groovy.dir" value="${build.tmp.dir}/groovy" />
14+
<property name="build.tmp.java.dir" value="${build.tmp.dir}/java" />
15+
<property name="build.test.dir" value="${build.dir}/test" />
16+
<property name="build.test.java.dir" value="${build.test.dir}/java" />
17+
<property name="build.test.classes.dir" value="${build.test.dir}/classes" />
18+
<property name="build.java.dir" value="${build.dir}/java"/>
19+
<property name="license.dir" value="${basedir}/license" />
20+
<property name="plugin.dir" value="${basedir}/plugin" />
21+
<property name="src.dir" value="${basedir}/src" />
22+
<property name="src.main.dir" value="${src.dir}/main" />
23+
<property name="src.main.groovy.dir" value="${src.main.dir}/groovy" />
24+
<property name="src.main.java.dir" value="${src.main.dir}/java" />
25+
<property name="src.main.scripts.dir" value="${src.main.dir}/scripts" />
26+
<property name="src.test.dir" value="${src.dir}/test" />
27+
<property name="src.test.java.dir" value="${src.test.dir}/java" />
28+
<property name="doc.dir" value="${basedir}/doc" />
29+
<property name="lib.dir" value="${basedir}/lib" />
30+
<property name="lib.build.dir" value="${lib.dir}/build" />
31+
<property name="lib.build.classes.dir" value="${lib.build.dir}/classes" />
32+
<property name="lib.test.dir" value="${lib.dir}/test" />
33+
<property name="lib.test.java.dir" value="${lib.test.dir}/java" />
34+
<property name="lib.test.dir" value="${lib.dir}/test" />
35+
<property name="releases.dir" value="${basedir}/releases" />
36+
<property name="releases.report.dir" value="${releases.dir}/report" />
37+
38+
39+
<property name="plugin" value="DaticalDB-UCD-UCB" />
40+
<xmlproperty file="${plugin.dir}/plugin.xml" collapseAttributes="true"/>
41+
<property name="version" value="${plugin.header.identifier.version}" />
42+
<property name="buildLife" value="dev" />
43+
<property name="pluginDist" value="${releases.dir}/${plugin}-v${version}.${buildLife}.zip" />
44+
45+
<target name="main" depends="clean, resolve, compile-classes, build, dist">
46+
<echo>Plugin build complete!</echo>
47+
</target>
48+
49+
<!-- ================================================================== -->
50+
<!-- PATHS -->
51+
<!-- ================================================================== -->
52+
<path id="classpath">
53+
<fileset dir="${lib.dir}">
54+
<include name="*.jar"/>
55+
</fileset>
56+
</path>
57+
58+
<path id="classpath.build">
59+
<fileset dir="${lib.build.dir}">
60+
<include name="*.jar"/>
61+
</fileset>
62+
<path refid="classpath"/>
63+
</path>
64+
65+
<path id="classpath.test">
66+
<fileset dir="${lib.test.dir}">
67+
<include name="*.jar"/>
68+
</fileset>
69+
<path refid="classpath.build"/>
70+
</path>
71+
72+
<!-- =================================================== -->
73+
<!-- TASK DEFINTITION TARGET -->
74+
<!-- =================================================== -->
75+
76+
<target name="taskdef" unless="taskdef.no">
77+
<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc">
78+
<classpath>
79+
<path refid="classpath.test"/>
80+
</classpath>
81+
</taskdef>
82+
</target>
83+
84+
<!-- =================================================== -->
85+
<!-- BUILD TARGET -->
86+
<!-- =================================================== -->
87+
88+
<!-- Copy in the dependencies -->
89+
<target name="build" depends="resolve">
90+
91+
<!-- inputs (info, upgrade, plugin, and scripts) -->
92+
<copy todir="${build.plugin.dir}">
93+
<fileset dir="${plugin.dir}">
94+
<include name="info.xml" />
95+
<include name="upgrade.xml" />
96+
<include name="plugin.xml" />
97+
</fileset>
98+
99+
<!-- scripts -->
100+
<fileset dir="${src.main.scripts.dir}" />
101+
</copy>
102+
<replace file="${build.plugin.dir}/info.xml" token="#RELEASE_VERSION#" value="${version}.${buildLife}" />
103+
104+
<mkdir dir="${build.plugin.dir}/license"/>
105+
<!-- copy license -->
106+
<copy todir="${build.plugin.dir}/license">
107+
<fileset dir="${license.dir}" />
108+
</copy>
109+
110+
<mkdir dir="${build.plugin.dir}/doc"/>
111+
<!-- copy doc -->
112+
<copy todir="${build.plugin.dir}/doc">
113+
<fileset dir="${doc.dir}" />
114+
</copy>
115+
116+
<mkdir dir="${build.plugin.dir}/lib"/>
117+
<!-- copy libs -->
118+
<copy todir="${build.plugin.dir}/lib">
119+
<fileset dir="${lib.dir}" >
120+
<exclude name="**/build/**"/>
121+
<exclude name="**/test/**"/>
122+
</fileset>
123+
</copy>
124+
125+
<!-- Copy Classes -->
126+
<mkdir dir="${build.plugin.dir}/classes"/>
127+
<mkdir dir="${lib.build.classes.dir}"/>
128+
<copy todir="${build.plugin.dir}/classes">
129+
<!-- Groovy -->
130+
<fileset dir="${src.main.groovy.dir}">
131+
<include name="**/*.groovy" />
132+
</fileset>
133+
134+
<!-- Java -->
135+
<fileset dir="${lib.build.classes.dir}">
136+
<include name="**/*.class" />
137+
</fileset>
138+
</copy>
139+
140+
</target>
141+
142+
<!-- =================================================== -->
143+
<!-- DIST TARGET -->
144+
<!-- =================================================== -->
145+
<target name="dist" depends="resolve">
146+
<zip destfile="${pluginDist}" basedir="${build.plugin.dir}" update="false"/>
147+
</target>
148+
149+
<!-- =================================================== -->
150+
<!-- CLEAN TARGET -->
151+
<!-- =================================================== -->
152+
<target name="clean">
153+
<delete dir="${build.dir}" />
154+
<mkdir dir="${build.dir}" />
155+
<delete file="${pluginDist}" />
156+
<delete dir="${lib.test.java.dir}" />
157+
<delete dir="${lib.build.classes.dir}" />
158+
</target>
159+
160+
<!-- =================================================== -->
161+
<!-- RESOLVE TARGET -->
162+
<!-- =================================================== -->
163+
<target name="resolve" depends="install-ivy" unless="resolve.no" description="Resolve all dependencies">
164+
<mkdir dir="${lib.dir}"/>
165+
<mkdir dir="${lib.build.dir}"/>
166+
<mkdir dir="${lib.test.dir}"/>
167+
<ivy:retrieve conf="default" pattern="${lib.dir}/[artifact]-[revision](-[classifier]).[ext]"/>
168+
<ivy:retrieve conf="build" pattern="${lib.dir}/[conf]/[artifact]-[revision](-[classifier]).[ext]"/>
169+
<ivy:retrieve conf="test" pattern="${lib.dir}/[conf]/[artifact]-[revision](-[classifier]).[ext]"/>
170+
</target>
171+
172+
<!-- =================================================== -->
173+
<!-- INSTALL IVY TARGET -->
174+
<!-- =================================================== -->
175+
<available classname="org.apache.ivy.Main" property="ivy.installed"/>
176+
<target name="install-ivy" depends="-install, -fail"></target>
177+
178+
<target name="-install" description="Install ivy" unless="ivy.installed">
179+
<!-- Installation -->
180+
<property name="antHome" value="${user.home}${file.separator}.ant"/>
181+
<mkdir dir="${antHome}${file.separator}lib"/>
182+
<get dest="${antHome}${file.separator}lib${file.separator}ivy.jar" src="http://search.maven.org/remotecontent?filepath=org/apache/ivy/ivy/2.3.0/ivy-2.3.0.jar"/>
183+
<echo message="SUCCESS! Ivy has been installed in ${antHome}." />
184+
185+
<!-- Determine whether to continue or fail -->
186+
<property name="failIvy" value="true"/>
187+
<condition property="do.fail">
188+
<equals arg1="${failIvy}" arg2="true" />
189+
</condition>
190+
</target>
191+
192+
<!-- Default to fail if Ivy installed, unless -DfailIvy=false : Used for .travis -->
193+
<target name="-fail" if="do.fail">
194+
<fail message="Please run the build again.${line.separator}Note: If you get this message more than once, trying specify your Ant's home directory with the flag: ant -DantHome='ant/home/directory/here'" />
195+
</target>
196+
197+
<!-- =================================================== -->
198+
<!-- TEST TARGET -->
199+
<!-- =================================================== -->
200+
201+
<target name="run-tests" depends="compile-classes, compile-tests" unless="tests.no">
202+
203+
<mkdir dir="${releases.report.dir}"/>
204+
<junit printsummary="yes" haltonfailure="no" showoutput="false" failureproperty="tests.failed">
205+
206+
<classpath refid="classpath.test" />
207+
<classpath location="${lib.test.java.dir}" />
208+
209+
<formatter type="xml" />
210+
<formatter type="plain" />
211+
212+
<batchtest fork="yes" todir="${releases.report.dir}">
213+
<fileset dir="${src.test.java.dir}">
214+
<include name="**/*Test.java" />
215+
</fileset>
216+
</batchtest>
217+
218+
</junit>
219+
<fail message="JUnit Tests Failed. View 'releases/report' for full output log." if="tests.failed" />
220+
</target>
221+
222+
<!-- =================================================== -->
223+
<!-- COMPILE TARGETS -->
224+
<!-- =================================================== -->
225+
<target name="compile-classes" description="Compile Groovy or Java classes." depends="resolve, taskdef" unless="compile.no">
226+
<!-- Groovy -->
227+
<mkdir dir="${build.tmp.groovy.dir}"/>
228+
<groovyc srcdir="${src.main.dir}" destdir="${build.tmp.groovy.dir}">
229+
<include name="**/*.groovy"/>
230+
<classpath refid="classpath.build"/>
231+
<javac debug="on" deprecation="true"/>
232+
</groovyc>
233+
<delete dir="${build.tmp.groovy.dir}" />
234+
<!-- Java -->
235+
<mkdir dir="${lib.build.classes.dir}"/>
236+
<javac srcdir="${src.main.java.dir}" destdir="${lib.build.classes.dir}" includeantruntime="false">
237+
<include name="**/*.java"/>
238+
<classpath refid="classpath.build"/>
239+
</javac>
240+
</target>
241+
242+
<!-- Java Tests -->
243+
<target name="compile-tests" description="Compile Java Test Files..." depends="compile-classes">
244+
<mkdir dir="${lib.test.java.dir}"/>
245+
<javac srcdir="${src.test.java.dir}" destdir="${lib.test.java.dir}" includeantruntime="false">
246+
<classpath refid="classpath.test"/>
247+
</javac>
248+
</target>
249+
</project>

0 commit comments

Comments
 (0)