[DebianGIS-dev] [SCM] osmosis branch, master, updated. debian/0.31.2-2-8-gc058ad1
David Paleino
dapal at debian.org
Wed Mar 31 21:57:47 UTC 2010
The following commit has been merged in the master branch:
commit d837f3344b99bded4e6d8efff8b47524fc8359e3
Merge: c18da2007b8554089e76ee9b7adecb35e79a1b8f 860bcf1235102ec9e2fd7521a9e9242461958554
Author: David Paleino <dapal at debian.org>
Date: Wed Mar 31 23:50:35 2010 +0200
Merge commit 'upstream/0.34+ds1'
Conflicts:
bin/osmosis
build.xml
diff --combined bin/osmosis
index 8b4e218,3efc2f7..f01f218
mode 100755,100644..100644
--- a/bin/osmosis
+++ b/bin/osmosis
@@@ -18,31 -18,50 +18,31 @@@ if [ -z "$JAVACMD" ] ; the
JAVACMD=java
fi
-## resolve links - $0 may be a link to application
-PRG="$0"
-
-# if started without absolute path, but from PATH environment
-if [ ! -s "$PRG" ] ; then
- PRG=`which $PRG`
-fi
-
-# need this for relative symlinks
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG="`dirname "$PRG"`/$link"
- fi
-done
-
if [ "x$1x" = "xx" ] || echo "$@" | grep -q -e '--help' ; then
cat <<EOF
osmosis
Example Usage
- Import a planet file into a local MySQL database.
+ Import a planet file into a local PostgreSQL database.
- osmosis --read-xml file=~/osm/planbet/planet.osm --write-mysql host="x" database="x" user="x" password="x"
+ osmosis --read-xml file=~/osm/planbet/planet.osm --write-apidb host="x" database="x" user="x" password="x"
- Export a planet file from a local MySQL database.
+ Export a planet file from a local PostgreSQL database.
- osmosis --read-mysql host="x" database="x" user="x" password="x" --write-xml file="planet.osm"
+ osmosis --read-apidb host="x" database="x" user="x" password="x" --write-xml file="planet.osm"
Derive a change set between two planet files.
- osmosis --read-xml file="planet1.osm" --read-xml file="planet2.osm" --derive-change --write-xml-change file="planetdiff-1-2.osc"
+ osmosis --read-xml file="planet2.osm" --read-xml file="planet1.osm" --derive-change --write-xml-change file="planetdiff-1-2.osc"
Derive a change set between a planet file and a database.
- osmosis --read-xml file="planet1.osm" --read-mysql host="x" database="x" user="x" password="x" --derive-change --write-xml-change file="planetdiff-1-2.osc"
+ osmosis --read-mysql host="x" database="x" user="x" password="x" --read-xml file="planet1.osm" --derive-change --write-xml-change file="planetdiff-1-2.osc"
Apply a change set to a planet file.
- osmosis --read-xml file="planet1.osm" --read-xml-change file="planetdiff-1-2.osc" --apply-change --write-xml file="planet2.osm"
+ osmosis --read-xml-change file="planetdiff-1-2.osc" --read-xml file="planet1.osm" --apply-change --write-xml file="planet2.osm"
Sort the contents of a planet file.
@@@ -53,7 -72,6 +53,6 @@@ The above examples make use of the defa
osmosis --read-xml file="planetin.osm" --write-xml file="planetout.osm"
osmosis --read-xml file="planetin.osm" outPipe.0="mypipe" --write-xml file="planetout.osm" inPipe.0="mypipe"
- [edit] Detailed Usage
Full usage details are available at: http://www.bretth.com/wiki/Wiki.jsp?page=OpenStreetMap
@@@ -61,12 -79,16 +60,16 @@@ EO
exit 1
fi
- MYAPP_HOME="/usr/share/osmosis"
- LIBRARIES_HOME="/usr/share/java"
+ # make it fully qualified
+ saveddir=`pwd`
+ MYAPP_HOME=`dirname "$PRG"`/..
+ MYAPP_HOME=`cd "$MYAPP_HOME" && pwd`
+ cd "$saveddir"
- MYAPP_CLASSPATH=$MYAPP_HOME/osmosis.jar:$LIBRARIES_HOME/mysql-connector-java.jar:$LIBRARIES_HOME/postgresql.jar:$LIBRARIES_HOME/postgis.jar:$LIBRARIES_HOME/jpf.jar:$LIBRARIES_HOME/ant.jar
+ # Build up the classpath of required jar files via classworlds launcher.
+ MYAPP_CLASSPATH=$MYAPP_HOME/lib/default/plexus-classworlds-*.jar
- MAINCLASS=org.openstreetmap.osmosis.core.Osmosis
- EXEC="$JAVACMD $JAVACMD_OPTIONS -cp $MYAPP_CLASSPATH $MAINCLASS $OSMOSIS_OPTIONS $@"
+ MAINCLASS=org.codehaus.classworlds.Launcher
+ EXEC="$JAVACMD $JAVACMD_OPTIONS -cp $MYAPP_CLASSPATH -Dapp.home=$MYAPP_HOME -Dclassworlds.conf=$MYAPP_HOME/config/plexus.conf $MAINCLASS $OSMOSIS_OPTIONS $@"
exec $EXEC
diff --combined build.xml
index 65793d5,2cae3b8..46b0091
--- a/build.xml
+++ b/build.xml
@@@ -6,29 -6,56 +6,43 @@@
Builds the Osmosis data replication library.
</description>
- <!-- set global properties for this build -->
+ <!-- Global properties for the build. -->
<property name="project.name" value="osmosis"/>
- <property name="project.version" value="0.31.2"/>
+ <property name="project.version.suffix" value=""/> <!-- Can be overriden to include extra info such as svn revision number. -->
+ <property name="project.version" value="0.34"/>
+
+ <import file="build_support/build-ivy.xml"/>
+
+ <!-- Define classpaths for each of the lib directories. -->
+ <path id="classpath.compile">
+ <fileset dir="lib/compile" includes="**/*.jar"/>
+ </path>
+ <path id="classpath.default">
+ <fileset dir="lib/default" includes="**/*.jar"/>
+ </path>
+ <path id="classpath.test">
+ <fileset dir="lib/test" includes="**/*.jar"/>
+ </path>
<target name="init" description="Perform initialisation required by all other build steps.">
<!-- Create the time stamp -->
<tstamp/>
</target>
- <target name="build_src" depends="init, conditional-resolve" description="Compile source code into class files.">
- <!-- Update the version number in the main class. -->
- <replaceregexp
- byline="true"
- file="src/org/openstreetmap/osmosis/core/OsmosisConstants.java"
- match="String VERSION = "(.*)""
- replace="String VERSION = "${project.version}""
- />
- <replaceregexp
- byline="true"
- file="src/org/openstreetmap/osmosis/core/plugin/plugin.xml"
- match="id="org.openstreetmap.osmosis.core.plugin.Core" version="(.*)""
- replace="id="org.openstreetmap.osmosis.core.plugin.Core" version="${project.version}""
- />
+ <target name="build_src" description="Compile source code into class files.">
<!-- Create the build directory structure. -->
<mkdir dir="build"/>
<mkdir dir="build/src"/>
<!-- Compile the java code from src into build/src -->
- <javac srcdir="src" destdir="build/src" debug="on" debuglevel="lines,vars,source" classpathref="classpath.compile"/>
- <!-- Copy all resource files from src into build/src -->
- <copy todir="build/src">
- <fileset dir="src">
- <exclude name="**/*.java"/>
- </fileset>
- </copy>
- <!-- Put a version number file in the build/src directory. -->
- <touch file="build/src/version-${project.version}"/>
+ <javac srcdir="src" destdir="build/src" debug="on" debuglevel="lines,vars,source"/>
+ <!-- Copy all resource files from src into build/src -->
+ <copy todir="build/src">
+ <fileset dir="src">
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+ <!-- Put a version number file in the build/src directory. -->
+ <touch file="build/src/version-${project.version}"/>
</target>
<target name="build_test" depends="build_src" description="Compile test source code into class files.">
@@@ -77,11 -104,11 +91,11 @@@
manifest="build/binary/jar.txt"/>
<!-- Copy the jar to the root directory where it can be run. -->
- <copy todir=".">
+ <!--<copy todir=".">
<fileset dir="build/binary">
<include name="**/*.jar"/>
</fileset>
- </copy>
+ </copy>-->
</target>
<!-- Produces javadoc output from the source code. -->
@@@ -95,18 -122,21 +109,21 @@@
<zip destfile="dist/${project.name}-${project.version}.zip">
<zipfileset prefix="${project.name}-${project.version}" dir=".">
<exclude name="build/"/>
+ <exclude name="build_support/"/>
<exclude name="dist/"/>
<exclude name="eclipse/"/>
+ <exclude name="debian/"/>
</zipfileset>
</zip>
<zip destfile="dist/${project.name}-${project.version}-bin.zip">
<zipfileset prefix="${project.name}-${project.version}" dir=".">
<exclude name="build/"/>
+ <exclude name="build_support/"/>
<exclude name="dist/"/>
<exclude name="eclipse/"/>
+ <exclude name="debian/"/>
<exclude name="src/"/>
<exclude name="test/"/>
- <exclude name="config/"/>
<exclude name="ivy/"/>
<exclude name="lib/compile/"/>
<exclude name="lib/test/"/>
@@@ -114,6 -144,7 +131,7 @@@
<exclude name="build*.xml"/>
<exclude name="ivy.xml"/>
<exclude name=".*"/>
+ <exclude name="doc/api/"/>
</zipfileset>
</zip>
<tar destfile="dist/${project.name}-${project.version}.tar.gz" compression="gzip" longfile="gnu">
@@@ -121,10 -152,11 +139,11 @@@
<include name="bin/*"/>
</tarfileset>
<tarfileset prefix="${project.name}-${project.version}" dir=".">
- <exclude name="bin/*"/>
<exclude name="build/"/>
+ <exclude name="build_support/"/>
<exclude name="dist/"/>
<exclude name="eclipse/"/>
+ <exclude name="debian/"/>
</tarfileset>
</tar>
<tar destfile="dist/${project.name}-${project.version}-bin.tar.gz" compression="gzip" longfile="gnu">
@@@ -132,13 -164,13 +151,13 @@@
<include name="bin/*"/>
</tarfileset>
<tarfileset prefix="${project.name}-${project.version}" dir=".">
- <exclude name="bin/*"/>
<exclude name="build/"/>
+ <exclude name="build_support/"/>
<exclude name="dist/"/>
<exclude name="eclipse/"/>
+ <exclude name="debian/"/>
<exclude name="src/"/>
<exclude name="test/"/>
- <exclude name="config/"/>
<exclude name="ivy/"/>
<exclude name="lib/compile/"/>
<exclude name="lib/test/"/>
@@@ -146,6 -178,7 +165,7 @@@
<exclude name="build*.xml"/>
<exclude name="ivy.xml"/>
<exclude name=".*"/>
+ <exclude name="doc/api/"/>
</tarfileset>
</tar>
</target>
@@@ -154,7 -187,7 +174,7 @@@
<target name="checkstyle">
<taskdef uri="antlib:com.puppycrawl.tools.checkstyle" resource="checkstyletask.properties" classpathref="classpath.test" />
- <cs:checkstyle config="config/osmosis_checks.xml">
+ <cs:checkstyle config="build_support/checkstyle.xml">
<fileset dir="src" includes="**/*.java"/>
<fileset dir="test" includes="**/*.java"/>
<formatter type="plain"/>
@@@ -164,6 -197,11 +184,11 @@@
<!-- Runs all of the unit tests in the application. -->
<target name="test" depends="build_test" description="Run automated test cases.">
<mkdir dir="report/test"/>
+
+ <!-- Determine the location of the database authorisation file. This can be overridden outside the build if necessary. -->
+ <property name="db.apidb.authfile" location="test/data/input/v0_6/apidb-authfile.txt"/>
+ <property name="db.pgsql.authfile" location="test/data/input/v0_6/pgsql-authfile.txt"/>
+
<junit fork="no" maxmemory="512m" printsummary="on" haltonerror="off" haltonfailure="off" filtertrace="on" failureproperty="test.failure">
<formatter type="plain" usefile="true"/>
<formatter type="xml" usefile="true"/>
@@@ -172,10 -210,13 +197,13 @@@
<path location="build/src"/>
<path location="build/test"/>
</classpath>
+ <sysproperty key="db.apidb.authfile" value="${db.apidb.authfile}"/>
+ <sysproperty key="db.pgsql.authfile" value="${db.pgsql.authfile}"/>
<batchtest todir="report/test">
<fileset dir="build/test">
<include name="**/*Test*.class"/>
<exclude name="**/*TestSuite*.class"/>
+ <exclude name="**/*$*.class"/>
</fileset>
</batchtest>
</junit>
--
Osmosis, an OSM data processor
More information about the Pkg-grass-devel
mailing list