Skip to content

Commit

Permalink
Refactor build system to pull all binary dependencies remotely, inclu…
Browse files Browse the repository at this point in the history
…ding travis

* Add target: bootstrap, this must be run first and only once
* Add ivy*LogLevel variables for showing log output.
* Clean up build files.
  • Loading branch information
Nava2 committed Sep 2, 2015
1 parent f37504e commit 316c5b2
Show file tree
Hide file tree
Showing 45 changed files with 447 additions and 300 deletions.
7 changes: 0 additions & 7 deletions .svnignore

This file was deleted.

2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ before_install:

script:
- cd build/
- ant -Dmyenv=travis -f build.deps.xml bootstrap

- ant -Dmyenv=travis -f build.umple.xml first-build

# build against itself and run all tests
Expand Down
1 change: 0 additions & 1 deletion UmpleToJava/.svnignore

This file was deleted.

1 change: 0 additions & 1 deletion UmpleToPhp/.svnignore

This file was deleted.

1 change: 0 additions & 1 deletion UmpleToRuby/.svnignore

This file was deleted.

1 change: 0 additions & 1 deletion UmpleToTemplate/.svnignore

This file was deleted.

5 changes: 0 additions & 5 deletions Umplificator/.svnignore

This file was deleted.

1 change: 0 additions & 1 deletion Umplificator/JavaToUmple/.svnignore

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 2 additions & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
svn.properties

deps/
2 changes: 2 additions & 0 deletions build/_cc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<property name="haltonfailure" value="true"/>
<property name="shouldPackageUmpleOnline" value="true"/>
<property name="shouldDeploy" value="true"/>
<property name="ivyRetrieveLogLevel" value="quiet" />
<property name="ivyResolveLogLevel" value="download-only" />
<property name="showJunitSummary" value="false"/>
<property name="showJunitOutput" value="false"/>
<property name="junit" value="*Test"/>
Expand Down
18 changes: 18 additions & 0 deletions build/_local.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@
should only be done on the build server. If false, it skips
this step
ivyRetrieveLogLevel => This controls how much log output
<ivy:retrieve /> produces. Available options:
- default
the default log settings, where all usual messages are output to the console
- quiet
disable all usual messages, making the whole retrieve process quiet unless errors occur
ivyResolveLogLevel => This controls how much log output
<ivy:resolve /> produces. Available options are:
- default
the default log settings, where all usual messages are output to the console
- download-only
disable all usual messages but download ones. A resolve with everything in cache won't output any message.
- quiet
disable all usual messages, making the whole resolve process quiet unless errors occur
showJunitSummary => used by JUnit, if true, then the command line
will output the summary of a JUnit test run which can be useful
for local debugging. If false, not summary is presented.
Expand All @@ -43,6 +59,8 @@
<property name="haltonfailure" value="false"/>
<property name="shouldPackageUmpleOnline" value="false"/>
<property name="shouldDeploy" value="false"/>
<property name="ivyRetrieveLogLevel" value="quiet" />
<property name="ivyResolveLogLevel" value="download-only" />
<property name="showJunitSummary" value="false"/>
<property name="showJunitOutput" value="false"/>
<property name="junit" value="*Test"/>
Expand Down
2 changes: 2 additions & 0 deletions build/_patch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<property name="haltonfailure" value="true"/>
<property name="shouldPackageUmpleOnline" value="false"/>
<property name="shouldDeploy" value="false"/>
<property name="ivyRetrieveLogLevel" value="quiet" />
<property name="ivyResolveLogLevel" value="default" />
<property name="showJunitSummary" value="false"/>
<property name="showJunitOutput" value="false"/>
<property name="junit" value="*Test"/>
Expand Down
2 changes: 2 additions & 0 deletions build/_release.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<property name="haltonfailure" value="false"/>
<property name="shouldPackageUmpleOnline" value="true"/>
<property name="shouldDeploy" value="false"/>
<property name="ivyRetrieveLogLevel" value="quiet" />
<property name="ivyResolveLogLevel" value="quiet" />
<property name="showJunitSummary" value="false"/>
<property name="showJunitOutput" value="false"/>
<property name="junit" value="*Test"/>
Expand Down
99 changes: 8 additions & 91 deletions build/_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,97 +10,8 @@
<property name="myenv" value="cc" />
<import file="_${myenv}.xml" />

<path id="junit4.classpath">
<pathelement location="lib/junit.jar"/>
<pathelement location="lib/org.hamcrest.core_1.1.0.v20090501071000.jar"/>
</path>

<path id="validator_core.classpath">
<pathelement location="lib/junit.jar"/>
<pathelement location="lib/org.hamcrest.core_1.1.0.v20090501071000.jar"/>
<pathelement location="lib/umplificatorplugins/commons-collections4-4.0.jar"/>
<pathelement location="lib/umplificatorplugins/commons-io-2.4.jar"/>
<pathelement location="lib/umplificatorplugins/commons-lang-2.5.jar"/>
<pathelement location="lib/umplificatorplugins/commons-logging-1.1.3.jar"/>
<pathelement location="lib/umplificatorplugins/org.eclipse.core.contenttype_3.4.200.v20130326-1255.jar"/>
<pathelement location="lib/umplificatorplugins/org.eclipse.core.jobs_3.5.300.v20130429-1813.jar"/>
<pathelement location="lib/umplificatorplugins/org.eclipse.equinox.common_3.6.200.v20130402-1505.jar"/>
<pathelement location="lib/umplificatorplugins/org.eclipse.equinox.preferences_3.5.100.v20130422-1538.jar"/>
<pathelement location="lib/umplificatorplugins/org.eclipse.osgi_3.9.0.v20130529-1710.jar"/>
<pathelement location="lib/umplificatorplugins/org.eclipse.jdt.core_3.9.1.v20130905-0837.jar"/>
<pathelement location="lib/umplificatorplugins/org.eclipse.core.runtime_3.9.0.v20130326-1255.jar"/>
<pathelement location="lib/umplificatorplugins/com.ibm.icu_50.1.1.v201304230130.jar"/>
<pathelement location="lib/umplificatorplugins/org.eclipse.cdt.core_5.5.0.201309180223.jar"/>
<pathelement location="lib/umplificatorplugins/org.eclipse.jface_3.10.0.v20140604-0740.jar"/>
<pathelement location="lib/umplificatorplugins/org.eclipse.text_3.5.300.v20130515-1451.jar"/>
<pathelement location="lib/umplificatorplugins/log4j-core-2.0.1.jar"/>
<pathelement location="lib/umplificatorplugins/log4j-api-2.0.1.jar"/>
<pathelement location="lib/umplificatorplugins/perf4j-0.9.16.jar"/>

<!-- ```````````````````````````
DROOLS LIBRARIES FOR THE UMPLIFICATOR
``````````````````````````` -->
<pathelement location="lib/umplificatorplugins/droolsplugins/antlr-runtime-3.5.jar"/>
<pathelement location="lib/umplificatorplugins/droolsplugins/drools-compiler-6.0.1.Final.jar"/>
<pathelement location="lib/umplificatorplugins/droolsplugins/drools-core-6.0.1.Final.jar"/>
<pathelement location="lib/umplificatorplugins/droolsplugins/drools-jsr94-6.0.1.Final.jar"/>
<pathelement location="lib/umplificatorplugins/droolsplugins/kie-api-6.0.1.Final.jar"/>
<pathelement location="lib/umplificatorplugins/droolsplugins/kie-internal-6.0.1.Final.jar"/>
<pathelement location="lib/umplificatorplugins/droolsplugins/mvel2-2.1.8.Final.jar"/>
<pathelement location="lib/umplificatorplugins/droolsplugins/protobuf-java-2.5.0.jar"/>
<pathelement location="lib/umplificatorplugins/droolsplugins/slf4j-api-1.7.6.jar"/>
<pathelement location="lib/umplificatorplugins/droolsplugins/slf4j-simple-1.7.6.jar"/>
<pathelement location="lib/umplificatorplugins/droolsplugins/xstream-1.4.3.jar"/>
</path>

<path id="umple.classpath">
<pathelement location="lib/ant.jar"/>
<pathelement location="lib/ant-launcher.jar"/>
<pathelement location="lib/tools.jar"/>
</path>

<path id="xtext_core.classpath">
<pathelement location="lib/xtextplugins/com.google.inject_2.0.0.v201003051000.jar" />
<pathelement location="lib/xtextplugins/org.antlr.runtime_3.0.0.v200803061811.jar" />
<pathelement location="lib/xtextplugins/org.eclipse.emf.common_2.6.0.v20100914-1218.jar" />
<pathelement location="lib/xtextplugins/org.eclipse.emf.ecore_2.7.0.v20110605-0747.jar" />
<pathelement location="lib/xtextplugins/org.eclipse.xtend_1.0.1.v201008251147.jar" />
<pathelement location="lib/xtextplugins/org.eclipse.xtext.util_2.0.0.v201106070531.jar" />
<pathelement location="lib/xtextplugins/org.eclipse.xtext.xtend_1.0.2.v201102150722.jar" />
<pathelement location="lib/xtextplugins/org.eclipse.xtext_2.0.0.v201106070531.jar" />
<pathelement location="lib/xtextplugins/com.google.collect_0.8.0.v201102150722.jar" />
<pathelement location="lib/xtextplugins/org.eclipse.emf.ecore.xmi_2.5.0.v20100521-1846.jar"/>
<pathelement location="lib/xtextplugins/org.apache.commons.logging_1.0.4.v201005080501.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.emf.mwe.core_1.1.0.v201106070424.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.xtend.typesystem.emf_1.0.1.v201008251147.jar"/>
<!-- ```````````````````````````
Libraries for the xtext Grammar and MWE2 Generator
``````````````````````````` -->
<pathelement location="lib/xtextplugins/com.ibm.icu_4.2.1.v20100412.jar" />
<pathelement location="lib/xtextplugins/org.apache.commons.cli_1.0.0.v20080604-1500.jar" />
<pathelement location="lib/xtextplugins/org.eclipse.emf.codegen.ecore_2.6.1.v20100914-1218.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.emf.codegen_2.6.0.v20100914-1218.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.emf.mwe.utils_1.1.0.v201106070424.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.emf.mwe2.language_1.0.2.v201102151014.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.emf.mwe2.launch_2.0.0.v201106070634.jar" />
<pathelement location="lib/xtextplugins/org.eclipse.emf.mwe2.runtime_2.0.0.v201106070424.jar" />
<pathelement location="lib/xtextplugins/org.eclipse.xpand_1.0.1.v201008251147.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.xtext.common.types_2.0.0.v201106070531.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.xtext.generator_1.0.2.v201102150722.jar"/>
<!-- ```````````````````````````
Libraries for the Umple Editor: cruise.umple.xtext.ui
``````````````````````````` -->
<pathelement location="lib/xtextplugins/org.eclipse.xtext.ui_2.0.0.v201106070531.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.emf.edit_2.6.0.v20100914-1218.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.emf.edit.ui_2.6.0.v20100914-1218.jar"/>
<pathelement location="lib/xtextplugins/org.apache.log4j_1.2.15.v201005080500.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.xtext.ui.shared_1.0.2.v201102150722.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.xtext.builder_1.0.2.v201102150722.jar"/>
<pathelement location="lib/xtextplugins/org.antlr.runtime_3.2.0.v201101311130.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.xtext.common.types.ui_2.0.0.v201106070531.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.xtext.ui.codetemplates_2.0.1.v201108020636.jar"/>
<pathelement location="lib/xtextplugins/org.eclipse.xtext.ui.codetemplates.ui_2.0.1.v201108020636.jar"/>
</path>
<import file="build.deps.xml" />
<deps-declare-taskdef />

<!-- ```````````````````````````
Clean up and initialize any potential byproduct
Expand Down Expand Up @@ -169,6 +80,10 @@
``````````````````````````` -->

<target name="template.test">

<deps-get-path conf="core" pathid="core.ivy.classpath" />
<deps-get-path conf="test" pathid="test.ivy.classpath" />

<junit fork="yes" forkmode="perBatch" haltonfailure="${haltonfailure}" showoutput="${showJunitOutput}" printsummary="${showJunitSummary}" >
<!-- <jmvarg value="-XstartOnFirstThread"/> -->
<formatter type="xml" unless="${showJunitOutput}"/>
Expand All @@ -180,6 +95,8 @@
</fileset>
</batchtest>
<classpath refid="project.classpath"/>
<classpath refid="core.ivy.classpath"/>
<classpath refid="test.ivy.classpath"/>
</junit>

<junitreport todir="${test.output.path}">
Expand Down
3 changes: 3 additions & 0 deletions build/_travis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<property name="shouldDeploy" value="false"/>
<property name="showJunitSummary" value="true"/>
<property name="showJunitOutput" value="false"/>

<property name="ivyRetrieveLogLevel" value="default" />
<property name="ivyResolveLogLevel" value="default" />
<property name="junit" value="*Test"/>
<property name="rake_cmd" value="rake"/>

Expand Down
19 changes: 2 additions & 17 deletions build/_versionNew.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,15 @@

<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>

<exec executable="svn" output="build/svn.properties">
<arg value="info" />
</exec>
<property prefix="svn" file="build/svn.properties"/>
<property prefix="base" file="build/umpleversion.txt"/>

<!-- Use Git to get the most recent commit -->
<exec executable="git" outputproperty="git.revision">
<arg value="describe" />
<arg value="--always" />
</exec>


<!-- if the svn property didn't set it'll be the string "svn.Revision", get the git version instead. -->
<if>
<matches pattern="\d+" string="${svn.Revision}"/>
<then>
<property name="revision" value="${svn.revision}" />
</then>
<else>
<property name="revision" value="${git.revision}" />
</else>
</if>

<property name="umple.version" value="${base.version}-${revision}" />
<property name="umple.version" value="${base.version}-${git.revision}" />
<echo message="Current Version: ${umple.version}" />

</project>
Expand Down
128 changes: 128 additions & 0 deletions build/build.deps.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8"?>
<project basedir=".." name="UmpleDeps" xmlns:ivy="antlib:org.apache.ivy.ant">

<!-- ```````````````````````````
Environment Variables
``````````````````````````` -->
<!-- Ivy Configuration -->
<property name="ivy.install.version" value="2.4.0" />
<property name="user.home.ant" value="${user.home}/.ant/lib" />
<property name="ivy.jar.file" value="${user.home.ant}/ivy-${ivy.install.version}.jar" />

<property name="umple.ivy.dep.file" value="${basedir}/build/ivy.xml" />

<!-- Umple Last -->
<property name="umple.deps.dir" value="${basedir}/deps" />
<property name="umple.deps.manual.dir" value="${umple.deps.dir}/manual" />
<property name="umple.last.jar.file" value="${umple.deps.dir}/umple-${umple.version}.jar" />

<!-- Macros used to work nicely with Ivy -->

<macrodef name="deps-get-path">
<attribute name="conf" description="Ivy configuration to load"/>
<attribute name="pathid" description="Ant pathid retrieved jars load into"/>
<sequential>
<path id="@{pathid}">
<fileset file="${umple.deps.dir}/@{conf}/*.jar" />
</path>
</sequential>
</macrodef>

<macrodef name="deps-resolve-private">
<attribute name="conf" description="Ivy configuration to load"/>
<attribute name="pathid" description="Ant pathid retrieved jars load into"/>
<attribute name="pattern" description="Pattern given to 'ivy:retrieve'"/>
<attribute name="transitive" description="Transitive 'ivy:resolve'" default="true"/>

<sequential>
<echo>Resolving ivy configuration, @{conf}.</echo>
<ivy:resolve file="${umple.ivy.dep.file}" conf="@{conf}" transitive="@{transitive}" log="download-only"/>

<mkdir dir="${umple.deps.dir}/@{conf}" />
<ivy:retrieve pattern="@{pattern}" symlink="false" log="quiet"/>

<deps-get-path conf="@{conf}" pathid="@{pathid}" />
</sequential>
</macrodef>

<macrodef name="deps-resolve">
<attribute name="conf" description="Ivy configuration to load"/>
<attribute name="pathid" description="Ant pathid retrieved jars load into"/>
<sequential>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />

<if> <!-- Only run the resolve if the cache path isn't known about -->
<not><isreference refid="@{pathid}" /></not>
<then>
<deps-resolve-private conf="@{conf}"
pathid="@{pathid}"
pattern="${umple.deps.dir}/[conf]/[artifact].[ext]"
transitive="true" />
</then>
</if>
</sequential>
</macrodef>

<macrodef name="deps-declare-taskdef">
<sequential>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" />
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
</sequential>
</macrodef>

<!-- Install Ivy: -->
<target name="bootstrap" description="Install Ivy and Build requirements">

<mkdir dir="${user.home.ant}"/>

<echo>Installing Ivy v${ivy.install.version}</echo>
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
dest="${ivy.jar.file}" usetimestamp="true" />

<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${ivy.jar.file}" />

<echo>Getting Build dependencies</echo>

<ivy:settings file="${basedir}/build/ivysettings.xml"/>

<deps-resolve-private conf="build"
pathid="build.ivy.classpath"
pattern="${user.home.ant}/[artifact].[ext]" transitive="false"/>
</target>

<target name="deps:umple" description="--> retrieve latest umple version.">
<!-- this isn't actually Ivy, but its the smartest place to do this; eventually we'll use Ivy :) -->
<echo>Fetching umple-${umple.version}</echo>

<echo level="warning">WARNING: This is merely wget-ing http://try.umple.org/scripts/umple.jar</echo>
<mkdir dir="${umple.deps.dir}" />
<get src="http://try.umple.org/scripts/umple.jar"
dest="${umple.last.jar.file}"
usetimestamp="true" />

<path id="umple.last.classpath">
<pathelement location="${umple.last.jar.file}"/>
</path>

<taskdef name="umplec" classname="cruise.umple.util.UmplecAntTask" classpathref="umple.last.classpath" />
</target>

<target name="deps:manual" description="--> retrieve manual dependencies">
<echo>Fetching manual dependencies</echo>
<mkdir dir="${umple.deps.manual.dir}" />

<echo>Fetching org.eclipse.cdt.core_5.5.0.jar</echo>

<echo level="warning">WARNING: This is merely wget-ing https://umple.googlecode.com/svn/trunk/lib/umplificatorplugins/org.eclipse.cdt.core_5.5.0*.jar</echo>
<mkdir dir="${umple.deps.manual.dir}" />
<get src="https://umple.googlecode.com/svn/trunk/lib/umplificatorplugins/org.eclipse.cdt.core_5.5.0.201309180223.jar"
dest="${umple.deps.manual.dir}/"
usetimestamp="true" />

<path id="umple.manual.classpath">
<fileset file="${umple.deps.manual.dir}/*.jar" />
</path>
</target>

</project>

Loading

0 comments on commit 316c5b2

Please sign in to comment.