diff --git a/build.gradle b/build.gradle
index 87e174cf6b7070f199f24805658fa691ce40db35..9e0bde27ffc2908022aa1a0148b6dc8acec2be35 100644
--- a/build.gradle
+++ b/build.gradle
@@ -157,5 +157,3 @@ jastadd {
 }
 
 generateAst.dependsOn relast
-
-apply from: 'test.build.gradle'
diff --git a/src/main/java/org/jastadd/ros2rag/compiler/Compiler.java b/src/main/java/org/jastadd/ros2rag/compiler/Compiler.java
index 9fd90f037abad335414f1c54fea0a548c34b2909..a4f5bdc7f53251fecbd0aaf86d98faf017684259 100644
--- a/src/main/java/org/jastadd/ros2rag/compiler/Compiler.java
+++ b/src/main/java/org/jastadd/ros2rag/compiler/Compiler.java
@@ -71,12 +71,17 @@ public class Compiler {
 
     printMessage("Writing output files");
     // copy MqttUpdater into outputDir
+    final String mqttUpdaterFileName = "MqttUpdater.jadd";
     try {
-      Files.copy(Paths.get("src", "main", "resources", "MqttUpdater.jadd"),
-          Paths.get(outputDir, "MqttUpdater.jadd"),
+      InputStream inputStream = Compiler.class.getClassLoader().getResourceAsStream(mqttUpdaterFileName);
+      if (inputStream == null) {
+        throw new CompilerException("Could not open " + mqttUpdaterFileName);
+      }
+      Files.copy(inputStream,
+          Paths.get(outputDir, mqttUpdaterFileName),
           StandardCopyOption.REPLACE_EXISTING);
     } catch (IOException e) {
-      throw new CompilerException("Could not copy MqttUpdater.java", e);
+      throw new CompilerException("Could not copy " + mqttUpdaterFileName, e);
     }
     writeToFile(outputDir + "/Grammar.relast", ros2Rag.getProgram().generateAbstractGrammar());
     writeToFile(outputDir + "/ROS2RAG.jadd", ros2Rag.generateAspect(optionRootNode.getValue()));
diff --git a/src/test/.gitignore b/src/test/.gitignore
deleted file mode 100644
index e372444da686be9b60c0a1ef74a2821d13fcb46f..0000000000000000000000000000000000000000
--- a/src/test/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-02-after-ros2rag/*
-03-after-relast/*
-java-gen/*
diff --git a/src/test/01-input/example/Example.jadd b/src/test/01-input/example/Example.jadd
deleted file mode 100644
index 1fd25492334984294171edab4f2e2ffae89ddc9c..0000000000000000000000000000000000000000
--- a/src/test/01-input/example/Example.jadd
+++ /dev/null
@@ -1,47 +0,0 @@
-aspect GrammarTypes {
-  public class IntPosition {
-    private final int x, y, z;
-
-    private IntPosition(int x, int y, int z) {
-      this.x = x;
-      this.y = y;
-      this.z = z;
-    }
-
-    public static IntPosition of(int x, int y, int z) {
-      return new IntPosition(x, y, z);
-    }
-
-    public int getX() {
-      return x;
-    }
-
-    public int getY() {
-      return y;
-    }
-
-    public int getZ() {
-      return z;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-      if (this == o) return true;
-      if (o == null || getClass() != o.getClass()) return false;
-      IntPosition that = (IntPosition) o;
-      return x == that.x &&
-          y == that.y &&
-          z == that.z;
-    }
-
-    @Override
-    public int hashCode() {
-      return java.util.Objects.hash(x, y, z);
-    }
-
-    @Override
-    public String toString() {
-      return "(" + x + ", " + y + ", " + z + ")";
-    }
-  }
-}
diff --git a/src/test/01-input/example/Example.relast b/src/test/01-input/example/Example.relast
deleted file mode 100644
index 5afeb2250283d049143a0134247fb1e374ac4296..0000000000000000000000000000000000000000
--- a/src/test/01-input/example/Example.relast
+++ /dev/null
@@ -1,13 +0,0 @@
-Model ::= RobotArm ZoneModel ;
-
-ZoneModel ::= <Size:IntPosition> SafetyZone:Zone* ;
-
-Zone ::= Coordinate* ;
-
-RobotArm ::= Joint* EndEffector <AttributeTestSource:int> /<AppropriateSpeed:double>/ ; // normally this would be: <AttributeTestSource:int> ;
-
-Joint ::= <Name:String> <CurrentPosition:IntPosition> ;  // normally this would be: <CurrentPosition:IntPosition>
-
-EndEffector : Joint;
-
-Coordinate ::= <Position:IntPosition> ;
diff --git a/src/test/01-input/example/Example.ros2rag b/src/test/01-input/example/Example.ros2rag
deleted file mode 100644
index 9168da25b6d98b26784ef67b64c515be6cecf76c..0000000000000000000000000000000000000000
--- a/src/test/01-input/example/Example.ros2rag
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Version 2020-04-17 */
-// --- update definitions ---
-read Joint.CurrentPosition using ParseLinkState, LinkStateToIntPosition ;
-write RobotArm.AppropriateSpeed using CreateSpeedMessage, SerializeRobotConfig ;
-
-// --- dependency definitions ---
-RobotArm.AppropriateSpeed canDependOn Joint.CurrentPosition as dependency1 ;
-RobotArm.AppropriateSpeed canDependOn RobotArm.AttributeTestSource as dependency2 ;
-
-// --- mapping definitions ---
-ParseLinkState maps byte[] bytes to panda.Linkstate.PandaLinkState {:
-  return panda.Linkstate.PandaLinkState.parseFrom(bytes);
-:}
-
-SerializeRobotConfig maps config.Robotconfig.RobotConfig rc to byte[] {:
-  return rc.toByteArray();
-:}
-
-LinkStateToIntPosition maps panda.Linkstate.PandaLinkState pls to IntPosition {:
-  panda.Linkstate.PandaLinkState.Position p = pls.getPos();
-  { int i = 0; }
-  return IntPosition.of((int) p.getPositionX(), (int) p.getPositionY(), (int) p.getPositionZ());
-:}
-
-CreateSpeedMessage maps double speed to config.Robotconfig.RobotConfig {:
-  return config.Robotconfig.RobotConfig.newBuilder()
-    .setSpeed(speed)
-    .build();
-:}
diff --git a/src/test/01-input/example/linkstate.proto b/src/test/01-input/example/linkstate.proto
deleted file mode 100644
index dc95138ba49f35497f4bdf061496145168292c9d..0000000000000000000000000000000000000000
--- a/src/test/01-input/example/linkstate.proto
+++ /dev/null
@@ -1,38 +0,0 @@
-syntax = "proto3";
-
-package panda;
-
-message PandaLinkState {
-
-  string name = 1;
-
-  message Position {
-    float positionX = 1;
-    float positionY = 2;
-    float positionZ = 3;
-  }
-
-  message Orientation {
-    float orientationX = 1;
-    float orientationY = 2;
-    float orientationZ = 3;
-    float orientationW = 4;
-  }
-
-  message TwistLinear {
-    float twistLinearX = 1;
-    float twistLinearY = 2;
-    float twistLinearZ = 3;
-  }
-
-  message TwistAngular {
-    float twistAngularX = 1;
-    float twistAngularY = 2;
-    float twistAngularZ = 3;
-  }
-
-  Position pos = 2;
-  Orientation orient = 3;
-  TwistLinear tl = 4;
-  TwistAngular ta = 5;
-}
diff --git a/src/test/01-input/example/robotconfig.proto b/src/test/01-input/example/robotconfig.proto
deleted file mode 100644
index c3e0862e0216e5ea00f79966dff8d5ce434f3dac..0000000000000000000000000000000000000000
--- a/src/test/01-input/example/robotconfig.proto
+++ /dev/null
@@ -1,16 +0,0 @@
-syntax = "proto3";
-
-package config;
-
-message RobotConfig {
-
-  double speed = 1;
-  bool loopTrajectory = 2;
-
-  enum PlanningMode {
-    FLUID = 0;
-    CARTESIAN = 1;
-  }
-
-  PlanningMode planningMode = 3;
-}
diff --git a/src/test/java/org/jastadd/ros2rag/tests/ExampleTest.java b/src/test/java/org/jastadd/ros2rag/tests/ExampleTest.java
deleted file mode 100644
index 7b41810c351943775074c5fe1a0abd9e47a5afc6..0000000000000000000000000000000000000000
--- a/src/test/java/org/jastadd/ros2rag/tests/ExampleTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.jastadd.ros2rag.tests;
-
-import example.ast.*;
-import org.junit.jupiter.api.Test;
-
-/**
- * Test case "example".
- *
- * @author rschoene - Initial contribution
- */
-public class ExampleTest {
-
-  @Test
-  public void buildModel() {
-    Model model = new Model();
-    model.MqttSetHost("localhost");
-
-    ZoneModel zoneModel = new ZoneModel();
-    zoneModel.setSize(makePosition(1, 1, 1));
-
-    IntPosition myPosition = makePosition(0, 0, 0);
-    Coordinate myCoordinate = new Coordinate(myPosition);
-    Coordinate leftPosition = new Coordinate(makePosition(-1, 0, 0));
-    Coordinate rightPosition = new Coordinate(makePosition(1, 0, 0));
-
-    Zone safetyZone = new Zone();
-    safetyZone.addCoordinate(myCoordinate);
-    safetyZone.addCoordinate(leftPosition);
-    safetyZone.addCoordinate(rightPosition);
-    zoneModel.addSafetyZone(safetyZone);
-    model.setZoneModel(zoneModel);
-
-    RobotArm robotArm = new RobotArm();
-    robotArm.setAttributeTestSource(1);  // set initial value, no trigger
-
-    Joint joint1 = new Joint();
-    joint1.setName("joint1");
-    joint1.setCurrentPosition(myPosition);
-
-    EndEffector endEffector = new EndEffector();
-    endEffector.setName("gripper");
-    endEffector.setCurrentPosition(makePosition(2, 2, 3));
-
-    robotArm.addJoint(joint1);
-    robotArm.setEndEffector(endEffector);
-    model.setRobotArm(robotArm);
-
-    // add dependencies
-    robotArm.addDependency1(joint1);
-    robotArm.addDependency1(endEffector);
-    robotArm.addDependency2(robotArm);
-  }
-
-  private static IntPosition makePosition(int x, int y, int z) {
-    return IntPosition.of(x, y, z);
-  }
-
-}
diff --git a/src/test/java/org/jastadd/ros2rag/tests/RosToRagTest.java b/src/test/java/org/jastadd/ros2rag/tests/RosToRagTest.java
deleted file mode 100644
index adf19335a371d70a3b30efaf0d08a91a60360571..0000000000000000000000000000000000000000
--- a/src/test/java/org/jastadd/ros2rag/tests/RosToRagTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.jastadd.ros2rag.tests;
-
-import org.jastadd.ros2rag.compiler.Compiler;
-import org.jastadd.ros2rag.compiler.options.CommandLine;
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-
-import java.io.File;
-import java.nio.file.Paths;
-import java.util.Objects;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-@Disabled("migrating build logic from test to build, this test is disabled for now")
-public class RosToRagTest {
-
-  void transform(String inputGrammar, String inputRos2Rag, String rootNode, String outputDir) throws CommandLine.CommandLineException, Compiler.CompilerException {
-
-    System.out.println(Paths.get(".").toAbsolutePath());
-    assertTrue(Paths.get(inputGrammar).toFile().exists(), "input grammar does not exist");
-
-    File outputDirFile = Paths.get(outputDir).toFile();
-    if (outputDirFile.exists()) {
-      assertTrue(outputDirFile.isDirectory());
-      if (Objects.requireNonNull(outputDirFile.list(), "Could not read output directory").length != 0) {
-        System.out.println("output directory is not empty!");
-      }
-    } else {
-      assertTrue(outputDirFile.mkdir());
-    }
-
-    String[] args = {
-        "--outputDir=" + outputDir,
-        "--inputGrammar=" + inputGrammar,
-        "--inputRos2Rag=" + inputRos2Rag,
-        "--rootNode=" + rootNode
-    };
-
-    new Compiler().run(args);
-  }
-
-  @Test
-  void transformMinimalExample() throws CommandLine.CommandLineException, Compiler.CompilerException {
-    transform("src/test/resources/Example.relast",
-        "src/test/resources/Example.ros2rag",
-        "Model",
-        "src/test/resources/out");
-  }
-}
diff --git a/test.build.gradle b/test.build.gradle
deleted file mode 100644
index 04252f02b04ded4c49d6ff7860935f6dd480eef8..0000000000000000000000000000000000000000
--- a/test.build.gradle
+++ /dev/null
@@ -1,68 +0,0 @@
-import org.jastadd.relast.plugin.RelastPlugin
-import org.jastadd.relast.plugin.RelastTest
-apply plugin: RelastPlugin
-
-relastTest {
-    compilerLocation = '../libs/relast.jar'
-}
-
-dependencies {
-    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.4.0'
-    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.4.0'
-    testImplementation 'org.assertj:assertj-core:3.12.1'
-    testImplementation group: 'org.fusesource.mqtt-client', name: 'mqtt-client', version: '1.15'
-    testImplementation group: 'net.sf.beaver', name: 'beaver-rt', version: '0.9.11'
-    testImplementation 'com.google.protobuf:protobuf-java:3.0.0'
-}
-
-sourceSets {
-    test {
-        java.srcDir "src/test/java-gen"
-    }
-}
-
-task preprocessExampleTest(type: JavaExec, group: 'verification') {
-
-    doFirst {
-        delete 'src/test/02-after-ros2rag/example/Grammar.relast',
-                'src/test/02-after-ros2rag/example/MqttUpdater.java',
-                'src/test/02-after-ros2rag/example/ROS2RAG.jadd'
-    }
-
-    classpath = sourceSets.main.runtimeClasspath
-    main = 'org.jastadd.ros2rag.compiler.Compiler'
-    //noinspection GroovyAssignabilityCheck
-    args '--outputDir=src/test/02-after-ros2rag/example',
-            '--inputGrammar=src/test/01-input/example/Example.relast',
-            '--inputRos2Rag=src/test/01-input/example/Example.ros2rag',
-            '--rootNode=Model'
-}
-
-//task compileExampleTest(type: JavaExec, group: 'verification') {
-//
-//    doFirst {
-//        delete 'src/test/java-gen/example'
-//    }
-//
-//    classpath = sourceSets.main.runtimeClasspath
-//    main = 'org.jastadd.JastAdd'
-//    //noinspection GroovyAssignabilityCheck
-//    args '--o=src/test/java-gen/', '--package=example.ast',
-//            'src/test/jastadd-gen/example/Grammar.relast',
-//            'src/test/jastadd-gen/example/MqttUpdater.java',
-//            'src/test/jastadd-gen/example/ROS2RAG.jadd',
-//            'src/test/jastadd/Example.jadd'
-//}
-
-task compileExampleTest(type: RelastTest) {
-    verbose = true
-    relastFiles 'src/test/02-after-ros2rag/example/Grammar.relast'
-    grammarName = 'src/test/03-after-relast/example/example'
-    packageName = 'example.ast'
-    moreInputFiles 'src/test/01-input/example/Example.jadd',
-            'src/test/02-after-ros2rag/example/MqttUpdater.jadd',
-            'src/test/02-after-ros2rag/example/ROS2RAG.jadd'
-}
-
-test.dependsOn compileExampleTest
-compileExampleTest.dependsOn preprocessExampleTest