Permalink
Browse files

Refactor build system to pull all binary dependencies remotely, inclu…

…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...
1 parent f37504e commit 316c5b26a8ee3c0ce853e8009c70ead503ab2a81 @Nava2 Nava2 committed Aug 23, 2015
Showing with 447 additions and 300 deletions.
  1. +0 −7 .svnignore
  2. +2 −0 .travis.yml
  3. +0 −1 UmpleToJava/.svnignore
  4. +0 −1 UmpleToPhp/.svnignore
  5. +0 −1 UmpleToRuby/.svnignore
  6. +0 −1 UmpleToTemplate/.svnignore
  7. +0 −5 Umplificator/.svnignore
  8. +0 −1 Umplificator/JavaToUmple/.svnignore
  9. +0 −1 Umplificator/cruise.umple.umplificator.model.workflow.edit/.svnignore
  10. +0 −1 Umplificator/cruise.umple.umplificator.model.workflow/.svnignore
  11. +2 −0 build/.gitignore
  12. +2 −0 build/_cc.xml
  13. +18 −0 build/_local.xml
  14. +2 −0 build/_patch.xml
  15. +2 −0 build/_release.xml
  16. +8 −91 build/_template.xml
  17. +3 −0 build/_travis.xml
  18. +2 −17 build/_versionNew.xml
  19. +128 −0 build/build.deps.xml
  20. +6 −4 build/build.eclipseplugin.xml
  21. +5 −1 build/build.sandbox.xml
  22. +15 −6 build/build.testbed.xml
  23. +156 −112 build/build.umple.xml
  24. +5 −4 build/build.umplificatorplugin.xml
  25. +4 −3 build/build.xml
  26. +63 −0 build/ivy.xml
  27. +20 −0 build/ivysettings.xml
  28. +0 −4 cruise.umple.eclipse/.svnignore
  29. +0 −5 cruise.umple.nebula/.svnignore
  30. +0 −2 cruise.umple.validator/.svnignore
  31. +0 −1 cruise.umple.xtext.ui/.svnignore
  32. +0 −1 cruise.umple.xtext/.svnignore
  33. +0 −5 cruise.umple/.svnignore
  34. +1 −1 cruise.umple/test/cruise/umple/UmpleConsoleMainTest.java
  35. +0 −1 cruise.umplificator.eclipse/.svnignore
  36. +0 −2 cruise.umplificator/.svnignore
  37. +0 −3 examples/smtrace/.svnignore
  38. +0 −1 lib/.svnignore
  39. +0 −2 sandbox/.svnignore
  40. +0 −5 testbed/.svnignore
  41. +0 −2 testbed_php/.svnignore
  42. +0 −3 testbed_ruby/.svnignore
  43. +2 −3 travis/deps.linux.sh
  44. +1 −1 travis/deps.osx.sh
  45. +0 −1 umpleonline/.svnignore
View
@@ -1,7 +0,0 @@
-.metadata
-ignore
-dist
-svn.properties
-.project
-.classpath
-httpd.conf
View
@@ -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
@@ -1 +0,0 @@
-bin
@@ -1 +0,0 @@
-bin
@@ -1 +0,0 @@
-bin
@@ -1 +0,0 @@
-bin
@@ -1,5 +0,0 @@
-src-gen-umple
-bin
-.classpath
-.project
-.settings
@@ -1 +0,0 @@
-bin
View
@@ -1 +1,3 @@
svn.properties
+
+deps/
View
@@ -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"/>
View
@@ -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.
@@ -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"/>
View
@@ -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"/>
View
@@ -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"/>
View
@@ -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
@@ -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}"/>
@@ -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}">
View
@@ -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"/>
View
@@ -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>
View
@@ -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>
+
Oops, something went wrong.

0 comments on commit 316c5b2

Please sign in to comment.