Changeset 18514 in osm for applications/editors/josm/plugins/validator
- Timestamp:
- 2009-11-08T20:05:03+01:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/validator
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/build.xml
r18425 r18514 1 <?xml version="1.0" encoding="UTF-8"?> 2 <!-- 3 ** This is the build.xml for the validator plugin 4 ** 5 ** Usage 6 ** ===== 7 ** To build it run 8 ** 9 ** > ant dist 10 ** 11 ** To install the generated plugin locally (in your default plugin directory) run 12 ** 13 ** > ant install 14 ** 15 ** To build against the core in ../../core, create a correct manifest and deploy to 16 ** SVN, 17 ** set the properties commit.message and plugin.main.version 18 ** and run 19 ** > ant publish 20 ** 21 ** 22 --> 1 23 <project name="validator" default="dist" basedir="."> 24 25 <!-- 26 ** update before publishing 27 --> 28 <property name="commit.message" value="Updating to JOSM 2414" /> 29 <property name="plugin.main.version" value="2414" /> 30 31 2 32 <property name="josm" location="../../core/dist/josm-custom.jar"/> 3 33 <property name="plugin.dist.dir" value="../../dist"/> … … 26 56 <attribute name="Plugin-Description" value="An OSM data validator. It checks for problems in data, and provides fixes for the common ones. Spellcheck integrated for tag names."/> 27 57 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Validator"/> 28 <attribute name="Plugin-Mainversion" value=" 2388"/>58 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 29 59 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 30 60 </manifest> … … 54 84 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 55 85 </target> 86 87 <!-- 88 ************************** Publishing the plugin *********************************** 89 --> 90 <!-- 91 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 92 ** property ${coreversion.info.entry.revision} 93 ** 94 --> 95 <target name="core-info"> 96 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false"> 97 <env key="LANG" value="C"/> 98 <arg value="info"/> 99 <arg value="--xml"/> 100 <arg value="../../core"/> 101 </exec> 102 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/> 103 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 104 105 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 106 <delete file="core.info.xml" /> 107 </target> 108 109 <!-- 110 ** commits the source tree for this plugin 111 --> 112 <target name="commit-current"> 113 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 114 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 115 <env key="LANG" value="C"/> 116 <arg value="commit"/> 117 <arg value="-m "${commit.message}""/> 118 <arg value="."/> 119 </exec> 120 </target> 121 122 <!-- 123 ** updates (svn up) the source tree for this plugin 124 --> 125 <target name="update-current"> 126 <echo>Updating plugin source ...</echo> 127 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 128 <env key="LANG" value="C"/> 129 <arg value="up"/> 130 <arg value="."/> 131 </exec> 132 <echo>Updating ${plugin.jar} ...</echo> 133 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 134 <env key="LANG" value="C"/> 135 <arg value="up"/> 136 <arg value="../dist/${plugin.jar}"/> 137 </exec> 138 </target> 139 140 <!-- 141 ** commits the plugin.jar 142 --> 143 <target name="commit-dist"> 144 <echo>Commiting ${plugin.jar} with message '${commit.message}' ...</echo> 145 <echo>Plugin-Mainversion is ${plugin.main.version} ...</echo> 146 <echo>JOSM build version is ${coreversion.info.entry.revision} ...</echo> 147 <echo>Plugin-Version is ${version.entry.commit.revision} ...</echo> 148 <condition property="difference-in-josm-version"> 149 <equals arg1="${plugin.main.version}" arg2="${coreversion.info.entry.revision}" /> 150 </condition> 151 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 152 <env key="LANG" value="C"/> 153 <arg value="commit"/> 154 <arg value="-m "${commit.message}""/> 155 <arg value="../dist/${plugin.jar}"/> 156 </exec> 157 </target> 158 159 <!-- 160 ** outputs a warning if the JOSM version inserted in the plugin manifest isn't equal to the 161 ** the JOSM version the plugin was built against. 162 ** 163 ** This isn't necessarily an error but it is a sign that something could be wrong. 164 --> 165 <target name="warn-difference-in-josm-version" unless="${difference-in-josm-version}"> 166 <echo level="warning">!!!WARNING!!! Plugin-Mainversion is not equal to the JOSM version used in this build. !!!WARNING!!!</echo> 167 </target> 168 169 <target name="publish" depends="core-info,commit-current,update-current,clean,dist,commit-dist,warn-difference-in-josm-version"> 170 </target> 56 171 </project> -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/Test.java
r18088 r18514 100 100 */ 101 101 public void startTest(ProgressMonitor progressMonitor) { 102 backreferenceDataSet = new BackreferencedDataSet(Main.main.getCurrentDataSet()); 103 backreferenceDataSet.build(); 102 backreferenceDataSet = new BackreferencedDataSet(); 104 103 if (progressMonitor == null) { 105 104 this.progressMonitor = NullProgressMonitor.INSTANCE; -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java
r18343 r18514 36 36 public static BackreferencedDataSet getBackreferenceDataSet() { 37 37 if (backreferences == null) { 38 backreferences = new BackreferencedDataSet(Main.main.getEditLayer().data); 39 backreferences.build(); 38 backreferences = new BackreferencedDataSet(); 40 39 } 41 40 return backreferences;
Note:
See TracChangeset
for help on using the changeset viewer.