Skip to content

Commit

Permalink
A bunch of minor cleanup, comments, bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fracture91 committed Jan 18, 2013
1 parent 5811fff commit 6ed234b
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 23 deletions.
2 changes: 1 addition & 1 deletion DefectTracker/.externalToolBuilders/Build Core Jar.launch
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.launching.remote.InternalAntRunner"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DefectTracker"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/DefectTracker/build.xml}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
Expand Down
21 changes: 21 additions & 0 deletions DefectTracker/.externalToolBuilders/Build Default.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/DefectTracker/build.xml"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-6-openjdk-amd64"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.launching.remote.InternalAntRunner"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DefectTracker"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/DefectTracker/build.xml}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
</launchConfiguration>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.launching.remote.InternalAntRunner"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DefectTracker"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/DefectTracker/build.xml}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
Expand Down
10 changes: 10 additions & 0 deletions DefectTracker/.project
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/Build Default.launch</value>
</dictionary>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
Expand Down
5 changes: 3 additions & 2 deletions DefectTracker/build.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="DefectTracker" default="compile">
<project name="DefectTracker" default="compile.deps">
<import file="../build-common.xml"/>

<property name="core-jar-dest" location="${core-lib}/DefectTracker.jar"/>
Expand Down Expand Up @@ -59,7 +59,8 @@
<delete file="${janeway-jar-dest}"/>
</target>

<target name="test" depends="compile-test">
<!-- compile dependency is necessary since Core needs jars to run tests... hacky -->
<target name="test" depends="compile-test, compile">
<junit printsummary="yes" haltonfailure="no">
<classpath refid="test-classpath"/>
<formatter type="xml"/>
Expand Down
2 changes: 1 addition & 1 deletion Janeway/build.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Janeway" default="compile">
<project name="Janeway" default="compile.deps">
<import file="../build-common.xml"/>

<path id="classpath">
Expand Down
14 changes: 11 additions & 3 deletions Network/build.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Network" default="compile">
<project name="Network" default="compile.deps">
<import file="../build-common.xml"/>

<path id="classpath">
<pathelement path="build"/>
</path>
Expand All @@ -11,7 +11,7 @@
<pathelement path="build-test"/>
<pathelement path="${junit-jar}"/>
</path>

<target name="compile">
<mkdir dir="build"/>
<javac srcdir="src" destdir="build" includeJavaRuntime="yes">
Expand All @@ -26,9 +26,17 @@
</javac>
</target>

<!-- Build a jar. Not really used, just as an example. -->
<target name="jar" depends="compile">
<jar destfile="network.jar">
<fileset dir="build"/>
</jar>
</target>

<target name="clean">
<delete dir="build"/>
<delete dir="build-test"/>
<delete dir="network.jar"/>
</target>

<target name="test" depends="compile-test">
Expand Down
11 changes: 0 additions & 11 deletions Network/buildjar.xml

This file was deleted.

31 changes: 29 additions & 2 deletions build-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<property name="core-lib" location="${dependencies.basedir}/Core/WPISuite/WebContent/WEB-INF/lib"/>
<property name="junit-jar" location="${dependencies.basedir}/junit-4.8.2.jar"/>

<!-- build.xml files that import this one should override the following targets -->

<target name="clean" description="Deletes files created during the build">
<echo message="${ant.project.name} - build-common.clean - not implemented"/>
</target>
Expand All @@ -22,17 +24,42 @@
</target>


<target name="clean.dependencies"
<!--
The following targets can be used in any build.xml that imports this file. Examples follow.
Compile the DefectTracker project and any dependencies:
$ cd DefectTracker
$ ant compile.deps
Only run DefectTracker's tests:
$ cd DefectTracker
$ ant test.single
-->

<target name="compile.deps"
description="Compiles source (includes dependencies)">
<antcall target="depend.${ant.project.name}">
<param name="dependency.target" value="compile"/>
</antcall>
</target>

<target name="clean.deps"
description="Deletes files created during the build (includes dependencies)">
<antcall target="depend.${ant.project.name}">
<param name="dependency.target" value="clean"/>
</antcall>
</target>

<target name="dist.dependencies"
<target name="dist.deps"
description="Creates distributable (includes dependencies)">
<antcall target="depend.${ant.project.name}">
<param name="dependency.target" value="dist"/>
</antcall>
</target>

<target name="test.single" depends="compile.deps"
description="Runs tests for this single project">
<mkdir dir="${test-results}"/>
<antcall target="test"/>
</target>
</project>
8 changes: 8 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
<project name="sample" default="compile">
<import file="dependencies.xml"/>

<!--
The following targets call build.xml files in the projects specified in dependencies.xml.
This happens in whatever order is necessary to satisfy the dependency graph.
For example, to run all tests:
$ ant test
-->

<target name="clean" description="Deletes build files">
<delete dir="${test-results}"/>
<antcall target="depend.all">
Expand Down
10 changes: 8 additions & 2 deletions dependencies.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="dependencies" default="depend.all">
<dirname property="dependencies.basedir" file="${ant.file.dependencies}"/>

<!-- All test targets should output JUnit's XML reports to this directory -->
<property name="test-results" location="${dependencies.basedir}/test-results"/>


<!-- This target should have dependencies such that all projects are depended upon -->
<target name="depend.all"
depends="depend.Janeway, depend.WPISuite, depend.DefectTracker">
</target>

<!-- Each project must define its dependencies below -->
<!--
Each project must define itself and its dependencies below.
Note that this applies to _every_ target in the root build.xml.
-->

<target name="depend.WPISuite-Interfaces">
<ant dir="${dependencies.basedir}/Core/WPISuite-Interfaces"
Expand Down

0 comments on commit 6ed234b

Please sign in to comment.