Author: thiru
Date: Fri Dec 4 14:35:24 2009
New Revision: 887210
URL: http://svn.apache.org/viewvc?rev=887210&view=rev
Log:
AVRO-184. Better eclipse configuration support
Added:
hadoop/avro/trunk/ivysettings-ant-eclipse.xml
Modified:
hadoop/avro/trunk/CHANGES.txt
hadoop/avro/trunk/build.xml
hadoop/avro/trunk/ivy.xml
Modified: hadoop/avro/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=887210&r1=887209&r2=887210&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Fri Dec 4 14:35:24 2009
@@ -177,6 +177,8 @@
AVRO-238. Fix so that slf4j-simple is only required by tests. (cutting)
+ AVRO-184. Better eclipse configuration support. (thiru)
+
Avro 1.2.0 (14 October 2009)
INCOMPATIBLE CHANGES
Modified: hadoop/avro/trunk/build.xml
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/build.xml?rev=887210&r1=887209&r2=887210&view=diff
==============================================================================
--- hadoop/avro/trunk/build.xml (original)
+++ hadoop/avro/trunk/build.xml Fri Dec 4 14:35:24 2009
@@ -1,4 +1,3 @@
-<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
@@ -97,6 +96,12 @@
<property name="build.dir.eclipse-test-classes"
value="${build.dir.eclipse}/classes-test"/>
<!-- the normal classpath -->
+ <path id="libs">
+ <fileset dir="${ivy.lib}">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+
<path id="java.classpath">
<pathelement location="${build.classes}"/>
<fileset dir="${lib.dir}">
@@ -106,7 +111,11 @@
<fileset dir="${ant.home}/lib">
<include name="ant.jar" />
</fileset>
- <fileset dir="${ivy.lib}">
+ <path refid="libs" />
+ </path>
+
+ <path id="test.libs">
+ <fileset dir="${ivy.test.lib}">
<include name="**/*.jar" />
</fileset>
</path>
@@ -114,10 +123,8 @@
<path id="test.java.classpath">
<pathelement location="${test.java.classes}" />
<pathelement location="${test.java.generated.classes}" />
- <fileset dir="${ivy.test.lib}">
- <include name="**/*.jar" />
- </fileset>
<path refid="java.classpath"/>
+ <path refid="test.libs"/>
</path>
<target name="init">
@@ -753,33 +760,43 @@
<!-- End C++ Targets -->
<!-- Begin Eclipse targets -->
- <condition property="ant-eclipse.jar.exists">
- <available file="${lib.dir}/ant-eclipse-1.0-jvm1.2.jar"/>
- </condition>
-
- <target name="ant-eclipse-download" unless="ant-eclipse.jar.exists"
- description="Downloads the ant-eclipse binary.">
- <get
src="http://downloads.sourceforge.net/project/ant-eclipse/ant-eclipse/1.0/ant-eclipse-1.0.bin.tar.bz2"
- dest="${build.dir}/ant-eclipse-1.0.bin.tar.bz2" usetimestamp="false"
/>
+ <property name="ant-eclipse.dir" value="${build.dir}/ant-eclipse"/>
+ <property name="ant-eclipse.lib.dir" value="${ant-eclipse.dir}/lib"/>
+
+ <available file="${ant-eclipse.lib.dir}/ant-eclipse-1.0-jvm1.2.jar"
+ property="ant-eclipse.jar.exists"/>
+
+ <path id="ant-eclipse.classpath">
+ <fileset dir="${ant-eclipse.lib.dir}">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+
+ <target name="ant-eclipse-retrieve" unless="ant-eclipse.jar.exists"
+ depends="ivy-init"
+ description="Retrieves the ant-eclipse binary.">
+ <mkdir dir="${ant-eclipse.lib.dir}"/>
+ <ivy:settings id="ivy.ant-eclipse.settings"
+ file="${basedir}/ivysettings-ant-eclipse.xml" />
+ <ivy:retrieve conf="eclipse"
+ settingsRef="ivy.ant-eclipse.settings"
+ pattern="${build.dir}/[module]-[revision].[ext]"/>
- <untar src="${build.dir}/ant-eclipse-1.0.bin.tar.bz2"
- dest="${build.dir}" compression="bzip2">
+ <untar src="${build.dir}/ant-eclipse-1.0.bz2"
+ dest="${ant-eclipse.dir}" compression="bzip2">
<patternset>
<include name="lib/ant-eclipse-1.0-jvm1.2.jar"/>
</patternset>
</untar>
- <delete file="${src.dir}/java/ant-eclipse-1.0.bin.tar.bz2" />
+ <delete file="${build.dir}/ant-eclipse-1.0.bz2" />
</target>
<target name="eclipse"
- depends="compile-test-java,ant-eclipse-download"
+ depends="compile-test-java,ant-eclipse-retrieve"
description="Create eclipse project files">
- <ivy:resolve useOrigin="true" conf="test"/>
- <ivy:cachepath pathid="default.path.id" conf="default" />
- <ivy:cachepath pathid="junit.path.id" conf="test" transitive="false"/>
<taskdef name="eclipse"
classname="prantl.ant.eclipse.EclipseTask"
- classpathref="java.classpath" />
+ classpathref="ant-eclipse.classpath" />
<eclipse updatealways="true">
<project name="${ant.project.name}" />
<classpath>
@@ -795,8 +812,8 @@
<!-- Tests require that the generated code has paranamer applied to it,
so we use the ant build for that. -->
<library path="${test.java.generated.classes}"
source="${test.java.generated.dir}"/>
- <library pathref="default.path.id" exported="true" />
- <library pathref="junit.path.id" exported="false" />
+ <library pathref="libs" exported="true" />
+ <library pathref="test.libs" exported="false" />
</classpath>
</eclipse>
</target>
@@ -806,6 +823,7 @@
<delete file=".eclipse" />
<delete file=".project" />
<delete dir=".settings" />
+ <delete dir="${ant-eclipse.lib.dir}" />
<delete dir="${build.dir.eclipse}" />
</target>
<!-- End Eclipse targets -->
Modified: hadoop/avro/trunk/ivy.xml
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/ivy.xml?rev=887210&r1=887209&r2=887210&view=diff
==============================================================================
--- hadoop/avro/trunk/ivy.xml (original)
+++ hadoop/avro/trunk/ivy.xml Fri Dec 4 14:35:24 2009
@@ -19,7 +19,7 @@
xmlns:e="http://ant.apache.org/ivy/extra">
<info organisation="org.apache.hadoop"
- module="${name}" revision="${version}">
+ module="${name}" revision="${version}">
<license name="Apache 2.0"/>
<ivyauthor name="Apache Hadoop" url="http://hadoop.apache.org"/>
<description>Avro</description>
@@ -28,25 +28,30 @@
<configurations defaultconfmapping="default">
<conf name="default"/>
<conf name="test"/>
+ <conf name="eclipse"/>
</configurations>
<dependencies>
<dependency org="org.codehaus.jackson" name="jackson-mapper-asl"
- rev="1.3.0"/>
+ rev="1.3.0"/>
<dependency org="org.slf4j" name="slf4j-api" rev="1.5.8"/>
<dependency org="org.slf4j" name="slf4j-simple" rev="1.5.8"
- conf="test->default"/>
+ conf="test->default"/>
<dependency org="com.thoughtworks.paranamer" name="paranamer"
- rev="2.1"/>
+ rev="2.1"/>
<dependency org="com.thoughtworks.paranamer" name="paranamer-ant"
- rev="2.1"/>
+ rev="2.1"/>
<dependency org="org.mortbay.jetty" name="jetty"
- rev="6.1.21"/>
+ rev="6.1.21"/>
<dependency org="junit" name="junit" rev="4.7" conf="test->default"/>
<dependency org="checkstyle" name="checkstyle" rev="5.0"
- conf="test->default"/>
+ conf="test->default"/>
<dependency org="org.apache.rat" name="apache-rat" rev="0.6"
- conf="test->default"/>
+ conf="test->default"/>
+ <dependency org="ant-eclipse" name="ant-eclipse" rev="1.0"
+ conf="eclipse->default">
+ <artifact name="ant-eclipse" type="bz2" />
+ </dependency>
</dependencies>
</ivy-module>
Added: hadoop/avro/trunk/ivysettings-ant-eclipse.xml
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/ivysettings-ant-eclipse.xml?rev=887210&view=auto
==============================================================================
--- hadoop/avro/trunk/ivysettings-ant-eclipse.xml (added)
+++ hadoop/avro/trunk/ivysettings-ant-eclipse.xml Fri Dec 4 14:35:24 2009
@@ -0,0 +1,26 @@
+<!--
+ 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.
+-->
+<ivysettings>
+ <settings defaultResolver="ant-eclipse"/>
+ <resolvers>
+ <url name="ant-eclipse">
+ <artifact
pattern="http://downloads.sourceforge.net/project/[module]/[module]/[revision]/[module]-[revision].bin.tar.[ext]"
/>
+ </url>
+ </resolvers>
+</ivysettings>