Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This worked for me:</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;org.geotools&lt;/groupId&gt; &lt;artifactId&gt;gt-coverage&lt;/artifactId&gt; &lt;version&gt;2.7.4&lt;/version&gt; &lt;/dependency&gt; &lt;repository&gt; &lt;id&gt;osgeo&lt;/id&gt; &lt;name&gt;Open Source Geospatial Foundation Repository&lt;/name&gt; &lt;url&gt;http://download.osgeo.org/webdav/geotools/&lt;/url&gt; &lt;/repository&gt; </code></pre> <p>It seems that gt-coverage depends on jai_imageio, so it installed the appropriate jars for me. I didn't even have to change my code to use this artifact.</p> <p>This will get your code working within your IDE. However, if you want an executable jar, then you need to use the Maven Shade plugin. Its use is described <a href="http://docs.geotools.org/stable/userguide/faq.html#how-do-i-create-an-executable-jar-for-my-geotools-app" rel="nofollow">here</a> and <a href="http://repo.opengeo.org/org/opentripplanner/opentripplanner-graph-builder/0.4.4/opentripplanner-graph-builder-0.4.4.pom" rel="nofollow">here</a>. Note the extra lines in the 2nd link because they are necessary. Here's the extra code to go in your pom:</p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt; &lt;version&gt;1.3.1&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;package&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;shade&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;transformers&gt; &lt;transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"&gt; &lt;manifestEntries&gt; &lt;Main-Class&gt;com.companyname.packagename.MainClassName&lt;/Main-Class&gt; &lt;Specification-Title&gt;Java Advanced Imaging Image I/O Tools&lt;/Specification-Title&gt; &lt;Specification-Version&gt;1.1&lt;/Specification-Version&gt; &lt;Specification-Vendor&gt;Sun Microsystems, Inc.&lt;/Specification-Vendor&gt; &lt;Implementation-Title&gt;com.sun.media.imageio&lt;/Implementation-Title&gt; &lt;Implementation-Version&gt;1.1&lt;/Implementation-Version&gt; &lt;Implementation-Vendor&gt;Sun Microsystems, Inc.&lt;/Implementation-Vendor&gt; &lt;Extension-Name&gt;com.sun.media.imageio&lt;/Extension-Name&gt; &lt;/manifestEntries&gt; &lt;/transformer&gt; &lt;transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/&gt; &lt;/transformers&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; </code></pre> <p>I don't know what all those extra manifest entries are, but they make my executable jar do what it does in the IDE.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload