Note that there are some explanatory texts on larger screens.

plurals
  1. POMaven Missing artifact org.geotools:gt-shapefile:jar:11-SNAPSHOT
    primarykey
    data
    text
    <p>Hello I am trying to write a simple geotools project with maven. Actually I am very new to maven. I opened new maven project I set the setting and write some code. As I know maven should download and install the needed jar files of geotools. But A am getting "Missing artifact org.geotools:gt-shapefile:jar:11-SNAPSHOT" error and I cannot understand why is that.</p> <p>My working envirement:</p> <p>Eclipse Kepler, Jdk 6, Maven-Latest release, Geotools-Latest release</p> <p>Here is my pom.xml</p> <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;org.geotools&lt;/groupId&gt; &lt;artifactId&gt;tutorial&lt;/artifactId&gt; &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt; &lt;packaging&gt;jar&lt;/packaging&gt; &lt;name&gt;tutorial&lt;/name&gt; &lt;url&gt;http://maven.apache.org&lt;/url&gt; &lt;properties&gt; &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt; &lt;geotools.version&gt;11-SNAPSHOT&lt;/geotools.version&gt; &lt;/properties&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;junit&lt;/groupId&gt; &lt;artifactId&gt;junit&lt;/artifactId&gt; &lt;version&gt;3.8.1&lt;/version&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.geotools&lt;/groupId&gt; &lt;artifactId&gt;gt-shapefile&lt;/artifactId&gt; &lt;version&gt;${geotools.version}&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.geotools&lt;/groupId&gt; &lt;artifactId&gt;gt-swing&lt;/artifactId&gt; &lt;version&gt;${geotools.version}&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;repositories&gt; &lt;repository&gt; &lt;id&gt;maven2-repository.dev.java.net&lt;/id&gt; &lt;name&gt;Java.net repository&lt;/name&gt; &lt;url&gt;http://download.java.net/maven/2&lt;/url&gt; &lt;/repository&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; &lt;/repositories&gt; </code></pre> <p></p> <p>Here is my Quickstart class</p> <pre><code> package org.geotools.tutorial; import java.io.File; import org.geotools.data.FileDataStore; import org.geotools.data.FileDataStoreFinder; import org.geotools.data.simple.SimpleFeatureSource; import org.geotools.map.FeatureLayer; import org.geotools.map.Layer; import org.geotools.map.MapContent; import org.geotools.styling.SLD; import org.geotools.styling.Style; import org.geotools.swing.JMapFrame; import org.geotools.swing.data.JFileDataStoreChooser; /** * Prompts the user for a shapefile and displays the contents on the screen in a map frame. * &lt;p&gt; * This is the GeoTools Quickstart application used in documentationa and tutorials. * */ public class Quickstart { /** * GeoTools Quickstart demo application. Prompts the user for a shapefile and displays its * contents on the screen in a map frame */ public static void main(String[] args) throws Exception { // display a data store file chooser dialog for shapefiles File file = JFileDataStoreChooser.showOpenFile("shp", null); if (file == null) { return; } FileDataStore store = FileDataStoreFinder.getDataStore(file); SimpleFeatureSource featureSource = store.getFeatureSource(); // Create a map content and add our shapefile to it MapContent map = new MapContent(); map.setTitle("Quickstart"); Style style = SLD.createSimpleStyle(featureSource.getSchema()); Layer layer = new FeatureLayer(featureSource, style); map.addLayer(layer); // Now display the map JMapFrame.showMap(map); } } </code></pre> <p>I just wrote the codes I didn't download or install any jars. I opened the project as maven project. I wonder when and how maven is downloading and installing jars?</p> <p>Thank you.</p>
    singulars
    1. This table or related slice is empty.
    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