Index: /applications/editors/josm/plugins/wmsplugin/build.xml
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/build.xml	(revision 18669)
+++ /applications/editors/josm/plugins/wmsplugin/build.xml	(revision 18670)
@@ -19,5 +19,5 @@
 ** SVN, run
 **    - set the property commit.message
-**    - set the property josm.reference.release to lowest JOSM release number this
+**    - set the property plugin.main.version to lowest JOSM release number this
 **      plugin build is compatible with
 **    > ant  deploy
@@ -26,11 +26,15 @@
 -->
 <project name="wmsplugin" default="dist" basedir=".">
-    <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
+	
+	
+	<property name="commit.message" value="Updated build.xml" />		
+	<property name="plugin.main.version" value="2450" />
+	
+	
+	<property name="josm"                   location="../../core/dist/josm-custom.jar"/>
     <property name="plugin.dist.dir"        value="../../dist"/>
     <property name="plugin.build.dir"       value="build"/>
     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     <property name="ant.build.javac.target" value="1.5"/>
-	<property name="commit.message"         value="fixing JOSM issue #3186" />
-	<property name="josm.reference.release" value="2450" />
 
     <target name="init">
@@ -56,5 +60,5 @@
                 <attribute name="Plugin-Description" value="Display georeferenced images as background in JOSM (WMS servers, Yahoo, ...)."/>
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/WMSPlugin"/>
-                <attribute name="Plugin-Mainversion" value="${josm.reference.release}"/>
+                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
                 <attribute name="de_Plugin-Link" value="http://wiki.openstreetmap.org/wiki/DE:JOSM/Plugins/WMSPlugin"/>
@@ -86,54 +90,79 @@
     </target>
 
-	<target name="core-info">
-	        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
-	                    <env key="LANG" value="C"/>
-	                    <arg value="info"/>
-	                    <arg value="--xml"/>
-	                    <arg value="../../core"/>
-	        </exec>
-	        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
-			<echo>Building against core revision ${coreversion.info.entry.revision} ...</echo>
-			<delete file="core.info.xml" />
-		</target>
+	<!--
+		 ************************** Publishing the plugin *********************************** 
+		-->
+			<!--
+			  ** extracts the JOSM release for the JOSM version in ../core and saves it in the 
+			  ** property ${coreversion.info.entry.revision}
+			  **
+			-->
+			<target name="core-info">
+		        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
+		                    <env key="LANG" value="C"/>
+		                    <arg value="info"/>
+		                    <arg value="--xml"/>
+		                    <arg value="../../core"/>
+		        </exec>
+		        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
+				<echo>Building against core revision ${coreversion.info.entry.revision}.</echo>			
+				<echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
+				<delete file="core.info.xml" />
+			</target>
 
-
-		<target name="commit-current">
-			<echo>Commiting the plugin source ...</echo>
-		    <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
-		                    <env key="LANG" value="C"/>
-		                    <arg value="commit"/>
-		                    <arg value="-m &quot;${commit.message}&quot;"/>
-		                    <arg value="."/>
-		    </exec>
-		</target>
-
-
-		<target name="update-current">
-			<echo>Updating basedir ...</echo>
-		    <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
-		                    <env key="LANG" value="C"/>
-		                    <arg value="up"/>
-		                    <arg value="."/>
-		    </exec>
-			<echo>Updating ${plugin.jar} ...</echo>
-		    <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
-		                    <env key="LANG" value="C"/>
-		                    <arg value="up"/>
-		                    <arg value="${plugin.jar}"/>
-		    </exec>
-		</target>
-
-		<target name="commit-dist">
-				<echo>Commiting ${plugin.jar} ...</echo>
+			<!--
+			 ** commits the source tree for this plugin
+			-->
+			<target name="commit-current">
+				<echo>Commiting the plugin source with message '${commit.message}' ...</echo>
 			    <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
 			                    <env key="LANG" value="C"/>
 			                    <arg value="commit"/>
-	                			<arg value="-m &quot;${commit.message}&quot;"/>
-			                    <arg value="${plugin.jar}"/>
-			    </exec>
-	   	</target>
+			                    <arg value="-m '${commit.message}'"/>
+			                    <arg value="."/>
+			    </exec>	    
+			</target>
 
-		<target name="deploy" depends="core-info,commit-current,update-current,clean,dist,commit-dist">
-		</target>
+			<!--
+			** updates (svn up) the source tree for this plugin
+			-->
+			<target name="update-current">
+				<echo>Updating plugin source ...</echo>
+			    <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
+			                    <env key="LANG" value="C"/>
+			                    <arg value="up"/>
+			                    <arg value="."/>
+			    </exec>	    
+				<echo>Updating ${plugin.jar} ...</echo>
+			    <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
+			                    <env key="LANG" value="C"/>
+			                    <arg value="up"/>
+			                    <arg value="../dist/${plugin.jar}"/>
+			    </exec>	    
+			</target>
+			
+			<!--
+			 ** commits the plugin.jar 
+			 -->
+			<target name="commit-dist">
+					<echo>
+	***** Properties of published ${plugin.jar} *****
+	Commit message    : '${commit.message}'					
+	Plugin-Mainversion: ${plugin.main.version}
+	JOSM build version: ${coreversion.info.entry.revision}
+	Plugin-Version    : ${version.entry.commit.revision}
+	***** / Properties of published ${plugin.jar} *****					
+						
+	Now commiting ${plugin.jar} ...
+	</echo>					
+				    <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
+				                    <env key="LANG" value="C"/>
+					    			<arg value="-m '${commit.message}'"/>
+				    				<arg value="commit"/>	                			
+	            			        <arg value="${plugin.jar}"/>
+				    </exec>	    
+		   	</target>
+					
+			<target name="publish" depends="core-info,commit-current,update-current,clean,dist,commit-dist">
+			</target>
 </project>
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSAdjustAction.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSAdjustAction.java	(revision 18669)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSAdjustAction.java	(revision 18670)
@@ -10,4 +10,5 @@
 import java.awt.event.MouseMotionListener;
 import java.util.List;
+import java.util.logging.Logger;
 
 import javax.swing.DefaultComboBoxModel;
@@ -30,7 +31,7 @@
 
 
-public class WMSAdjustAction extends MapMode implements
-    MouseListener, MouseMotionListener{
-
+public class WMSAdjustAction extends MapMode implements MouseListener, MouseMotionListener{
+	static private final Logger logger = Logger.getLogger(WMSAdjustAction.class.getName());
+	
     GeorefImage selectedImage;
     boolean mouseDown;
@@ -212,6 +213,4 @@
    }
 
-
-
 	@Override
 	protected void updateEnabledState() {
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java	(revision 18669)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java	(revision 18670)
@@ -91,5 +91,5 @@
 
 		executor = Executors.newFixedThreadPool(3);
-		if (!baseURL.startsWith("html:") && !WMSGrabber.isUrlWithPatterns(baseURL)) {
+		if (baseURL != null && !baseURL.startsWith("html:") && !WMSGrabber.isUrlWithPatterns(baseURL)) {
 			if (!(baseURL.endsWith("&") || baseURL.endsWith("?"))) {
 				if (!confirmMalformedUrl(baseURL)) {
