Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Creating a geotools project using Maven in NetBeans 8.02  RSS feed

 
Ranch Hand
Posts: 85
  • 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.
 
Ranch Hand
Posts: 207
2
Netbeans IDE
  • 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...................

 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!