avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scottca...@apache.org
Subject svn commit: r1066155 - in /avro/trunk: ./ lang/java/ lang/java/avro/ lang/java/avro/src/test/java/org/apache/avro/ lang/java/ipc/src/test/java/org/apache/avro/ lang/java/ipc/src/test/java/org/apache/avro/ipc/ lang/java/lib/ lang/java/tools/src/main/jav...
Date Tue, 01 Feb 2011 19:24:42 GMT
Author: scottcarey
Date: Tue Feb  1 19:24:40 2011
New Revision: 1066155

URL: http://svn.apache.org/viewvc?rev=1066155&view=rev
Log:
AVRO-716. Java: integrate AVRO-647 changes with top level build

Added:
    avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/DataFileInteropTest.java
    avro/trunk/pom.xml
Removed:
    avro/trunk/lang/java/build.xml
    avro/trunk/lang/java/ivy.xml
    avro/trunk/lang/java/ivysettings-ant-eclipse.xml
    avro/trunk/lang/java/ivysettings-jboss-repos.xml
    avro/trunk/lang/java/lib/
Modified:
    avro/trunk/   (props changed)
    avro/trunk/CHANGES.txt
    avro/trunk/build.sh
    avro/trunk/lang/java/avro/pom.xml
    avro/trunk/lang/java/avro/src/test/java/org/apache/avro/TestDataFile.java
    avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/TestRpcPluginOrdering.java
    avro/trunk/lang/java/pom.xml
    avro/trunk/lang/java/tools/src/main/java/org/apache/avro/tool/SpecificCompilerTool.java
    avro/trunk/lang/java/tools/src/main/java/org/apache/avro/tool/TetherTool.java
    avro/trunk/share/rat-excludes.txt
    avro/trunk/share/test/interop/bin/test_rpc_interop.sh

Propchange: avro/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Feb  1 19:24:40 2011
@@ -1,2 +1,3 @@
 build
 dist
+target

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1066155&r1=1066154&r2=1066155&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Tue Feb  1 19:24:40 2011
@@ -87,6 +87,9 @@ Avro 1.5.0 (unreleased)
 
   IMPROVEMENTS
 
+    AVRO-716. Java: integrate AVRO-647 changes with top level build
+    (scottcarey)
+
     AVRO-752. Java: Enhanced Performance Test Suite
     (scottcarey)
 

Modified: avro/trunk/build.sh
URL: http://svn.apache.org/viewvc/avro/trunk/build.sh?rev=1066155&r1=1066154&r2=1066155&view=diff
==============================================================================
--- avro/trunk/build.sh (original)
+++ avro/trunk/build.sh Tue Feb  1 19:24:40 2011
@@ -40,7 +40,7 @@ case "$target" in
 
     test)
 	# run lang-specific tests
-	(cd lang/java; ant test)
+        (cd lang/java; mvn test)
 	(cd lang/py; ant test)
 	(cd lang/c; ./build.sh test)
 	(cd lang/c++; ./build.sh test)
@@ -48,7 +48,8 @@ case "$target" in
 	(cd lang/php; ./build.sh test)
 
 	# create interop test data
-	(cd lang/java; ant interop-data-generate)
+        mkdir -p build/interop/data
+	(cd lang/java/avro; mvn exec:java -P interop-data-generate)
 	(cd lang/py; ant interop-data-generate)
 	(cd lang/c; ./build.sh interop-data-generate)
 	#(cd lang/c++; make interop-data-generate)
@@ -56,30 +57,41 @@ case "$target" in
 	(cd lang/php; ./build.sh interop-data-generate)
 
 	# run interop data tests
-	(cd lang/java; ant interop-data-test)
+	(cd lang/java; mvn test -P interop-data-test)
 	(cd lang/py; ant interop-data-test)
 	(cd lang/c; ./build.sh interop-data-test)
 	#(cd lang/c++; make interop-data-test)
 	(cd lang/ruby; rake interop)
 	(cd lang/php; ./build.sh test-interop)
 
-	# run interop rpc tests
-	/bin/bash share/test/interop/bin/test_rpc_interop.sh
+	# java needs to package the jars for the interop rpc tests
+        (cd lang/java; mvn package -DskipTests)
+	# run interop rpc test
+        /bin/bash share/test/interop/bin/test_rpc_interop.sh
 
 	;;
 
     dist)
+        # ensure version matches
+        mvn enforcer:enforce -Davro.version=$VERSION
+        
 	# build source tarball
-	mkdir -p build
-	rm -rf build/avro-src-$VERSION
-	svn export --force . build/avro-src-$VERSION
-	(cd lang/java; ant rat)
+        mkdir -p build
+
+        SRC_DIR=avro-src-$VERSION
+
+	rm -rf build/${SRC_DIR}
+	svn export --force . build/${SRC_DIR}
+	#runs RAT on artifacts
+        mvn -P rat antrun:run
 
 	mkdir -p dist
-        (cd build; tar czf ../dist/avro-src-$VERSION.tar.gz avro-src-$VERSION)
+        (cd build; tar czf ../dist/${SRC_DIR}.tar.gz ${SRC_DIR})
 
 	# build lang-specific artifacts
-	(cd lang/java; ant dist)
+        
+	(cd lang/java; mvn -P dist package -DskipTests -Davro.version=$VERSION javadoc:aggregate)

+        (mvn -P copy-artifacts antrun:run) 
 
 	(cd lang/py; ant dist)
 
@@ -123,7 +135,8 @@ case "$target" in
 	rm -rf build dist
 	(cd doc; ant clean)
 
-	(cd lang/java; ant clean)
+	(cd lang/java; mvn clean)
+        (mvn clean)         
 
 	(cd lang/py; ant clean)
 

Modified: avro/trunk/lang/java/avro/pom.xml
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/avro/pom.xml?rev=1066155&r1=1066154&r2=1066155&view=diff
==============================================================================
--- avro/trunk/lang/java/avro/pom.xml (original)
+++ avro/trunk/lang/java/avro/pom.xml Tue Feb  1 19:24:40 2011
@@ -64,5 +64,31 @@
     </plugins>
   </build>
 
+  <profiles>
+    <profile>
+      <id>interop-data-generate</id>
+      <build>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <groupId>org.codehaus.mojo</groupId>
+              <artifactId>exec-maven-plugin</artifactId>
+              <!-- default configuration is to generate random data for interop tests
-->
+              <configuration>
+                <mainClass>org.apache.avro.RandomData</mainClass>
+                <classpathScope>test</classpathScope>
+                <arguments>
+                  <argument>../../../share/test/schemas/interop.avsc</argument>
+                  <argument>../../../build/interop/data/java.avro</argument>
+                  <argument>100</argument>
+                </arguments>
+              </configuration>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+      </build>
+    </profile>
+  </profiles>
+
 </project>
 

Modified: avro/trunk/lang/java/avro/src/test/java/org/apache/avro/TestDataFile.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/avro/src/test/java/org/apache/avro/TestDataFile.java?rev=1066155&r1=1066154&r2=1066155&view=diff
==============================================================================
--- avro/trunk/lang/java/avro/src/test/java/org/apache/avro/TestDataFile.java (original)
+++ avro/trunk/lang/java/avro/src/test/java/org/apache/avro/TestDataFile.java Tue Feb  1 19:24:40
2011
@@ -33,7 +33,6 @@ import org.apache.avro.file.DataFileWrit
 import org.apache.avro.generic.GenericDatumReader;
 import org.apache.avro.generic.GenericDatumWriter;
 import org.apache.avro.io.DatumReader;
-import org.apache.avro.specific.SpecificDatumReader;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -69,8 +68,6 @@ public class TestDataFile {
     !"false".equals(System.getProperty("test.validate", "true"));
   private static final File DIR
     = new File(System.getProperty("test.dir", "/tmp"));
-  private static final File DATAFILE_DIR
-    = new File(System.getProperty("test.dir", "/tmp"));
   private static final long SEED = System.currentTimeMillis();
   private static final String SCHEMA_JSON =
     "{\"type\": \"record\", \"name\": \"Test\", \"fields\": ["
@@ -220,9 +217,9 @@ public class TestDataFile {
              new GenericDatumReader<Object>());
   }
 
-  protected void readFile(File f, DatumReader<Object> datumReader)
+  static void readFile(File f, DatumReader<? extends Object> datumReader)
     throws IOException {
-    FileReader<Object> reader = DataFileReader.openReader(f, datumReader);
+    FileReader<? extends Object> reader = DataFileReader.openReader(f, datumReader);
     for (Object datum : reader) {
       assertNotNull(datum);
     }
@@ -233,42 +230,10 @@ public class TestDataFile {
     Schema projection = null;
     if (args.length > 1)
       projection = Schema.parse(new File(args[1]));
-    TestDataFile tester = new TestDataFile(null);
-    tester.readFile(input, new GenericDatumReader<Object>(null, projection));
+    TestDataFile.readFile(input, new GenericDatumReader<Object>(null, projection));
     long start = System.currentTimeMillis();
     for (int i = 0; i < 4; i++)
-      tester.readFile(input, new GenericDatumReader<Object>(null, projection));
+      TestDataFile.readFile(input, new GenericDatumReader<Object>(null, projection));
     System.out.println("Time: "+(System.currentTimeMillis()-start));
   }
-
-  public static class InteropTest {
-
-  @Test
-    public void testGeneratedGeneric() throws IOException {
-      System.out.println("Reading with generic:");
-      readFiles(new GenericDatumReader<Object>());
-    }
-
-  @Test
-    public void testGeneratedSpecific() throws IOException {
-      System.out.println("Reading with specific:");
-      readFiles(new SpecificDatumReader<Object>());
-    }
-
-  // Can't use same Interop.java as specific for reflect, since its stringField
-  // has type Utf8, which reflect would try to assign a String to.  We could
-  // fix this by defining a reflect-specific version of Interop.java, but we'd
-  // need to put it on a different classpath than the specific one.
-
-  // @Test
-  //   public void testGeneratedReflect() throws IOException {
-  //     readFiles(new ReflectDatumReader(Interop.class));
-  //   }
-
-    private void readFiles(DatumReader<Object> datumReader) throws IOException {
-      TestDataFile test = new TestDataFile(null);
-      for (File f : DATAFILE_DIR.listFiles())
-        test.readFile(f, datumReader);
-    }
-  }
 }

Added: avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/DataFileInteropTest.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/DataFileInteropTest.java?rev=1066155&view=auto
==============================================================================
--- avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/DataFileInteropTest.java (added)
+++ avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/DataFileInteropTest.java Tue Feb
 1 19:24:40 2011
@@ -0,0 +1,103 @@
+/**
+ * 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 org.apache.avro;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.avro.file.DataFileReader;
+import org.apache.avro.file.FileReader;
+import org.apache.avro.generic.GenericDatumReader;
+import org.apache.avro.io.DatumReader;
+import org.apache.avro.reflect.ReflectDatumReader;
+import org.apache.avro.specific.SpecificDatumReader;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class DataFileInteropTest {
+
+  private static final File DATAFILE_DIR = 
+    new File(System.getProperty("test.dir", "/tmp"));
+
+  @BeforeClass
+  public static void printDir() {
+    System.out.println("Reading data files from directory: "
+        + DATAFILE_DIR.getAbsolutePath());
+  }
+
+  @Test
+  public void testGeneratedGeneric() throws IOException {
+    System.out.println("Reading with generic:");
+    DatumReaderProvider<Object> provider = new DatumReaderProvider<Object>()
{
+      @Override public DatumReader<Object> get() { 
+        return new GenericDatumReader<Object>(); 
+        }
+      };
+    readFiles(provider);
+  }
+
+  @Test
+  public void testGeneratedSpecific() throws IOException {
+    System.out.println("Reading with specific:");
+    DatumReaderProvider<Interop> provider = new DatumReaderProvider<Interop>()
{
+      @Override public DatumReader<Interop> get() { 
+        return new SpecificDatumReader<Interop>(); 
+        }
+      };
+    readFiles(provider);
+  }
+
+  // Can't use same Interop.java as specific for reflect.
+  // This used to be the case because one used Utf8 and the other Sring, but 
+  // we use CharSequence now.
+  // The current incompatibility is now that one uses byte[] and the other ByteBuffer
+
+  // We could
+  // fix this by defining a reflect-specific version of Interop.java, but we'd
+  // need to put it on a different classpath than the specific one.
+  // I think changing Specific to generate more flexible code would help too --
+  // it could convert ByteBuffer to byte[] or vice/versa.
+  // Additionally, some complication arises because of IndexedRecord's simplicity
+
+//   @Test
+//   public void testGeneratedReflect() throws IOException {
+//     DatumReaderProvider<Interop> provider = new DatumReaderProvider<Interop>()
{
+//       @Override public DatumReader<Interop> get() { 
+//         return new ReflectDatumReader<Interop>(Interop.class); 
+//         }
+//       };
+//     readFiles(provider);
+//   }
+
+  private  <T extends Object> void readFiles(DatumReaderProvider<T> provider)
throws IOException {
+    for (File f : DATAFILE_DIR.listFiles()) {
+      System.out.println("Reading: " + f.getName());
+      FileReader<? extends Object> reader = DataFileReader.openReader(f,
+          provider.get());
+      for (Object datum : reader) {
+        Assert.assertNotNull(datum);
+      }
+    }
+  }
+  
+  interface DatumReaderProvider<T extends Object> {
+    public DatumReader<T> get();
+  }
+
+}

Modified: avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/TestRpcPluginOrdering.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/TestRpcPluginOrdering.java?rev=1066155&r1=1066154&r2=1066155&view=diff
==============================================================================
--- avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/TestRpcPluginOrdering.java
(original)
+++ avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/TestRpcPluginOrdering.java
Tue Feb  1 19:24:40 2011
@@ -1,3 +1,21 @@
+/**
+ * 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 org.apache.avro.ipc;
 
 import static org.junit.Assert.assertEquals;

Modified: avro/trunk/lang/java/pom.xml
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/pom.xml?rev=1066155&r1=1066154&r2=1066155&view=diff
==============================================================================
--- avro/trunk/lang/java/pom.xml (original)
+++ avro/trunk/lang/java/pom.xml Tue Feb  1 19:24:40 2011
@@ -30,14 +30,21 @@
   <version>1.5.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
-  <name>Apache Avro Parent</name>
+  <name>Apache Avro Java</name>
   <url>http://avro.apache.org</url>
-  <description>Avro parent pom</description>
+  <description>Avro parent Java project</description>
 
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <junit-version>4.8.1</junit-version>
     <paranamer-version>2.3</paranamer-version>
     <slf4j-version>1.5.11</slf4j-version>
+    <jackson-version>1.4.2</jackson-version>
+    <hadoop-version>0.20.2</hadoop-version>
+    <velocity-version>1.6.4</velocity-version>
+    <jetty-version>6.1.22</jetty-version>
+    <netty-version>3.2.1.Final</netty-version> 
+    <jopt-simple-version>3.2</jopt-simple-version>
   </properties>
 
   <issueManagement>
@@ -64,6 +71,14 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-jar-plugin</artifactId>
           <version>2.3.1</version>
+          <configuration>
+            <archive>
+              <manifest>
+                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+              </manifest>
+            </archive>
+          </configuration>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
@@ -118,6 +133,52 @@
             </execution>
           </executions>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-javadoc-plugin</artifactId>
+          <version>2.7</version>
+          <configuration>
+            <links>
+              <link>http://jackson.codehaus.org/${jackson-version}/javadoc/</link>
+              <link>http://java.sun.com/products/servlet/2.3/javadoc/</link>
+              <link>http://hadoop.apache.org/common/docs/r${hadoop-version}/api/</link>
+            </links>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-source-plugin</artifactId>
+          <version>2.1.2</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-enforcer-plugin</artifactId>
+          <version>1.0</version>
+          <configuration>
+            <rules>
+              <requireProperty>
+               <property>avro.version</property>
+               <message>*****!!!!!!   Must have property avro.version set to enforce
version.   !!!!!!*****</message>
+              </requireProperty>
+              <requireProperty>
+                <property>project.version</property>
+                <regex>${avro.version}</regex>
+                <regexMessage>*****!!!!!   Version of project must be ${avro.version}
  !!!!!*****</regexMessage>
+              </requireProperty>
+            </rules>
+            <fail>true</fail>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>javacc-maven-plugin</artifactId>
+          <version>2.6</version>
+        </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>exec-maven-plugin</artifactId>
+          <version>1.1</version>
+        </plugin>
       </plugins>
     </pluginManagement>
     <plugins>
@@ -131,6 +192,92 @@
   <reporting>
   </reporting>
 
+  <profiles>
+    <profile>
+      <id>dist</id>
+      <!-- Profile for generating all maven artifacts and documentation. -->
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-javadoc-plugin</artifactId>
+            <executions>
+              <execution>
+                <!-- build javadoc jars per jar for publishing to maven -->
+                <id>module-javadocs</id>
+                <phase>package</phase>
+                <goals>
+                  <goal>jar</goal>
+                </goals>
+              </execution>
+              <execution>
+                <!-- build aggregate javadoc in parent only -->
+                <id>default-cli</id>
+                <goals>
+                  <goal>aggregate</goal>
+                </goals>
+                <inherited>false</inherited>
+                <configuration>
+                  <overview>avro/src/main/java/overview.html</overview>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-source-plugin</artifactId>
+            <executions>
+              <execution>
+                <!-- builds source jars and attaches them to the project for publishing
-->
+                <id>avro-java-sources</id>
+                <phase>package</phase>
+                <goals>
+                  <goal>jar-no-fork</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-enforcer-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>package</phase>
+                <goals>
+                 <goal>enforce</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>interop-data-test</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <includes>
+                <include>**/DataFileInteropTest*</include>
+              </includes>
+              <excludes>
+              </excludes>
+              <enableAssertions>false</enableAssertions>
+              <forkMode>once</forkMode>
+              <redirectTestOutputToFile>false</redirectTestOutputToFile>
+              <systemPropertyVariables>
+                <test.dir>../../../build/interop/data/</test.dir>
+              </systemPropertyVariables>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+  
   <!-- dependencyManagement can be used to define dependency versions, scopes, and 
     excludes to be shared by child projects. Child projects will not inherit these dependencies,

     rather they inherit the properties of the below dependencies (such as version) if 
@@ -140,7 +287,7 @@
       <dependency>
         <groupId>org.codehaus.jackson</groupId>
         <artifactId>jackson-mapper-asl</artifactId>
-        <version>1.4.2</version>
+        <version>${jackson-version}</version>
         <scope>compile</scope>
       </dependency>
       <dependency>
@@ -152,31 +299,31 @@
       <dependency>
         <groupId>org.apache.velocity</groupId>
         <artifactId>velocity</artifactId>
-        <version>1.6.4</version>
+        <version>${velocity-version}</version>
         <scope>compile</scope>
       </dependency>
       <dependency>
         <groupId>org.mortbay.jetty</groupId>
         <artifactId>jetty</artifactId>
-        <version>6.1.22</version>
+        <version>${jetty-version}</version>
         <scope>compile</scope>
       </dependency>
       <dependency>
         <groupId>org.jboss.netty</groupId>
         <artifactId>netty</artifactId>
-        <version>3.2.1.Final</version>
+        <version>${netty-version}</version>
         <scope>compile</scope>
       </dependency>
       <dependency>
         <groupId>net.sf.jopt-simple</groupId>
         <artifactId>jopt-simple</artifactId>
-        <version>3.2</version>
+        <version>${jopt-simple-version}</version>
         <scope>compile</scope>
       </dependency>
       <dependency>
         <groupId>org.apache.hadoop</groupId>
         <artifactId>hadoop-core</artifactId>
-        <version>0.20.2</version>
+        <version>${hadoop-version}</version>
         <scope>compile</scope>
       </dependency>
     </dependencies>
@@ -188,7 +335,7 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.8.1</version>
+      <version>${junit-version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -205,14 +352,32 @@
     </dependency>
   </dependencies>
 
-  <!-- extra repositories besides the default Maven central and any configured by 
-    the local user's environment. -->
   <repositories>
     <repository>
+      <id>central</id>
+      <name>Maven Repository Switchboard</name>
+      <url>http://repo1.maven.org/maven2</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+    <repository>
+      <id>apache.snapshots</id>
+      <name>Apache Snapshot Repository</name>
+      <url>http://repository.apache.org/snapshots</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+    </repository>
+    <!-- JBoss repo needed for netty -->
+    <repository>
       <id>jboss-public-repository</id>
       <name>JBoss Public Maven Repository</name>
       <url>http://repository.jboss.org/nexus/content/groups/public/</url>
       <layout>default</layout>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
     </repository>
   </repositories>
 
@@ -224,4 +389,5 @@
     <module>tools</module>
     <module>mapred</module>
   </modules>
+
 </project>

Modified: avro/trunk/lang/java/tools/src/main/java/org/apache/avro/tool/SpecificCompilerTool.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/tools/src/main/java/org/apache/avro/tool/SpecificCompilerTool.java?rev=1066155&r1=1066154&r2=1066155&view=diff
==============================================================================
--- avro/trunk/lang/java/tools/src/main/java/org/apache/avro/tool/SpecificCompilerTool.java
(original)
+++ avro/trunk/lang/java/tools/src/main/java/org/apache/avro/tool/SpecificCompilerTool.java
Tue Feb  1 19:24:40 2011
@@ -1,3 +1,20 @@
+/**
+ * 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 org.apache.avro.tool;
 
 import java.io.File;

Modified: avro/trunk/lang/java/tools/src/main/java/org/apache/avro/tool/TetherTool.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/tools/src/main/java/org/apache/avro/tool/TetherTool.java?rev=1066155&r1=1066154&r2=1066155&view=diff
==============================================================================
--- avro/trunk/lang/java/tools/src/main/java/org/apache/avro/tool/TetherTool.java (original)
+++ avro/trunk/lang/java/tools/src/main/java/org/apache/avro/tool/TetherTool.java Tue Feb
 1 19:24:40 2011
@@ -1,3 +1,20 @@
+/**
+ * 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 org.apache.avro.tool;
 
 import java.io.File;

Added: avro/trunk/pom.xml
URL: http://svn.apache.org/viewvc/avro/trunk/pom.xml?rev=1066155&view=auto
==============================================================================
--- avro/trunk/pom.xml (added)
+++ avro/trunk/pom.xml Tue Feb  1 19:24:40 2011
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  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>
+
+  <parent>
+    <groupId>org.apache</groupId>
+    <artifactId>apache</artifactId>
+    <version>8</version>
+  </parent>
+
+  <groupId>org.apache.avro</groupId>
+  <artifactId>avro-toplevel</artifactId>
+  <version>1.5.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <name>Apache Avro Toplevel</name>
+  <url>http://avro.apache.org</url>
+  <description>Avro toplevel pom</description>
+
+  <!-- This project is used for top level build tasks and artifact copying.  
+       The RAT task is run to validate licenses.  The Enforcer plugin is used
+       to validate that java projects are the correct version.
+       Java artifacts are copied to the final build destination with a custom profile.
+       -->
+  <properties>
+    <avro.distDir>dist</avro.distDir>
+    <avro.docDir>build/avro-doc-${project.version}/api</avro.docDir>    
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <version>1.0</version>
+        <configuration>
+          <rules>
+            <requireProperty>
+             <property>avro.version</property>
+             <message>*****!!!!!!   Must have property avro.version set to enforce
version.   !!!!!!*****</message>
+            </requireProperty>
+            <requireProperty>
+              <property>project.version</property>
+              <regex>${avro.version}</regex>
+              <regexMessage>*****!!!!!   Version of project must be ${avro.version}
  !!!!!*****</regexMessage>
+            </requireProperty>
+          </rules>
+          <fail>true</fail>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <profiles>
+    <profile>
+      <id>rat</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>1.6</version>
+            <configuration>
+              <target name="rat">
+                <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
+                    reportFile="build/rat-report.log">
+                  <fileset dir="build/avro-src-${project.version}/"
+                           excludesfile="share/rat-excludes.txt"/>
+                </rat:report>
+                <condition property="rat.passed">
+                  <isfileselected file="build/rat-report.log">
+                    <containsregexp expression="^0 Unknown Licenses"/>
+                  </isfileselected>
+                </condition>
+                <fail unless="rat.passed">Unknown licenses: See build/rat-report.log.</fail>
+              </target>
+            </configuration>
+            <dependencies>
+              <dependency>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-tasks</artifactId>
+                <version>0.7</version>
+              </dependency>
+            </dependencies>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>copy-artifacts</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>1.6</version>
+            <configuration>
+              <target name="copy-java-artifacts">
+                <mkdir dir="${avro.distDir}/java"/>
+                <copy todir="${avro.distDir}/java" verbose="true">
+                 <flattenmapper/>
+                 <fileset dir="lang/java/"
+                           includes="*/target/*${project.version}*.jar"
+                           excludes="**/original-*.jar **/*tests.jar"/>
+                </copy>
+                
+                <mkdir dir="${avro.docDir}"/>
+                <copy todir="${avro.docDir}/java">
+                  <fileset dir="lang/java/target/site/apidocs"/>
+                </copy>
+              </target>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+</project>

Modified: avro/trunk/share/rat-excludes.txt
URL: http://svn.apache.org/viewvc/avro/trunk/share/rat-excludes.txt?rev=1066155&r1=1066154&r2=1066155&view=diff
==============================================================================
--- avro/trunk/share/rat-excludes.txt (original)
+++ avro/trunk/share/rat-excludes.txt Tue Feb  1 19:24:40 2011
@@ -31,5 +31,6 @@ lang/c/jansson/**
 lang/c/src/queue.h
 lang/c/src/st.h
 lang/c/src/st.c
-lang/java/src/java/org/apache/avro/ipc/stats/static/*.js
-lang/java/src/java/org/apache/avro/ipc/stats/static/*.css
+lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/*.js
+lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/*.css
+share/test/data/test.avro12

Modified: avro/trunk/share/test/interop/bin/test_rpc_interop.sh
URL: http://svn.apache.org/viewvc/avro/trunk/share/test/interop/bin/test_rpc_interop.sh?rev=1066155&r1=1066154&r2=1066155&view=diff
==============================================================================
--- avro/trunk/share/test/interop/bin/test_rpc_interop.sh (original)
+++ avro/trunk/share/test/interop/bin/test_rpc_interop.sh Tue Feb  1 19:24:40 2011
@@ -23,8 +23,8 @@ VERSION=`cat share/VERSION.txt`
 
 #set -x						  # echo commands
 
-java_client="java -jar lang/java/build/avro-tools-$VERSION.jar rpcsend"
-java_server="java -jar lang/java/build/avro-tools-$VERSION.jar rpcreceive"
+java_client="java -jar lang/java/tools/target/avro-tools-$VERSION.jar rpcsend"
+java_server="java -jar lang/java/tools/target/avro-tools-$VERSION.jar rpcreceive"
 
 py_client="python lang/py/build/src/avro/tool.py rpcsend"
 py_server="python lang/py/build/src/avro/tool.py rpcreceive"



Mime
View raw message