JOSM / geojson

Allows reading GeoJSON using different projections – NOW PART OF JOSM CORE
Apache License 2.0
13 stars 10 forks source link

Plugin hijacks the "Activate the selected layer" icon #8

Closed don-vip closed 7 years ago

don-vip commented 7 years ago

In layers dialog the third button icon is replaced by the plugin icon when installed, probably because of a name clash.

floscher commented 7 years ago

@don-vip I'm currently a bit confused about the ant build of this plugin.

The sources are located in src/main/java, the images in images as well as in src/main/resources/images. The build.xml file does not modify anything to adjust for the different source directory. The Ant property plugin.src.dir is immutable, so could not be adjusted to something different. It's anyway not used to determine, which directory to compile. So the compile task compiles the directory src, right?

On Jenkins the Ant build seems to work and produces the *.jar file correctly (I would expect package errors, because of the extra directories main/java‽).

Is there some Ant magic at work that fixes the source directory automatically? Should something be done about this?

Would it be ok, if I added the following to build.xml and moved images and data into src/main/resources in order to get rid of the duplicate images directories?:

<target name="setup-dist-default">
  <copy todir="${plugin.build.dir}/resources" failonerror="no" includeemptydirs="no">
    <fileset dir="src/main/resources/resources"/>
  </copy>
  <copy todir="${plugin.build.dir}/images" failonerror="no" includeemptydirs="no">
    <fileset dir="src/main/resources/images"/>
  </copy>
  <copy todir="${plugin.build.dir}/data" failonerror="no" includeemptydirs="no">
    <fileset dir="src/main/resources/data"/>
  </copy>
  <copy todir="${plugin.build.dir}">
    <fileset dir=".">
      <include name="README*"/>
      <include name="LICENSE*"/>
    </fileset>
  </copy>
</target>
don-vip commented 7 years ago

There is no Ant magic afaik. I don't understand neither how it works. Feel free to adapt it :) You can run ant -v to get debug output.

floscher commented 7 years ago

Not even dark magic that nobody understands and always emerges unexpectedly? :wink: :wink: At least it's in our favour, but I'll see what I can do to make it more straightforward…

I currently don't have a working environment for JOSM builds with Ant set up. So I'll try to adjust it and hope that Jenkins won't complain and I don't break anything else :crossed_fingers: .