• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Creating a geotools project using Maven in NetBeans 8.02

 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to create a geotools project using Maven in NetBeans 8.02. I am following the guidelines provided in the tutorial:
QuickStart Application

I am able to run "Hello World" project:
It downloaded several things and then printed "Hello World" like:


Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6.jar (10 KB at 11.7 KB/sec)
                       
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar (14 KB at 15.7 KB/sec)
                       
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar (218 KB at 173.0 KB/sec)
                       
Downloaded: http://repo.maven.apache.org/maven2/org/apache/commons/commons-exec/1.1/commons-exec-1.1.jar (52 KB at 54.0 KB/sec)
Hello World!




The step 1 says that:
<Create the org.geotools.tutorial.Quickstart class using your IDE.>

and their pom.xml has following line:


<modelVersion>4.0.0</modelVersion>
   <groupId>org.geotools</groupId>
   <artifactId>tutorial</artifactId>


but pom.xml on my computer has following stuff


<modelVersion>4.0.0</modelVersion>

 <groupId>com.mycompany</groupId>
 <artifactId>mavenproject1</artifactId>



which shows that groupId and artifactId are different.
I ran the "Hello World" program using com.mycompany groupId.

However now I am trying to import the packages as in the tutorial:
import org.geotools.data.FileDataStore;
import org.geotools.data.FileDataStoreFinder;
import org.geotools.data.simple.SimpleFeatureSource;

using the import statements:
import com.mycompany.data.FileDataStore;
import com.mycompany.data.FileDataStoreFinder;
import com.mycompany.data.simple.SimpleFeatureSource;


I am getting the error:
package com.mycompany.data does not exists.

I have following package statement:

package com.mycompany.mavenproject1;


Some body please guide me.

Zulfi.
 
Rancher
Posts: 527
6
IntelliJ IDE Spring Fedora
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, well the two packages you listed are different so it makes sense it says it doesn't exist.  The differences in the pom you wrote like artifactId and blah blah are for your project and don't affect what dependencies you put in there as far as I know.

com.mycompany.data
com.mycompany.mavenproject1;

These are different packages...................

 
This is my favorite show. And this is my favorite tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic