You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@twill.apache.org by ch...@apache.org on 2014/07/29 19:55:37 UTC

[1/2] git commit: Restructure examples POM - inherit from the twill-parent. - Fix checkstyle problems in example.

Repository: incubator-twill
Updated Branches:
  refs/heads/master 063bffb72 -> 177c5b73c


Restructure examples POM
- inherit from the twill-parent.
- Fix checkstyle problems in example.


Project: http://git-wip-us.apache.org/repos/asf/incubator-twill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-twill/commit/c1a0ca43
Tree: http://git-wip-us.apache.org/repos/asf/incubator-twill/tree/c1a0ca43
Diff: http://git-wip-us.apache.org/repos/asf/incubator-twill/diff/c1a0ca43

Branch: refs/heads/master
Commit: c1a0ca43381ea47cc1a1f09cacdb37e6a3ecb4d4
Parents: 063bffb
Author: Terence Yim <te...@continuuity.com>
Authored: Tue Jul 29 10:49:51 2014 -0700
Committer: Terence Yim <te...@continuuity.com>
Committed: Tue Jul 29 10:49:51 2014 -0700

----------------------------------------------------------------------
 twill-examples/echo/pom.xml                     | 10 +----
 .../echo/src/main/java/echo/EchoMain.java       |  2 +-
 twill-examples/pom.xml                          | 44 +++++---------------
 twill-examples/yarn/pom.xml                     | 14 ++++---
 .../twill/example/yarn/BundledJarExample.java   |  9 ++--
 .../apache/twill/example/yarn/HelloWorld.java   |  2 +-
 6 files changed, 26 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/c1a0ca43/twill-examples/echo/pom.xml
----------------------------------------------------------------------
diff --git a/twill-examples/echo/pom.xml b/twill-examples/echo/pom.xml
index f70f2ca..5791b29 100644
--- a/twill-examples/echo/pom.xml
+++ b/twill-examples/echo/pom.xml
@@ -24,7 +24,7 @@ limitations under the License.
 
     <parent>
         <artifactId>twill-examples</artifactId>
-        <groupId>org.apache.twill.example</groupId>
+        <groupId>org.apache.twill</groupId>
         <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
 
@@ -45,13 +45,7 @@ limitations under the License.
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <version>1.7.5</version>
-        </dependency>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>1.2.17</version>
+            <artifactId>slf4j-api</artifactId>
         </dependency>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/c1a0ca43/twill-examples/echo/src/main/java/echo/EchoMain.java
----------------------------------------------------------------------
diff --git a/twill-examples/echo/src/main/java/echo/EchoMain.java b/twill-examples/echo/src/main/java/echo/EchoMain.java
index a2cb4bd..06ae984 100644
--- a/twill-examples/echo/src/main/java/echo/EchoMain.java
+++ b/twill-examples/echo/src/main/java/echo/EchoMain.java
@@ -37,7 +37,7 @@ public class EchoMain {
     System.out.println("Got args: " + Arrays.toString(args));
   }
 
-  public static class TestConverter extends Converter<String, Integer> {
+  private static final class TestConverter extends Converter<String, Integer> {
 
     @Override
     protected Integer doForward(String s) {

http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/c1a0ca43/twill-examples/pom.xml
----------------------------------------------------------------------
diff --git a/twill-examples/pom.xml b/twill-examples/pom.xml
index a3419b6..1e49337 100644
--- a/twill-examples/pom.xml
+++ b/twill-examples/pom.xml
@@ -21,9 +21,14 @@ limitations under the License.
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
-    <groupId>org.apache.twill.example</groupId>
+
+    <parent>
+        <groupId>org.apache.twill</groupId>
+        <artifactId>twill-parent</artifactId>
+        <version>0.4.0-incubating-SNAPSHOT</version>
+    </parent>
+
     <artifactId>twill-examples</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
     <name>Apache Twill examples</name>
     <packaging>pom</packaging>
 
@@ -32,44 +37,15 @@ limitations under the License.
         <module>yarn</module>
     </modules>
 
-    <properties>
-        <twill.version>0.4.0-incubating-SNAPSHOT</twill.version>
-        <twill.groupId>org.apache.twill</twill.groupId>
-    </properties>
-
     <build>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.1</version>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.rat</groupId>
-                <artifactId>apache-rat-plugin</artifactId>
-                <version>0.10</version>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <version>2.8.1</version>
                 <configuration>
-                    <excludes>
-                        <exclude>.git/**/*</exclude>
-                        <exclude>**/*.iml</exclude>
-                        <exclude>target/**/*</exclude>
-                        <exclude>**/README</exclude>
-                        <exclude>src/test/resources/header.txt</exclude>
-                        <exclude>**/zookeeper.out</exclude>
-                    </excludes>
+                    <skip>true</skip>
                 </configuration>
-                <executions>
-                    <execution>
-                        <phase>validate</phase>
-                        <goals>
-                            <goal>check</goal>
-                        </goals>
-                    </execution>
-                </executions>
             </plugin>
         </plugins>
     </build>

http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/c1a0ca43/twill-examples/yarn/pom.xml
----------------------------------------------------------------------
diff --git a/twill-examples/yarn/pom.xml b/twill-examples/yarn/pom.xml
index 74fc7d1..4a22da7 100644
--- a/twill-examples/yarn/pom.xml
+++ b/twill-examples/yarn/pom.xml
@@ -23,7 +23,7 @@ limitations under the License.
 
     <parent>
         <artifactId>twill-examples</artifactId>
-        <groupId>org.apache.twill.example</groupId>
+        <groupId>org.apache.twill</groupId>
         <version>0.4.0-incubating-SNAPSHOT</version>
     </parent>
 
@@ -33,19 +33,21 @@ limitations under the License.
 
     <dependencies>
         <dependency>
-            <groupId>${twill.groupId}</groupId>
+            <groupId>${project.groupId}</groupId>
             <artifactId>twill-yarn</artifactId>
-            <version>${twill.version}</version>
+            <version>${project.version}</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>${twill.groupId}</groupId>
+            <groupId>${project.groupId}</groupId>
             <artifactId>twill-ext</artifactId>
-            <version>${twill.version}</version>
+            <version>${project.version}</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
-            <version>13.0.1</version>
+            <scope>provided</scope>
         </dependency>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/c1a0ca43/twill-examples/yarn/src/main/java/org/apache/twill/example/yarn/BundledJarExample.java
----------------------------------------------------------------------
diff --git a/twill-examples/yarn/src/main/java/org/apache/twill/example/yarn/BundledJarExample.java b/twill-examples/yarn/src/main/java/org/apache/twill/example/yarn/BundledJarExample.java
index 3cc88a1..4a5cbf4 100644
--- a/twill-examples/yarn/src/main/java/org/apache/twill/example/yarn/BundledJarExample.java
+++ b/twill-examples/yarn/src/main/java/org/apache/twill/example/yarn/BundledJarExample.java
@@ -17,10 +17,12 @@
  */
 package org.apache.twill.example.yarn;
 
-import com.google.common.base.Joiner;
 import com.google.common.base.Preconditions;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
-import org.apache.twill.api.*;
+import org.apache.twill.api.TwillApplication;
+import org.apache.twill.api.TwillController;
+import org.apache.twill.api.TwillRunnerService;
+import org.apache.twill.api.TwillSpecification;
 import org.apache.twill.api.logging.PrinterLogHandler;
 import org.apache.twill.common.Services;
 import org.apache.twill.ext.BundledJarRunnable;
@@ -32,9 +34,7 @@ import org.slf4j.LoggerFactory;
 import java.io.File;
 import java.io.PrintWriter;
 import java.net.URI;
-import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
 import java.util.concurrent.ExecutionException;
 
 /**
@@ -83,7 +83,6 @@ public class BundledJarExample {
       Arrays.copyOfRange(args, 1, args.length));
 
     File jarFile = new File(arguments.getJarFileName());
-    Preconditions.checkArgument(jarFile != null);
     Preconditions.checkState(jarFile.exists());
     Preconditions.checkState(jarFile.canRead());
 

http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/c1a0ca43/twill-examples/yarn/src/main/java/org/apache/twill/example/yarn/HelloWorld.java
----------------------------------------------------------------------
diff --git a/twill-examples/yarn/src/main/java/org/apache/twill/example/yarn/HelloWorld.java b/twill-examples/yarn/src/main/java/org/apache/twill/example/yarn/HelloWorld.java
index 1f44a38..ec62428 100644
--- a/twill-examples/yarn/src/main/java/org/apache/twill/example/yarn/HelloWorld.java
+++ b/twill-examples/yarn/src/main/java/org/apache/twill/example/yarn/HelloWorld.java
@@ -34,7 +34,7 @@ import java.util.concurrent.ExecutionException;
  * Hello World example using twill-yarn to run a TwillApplication over YARN.
  */
 public class HelloWorld {
-  public static Logger LOG = LoggerFactory.getLogger(HelloWorld.class);
+  public static final Logger LOG = LoggerFactory.getLogger(HelloWorld.class);
 
   /**
    * Hello World runnable that is provided to TwillRunnerService to be run.


[2/2] git commit: Not doing deploy at end.

Posted by ch...@apache.org.
Not doing deploy at end.

Project: http://git-wip-us.apache.org/repos/asf/incubator-twill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-twill/commit/177c5b73
Tree: http://git-wip-us.apache.org/repos/asf/incubator-twill/tree/177c5b73
Diff: http://git-wip-us.apache.org/repos/asf/incubator-twill/diff/177c5b73

Branch: refs/heads/master
Commit: 177c5b73c87afdbc3eb545182a1370b4fed09df5
Parents: c1a0ca4
Author: Terence Yim <te...@continuuity.com>
Authored: Tue Jul 29 10:55:31 2014 -0700
Committer: Terence Yim <te...@continuuity.com>
Committed: Tue Jul 29 10:55:31 2014 -0700

----------------------------------------------------------------------
 pom.xml | 8 --------
 1 file changed, 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/177c5b73/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 98f531e..dfb7394 100644
--- a/pom.xml
+++ b/pom.xml
@@ -354,14 +354,6 @@
                     </includes>
                 </configuration>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <version>2.8</version>
-                <configuration>
-                    <deployAtEnd>true</deployAtEnd>
-                </configuration>
-            </plugin>
         </plugins>
     </build>