Index: /applications/editors/josm/debian/control
===================================================================
--- /applications/editors/josm/debian/control	(revision 15968)
+++ /applications/editors/josm/debian/control	(revision 15969)
@@ -7,5 +7,5 @@
 	libqt4-core
 Build-Depends-Indep: sun-java6-jdk|openjdk-6-jdk,
-	ant,
+	ant, zip,
 	qt4-dev-tools
 Standards-Version: 3.6.1
Index: /applications/editors/josm/debian/files
===================================================================
--- /applications/editors/josm/debian/files	(revision 15968)
+++ /applications/editors/josm/debian/files	(revision 15969)
@@ -1,1 +1,5 @@
-openstreetmap-josm_4926078_all.deb utils optional
+openstreetmap-josm_14790_all.deb utils optional
+openstreetmap-josm_14790_all.deb utils optional
+openstreetmap-josm_14790_all.deb utils optional
+openstreetmap-josm_14790_all.deb utils optional
+openstreetmap-josm_14790_all.deb utils optional
Index: /applications/editors/josm/debian/make_install_files.sh
===================================================================
--- /applications/editors/josm/debian/make_install_files.sh	(revision 15968)
+++ /applications/editors/josm/debian/make_install_files.sh	(revision 15969)
@@ -12,10 +12,11 @@
 do_update_plugins=true
 do_remove_jar=true
+do_cleanup=true
 
 for arg in "$@" ; do
     case $arg in
 	--dest-path=*) # Destination path to install the final *.jar Files
-	dst_path=${arg#*=}
-	;;
+	    dst_path=${arg#*=}
+	    ;;
 	
 	--no-update-icons) # Do not update icons
@@ -38,5 +39,9 @@
 	    do_remove_jar=false
 	    ;;
-	
+
+	--no-clean) # no cleanup before build
+	    do_cleanup=false
+	    ;;
+
 	*)
 	    echo ""
@@ -125,6 +130,8 @@
 # Remove Old Jar Files in dist/*.jar
 
-$do_remove_jar && rm -f dist/*.jar
-$do_remove_jar && rm -f plugins/*/dist/*.jar
+$do_cleanup && {
+    $do_remove_jar && rm -f dist/*.jar
+    $do_remove_jar && rm -f plugins/*/dist/*.jar
+    }
 
 # ------------------------------------------------------------------
@@ -133,5 +140,5 @@
     echo "------------- Compile Josm"
     cd core
-    ant -q clean 2>build.err
+    $do_cleanup && ant -q clean 2>build.err
     ant -q dist >>build.log 2>>build.err
     rc=$?
@@ -148,5 +155,5 @@
     echo "------------- Compile Josm Plugin webkit-image for wmsplugin"
     cd plugins/wmsplugin
-    make clean
+    $do_cleanup &&     make clean
     make
     cd ../..
@@ -165,10 +172,12 @@
 	cd $dir
 	echo -n -e "----- $dir\r"
-	$do_remove_jar && rm -f dist/*.jar
-	$do_remove_jar && rm -f ../../dist/$dir.jar
-	rm -f *.log
-	echo "ant clean" >build.log
-	echo "ant clean" >build.err
-	ant -q clean >>build.log 2>>build.err
+	$do_cleanup && {
+	    $do_remove_jar && rm -f dist/*.jar
+	    $do_remove_jar && rm -f ../../dist/$dir.jar
+	    rm -f *.log
+	    echo "ant clean" >build.log
+	    echo "ant clean" >build.err
+	    ant -q clean >>build.log 2>>build.err
+	}
 	echo "ant dist" >>build.log
 	echo "ant dist" >>build.err
@@ -213,5 +222,5 @@
     echo "------------- Compile Josm-ng"
     cd ../josm-ng
-    ant -q clean
+    $do_cleanup && ant -q clean
     ant -q josm-ng-impl.jar  >>build.log 2>>build.err
     rc=$?
@@ -263,8 +272,16 @@
 # Copy words.cfg for spelling 
 mkdir -p "$jar_path/speller"
-cp ../../utils/planet.osm/java/speller/words.cfg "$jar_path/speller/"
-
-# ------------------------------------------------------------------
-cp "debian/bin/josm.sh" "$bin_path/josm" || exit -1 
+cp ../../utils/planet.osm/java/speller/words.cfg "$jar_path/speller/" || {
+    echo "!!!!!!!!!! words.cfg is missing"
+    exit -1
+}
+
+
+# ------------------------------------------------------------------
+cp "debian/bin/josm.sh" "$bin_path/josm" || {
+    echo "!!!!!!!!!! josm.sh is missing"
+    exit -1
+}
+
 cp "debian/bin/josm-ng.sh" "$bin_path/josm-ng" || {
     echo "!!!!!!!!!!!!!!!!! WARNING Josm-NG is not included into the package"
@@ -273,6 +290,12 @@
 
 # add plugins to default preferences
-sed "s/PLUGIN_LIST/$plugins/;" <debian/bin/preferences >"$jar_path/preferences"
+sed "s/PLUGIN_LIST/$plugins/;" <debian/bin/preferences >"$jar_path/preferences" || {
+    echo "!!!!!!!! WARNING cannot create preferences"
+    exit -1
+}
+    
 
 # Copy default Bookmarks
 cp nsis/bookmarks "$jar_path/bookmarks"
+
+exit 0
Index: /applications/editors/josm/debian/rules
===================================================================
--- /applications/editors/josm/debian/rules	(revision 15968)
+++ /applications/editors/josm/debian/rules	(revision 15969)
@@ -12,5 +12,5 @@
 
 build: build-stamp 
-build-stamp: clean
+build-stamp: 
 	dh_testdir
 
@@ -29,5 +29,14 @@
 	# Add here commands to clean up after the build process.
 	-$(MAKE) distclean
-
+	for dir in `ls plugins/*/build.xml | sed s,/build.xml,,`; do \
+	    echo "-------- Cleanup Plugin '$$dir'"; \
+	    cd $$dir; \
+	    rm -f dist/*.jar; \
+	    rm -f ../../dist/$dir.jar; \
+	    rm -f *.log; \
+	    ant -q clean; \
+	    cd ../..; \
+	done
+	cd core;   ant -q clean
 	dh_clean
 
@@ -35,10 +44,9 @@
 	dh_testdir
 	dh_testroot
-	dh_clean -k
 	dh_installdirs
 
 #	./debian/update_svn_revision.sh
-	./debian/make_install_files.sh --dest-path=${destdir} || exit -1
-
+	bash ./debian/make_install_files.sh --dest-path=${destdir} --no-clean || exit -1
+	# Install done
 
 # Build architecture-independent files here.
