ACCUMULO-2118: Created new template file and build script for the HelloWorld 
jars. Wired up execution in start/pom.xml. Jars can be built with `mvn compile 
-PbuildJars`


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/8b96dcf6
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8b96dcf6
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8b96dcf6

Branch: refs/heads/master
Commit: 8b96dcf656a88ad9a36ea854c5b2eae41baad13e
Parents: b95a1f9
Author: Dave Marion <dlmar...@apache.org>
Authored: Mon May 9 14:36:11 2016 -0400
Committer: Dave Marion <dlmar...@apache.org>
Committed: Mon May 9 14:36:11 2016 -0400

----------------------------------------------------------------------
 start/pom.xml                                   |  35 +++++++++++++++++++
 start/src/test/java/test/HelloWorldTemplate     |  25 +++++++++++++
 .../test/resources/ClassLoaderTestA/Test.jar    | Bin 1570 -> 761 bytes
 .../test/resources/ClassLoaderTestB/Test.jar    | Bin 1572 -> 761 bytes
 .../test/resources/ClassLoaderTestC/Test.jar    | Bin 1571 -> 760 bytes
 start/src/test/resources/HelloWorld.jar         | Bin 1008 -> 692 bytes
 start/src/test/resources/HelloWorld2.jar        | Bin 1483 -> 692 bytes
 start/src/test/shell/makeHelloWorldJars.sh      |  26 ++++++++++++++
 start/src/test/shell/makeTestJars.sh            |   2 --
 9 files changed, 86 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/8b96dcf6/start/pom.xml
----------------------------------------------------------------------
diff --git a/start/pom.xml b/start/pom.xml
index 9993555..cf50df0 100644
--- a/start/pom.xml
+++ b/start/pom.xml
@@ -105,4 +105,39 @@
       </plugins>
     </pluginManagement>
   </build>
+  <profiles>
+    <profile>
+      <id>buildJars</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>exec-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>Build Test jars</id>
+                <goals>
+                  <goal>exec</goal>
+                </goals>
+                <phase>generate-sources</phase>
+                <configuration>
+                  
<executable>${project.basedir}/src/test/shell/makeTestJars.sh</executable>
+                </configuration>
+              </execution>
+              <execution>
+                <id>Build HelloWorld jars</id>
+                <goals>
+                  <goal>exec</goal>
+                </goals>
+                <phase>generate-sources</phase>
+                <configuration>
+                  
<executable>${project.basedir}/src/test/shell/makeHelloWorldJars.sh</executable>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8b96dcf6/start/src/test/java/test/HelloWorldTemplate
----------------------------------------------------------------------
diff --git a/start/src/test/java/test/HelloWorldTemplate 
b/start/src/test/java/test/HelloWorldTemplate
new file mode 100644
index 0000000..2d4d766
--- /dev/null
+++ b/start/src/test/java/test/HelloWorldTemplate
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package test;
+
+public class HelloWorld {
+
+  @Override
+  public String toString() {
+    return "%%";
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8b96dcf6/start/src/test/resources/ClassLoaderTestA/Test.jar
----------------------------------------------------------------------
diff --git a/start/src/test/resources/ClassLoaderTestA/Test.jar 
b/start/src/test/resources/ClassLoaderTestA/Test.jar
index 8b9c462..58d3e9a 100644
Binary files a/start/src/test/resources/ClassLoaderTestA/Test.jar and 
b/start/src/test/resources/ClassLoaderTestA/Test.jar differ

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8b96dcf6/start/src/test/resources/ClassLoaderTestB/Test.jar
----------------------------------------------------------------------
diff --git a/start/src/test/resources/ClassLoaderTestB/Test.jar 
b/start/src/test/resources/ClassLoaderTestB/Test.jar
index 4ced46f..11d68e1 100644
Binary files a/start/src/test/resources/ClassLoaderTestB/Test.jar and 
b/start/src/test/resources/ClassLoaderTestB/Test.jar differ

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8b96dcf6/start/src/test/resources/ClassLoaderTestC/Test.jar
----------------------------------------------------------------------
diff --git a/start/src/test/resources/ClassLoaderTestC/Test.jar 
b/start/src/test/resources/ClassLoaderTestC/Test.jar
index 87b077e..f5e12b3 100644
Binary files a/start/src/test/resources/ClassLoaderTestC/Test.jar and 
b/start/src/test/resources/ClassLoaderTestC/Test.jar differ

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8b96dcf6/start/src/test/resources/HelloWorld.jar
----------------------------------------------------------------------
diff --git a/start/src/test/resources/HelloWorld.jar 
b/start/src/test/resources/HelloWorld.jar
index 4e7028f..28cd1f7 100644
Binary files a/start/src/test/resources/HelloWorld.jar and 
b/start/src/test/resources/HelloWorld.jar differ

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8b96dcf6/start/src/test/resources/HelloWorld2.jar
----------------------------------------------------------------------
diff --git a/start/src/test/resources/HelloWorld2.jar 
b/start/src/test/resources/HelloWorld2.jar
index 2dc06ea..365f615 100644
Binary files a/start/src/test/resources/HelloWorld2.jar and 
b/start/src/test/resources/HelloWorld2.jar differ

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8b96dcf6/start/src/test/shell/makeHelloWorldJars.sh
----------------------------------------------------------------------
diff --git a/start/src/test/shell/makeHelloWorldJars.sh 
b/start/src/test/shell/makeHelloWorldJars.sh
new file mode 100755
index 0000000..f6c32da
--- /dev/null
+++ b/start/src/test/shell/makeHelloWorldJars.sh
@@ -0,0 +1,26 @@
+#! /usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+mkdir -p target/HelloWorld/test
+sed "s/%%/Hello World\!/" < src/test/java/test/HelloWorldTemplate > 
target/HelloWorld/test/HelloWorld.java
+javac target/HelloWorld/test/HelloWorld.java -d target/HelloWorld
+jar -cf src/test/resources/HelloWorld.jar -C target/HelloWorld 
test/HelloWorld.class
+
+mkdir -p target/HalloWelt/test
+sed "s/%%/Hallo Welt/" < src/test/java/test/HelloWorldTemplate > 
target/HalloWelt/test/HelloWorld.java
+javac target/HalloWelt/test/HelloWorld.java -d target/HalloWelt
+jar -cf src/test/resources/HelloWorld2.jar -C target/HalloWelt 
test/HelloWorld.class

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8b96dcf6/start/src/test/shell/makeTestJars.sh
----------------------------------------------------------------------
diff --git a/start/src/test/shell/makeTestJars.sh 
b/start/src/test/shell/makeTestJars.sh
index d3b92a1..61d5e74 100755
--- a/start/src/test/shell/makeTestJars.sh
+++ b/start/src/test/shell/makeTestJars.sh
@@ -15,8 +15,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-
-cd "$ACCUMULO_HOME/src/start"
 for x in A B C
 do
     sed "s/testX/test$x/" < src/test/java/test/TestTemplate > 
src/test/java/test/TestObject.java

Reply via email to