Hi and thanks everyone for the great work on GeoTools,

Sorry for the length of this email and thanks in advance if you can help.

I'm trying to start using GeoTools again and am following the instructions at 
the following:
http://www.geotools.org/quickstart.html

In the section "Depending on GeoTools" pom.xml is edited, is something missing?

I've got stuck at the section "Modifying Main" adding the import etc.

I've had a tinker around trying to get the missing resources, but I feel sure 
I'm doing something wrong or am missing something.

When I try to build the example I get the following (At the end of this email 
I've pasted my pom.xml file):

NetBeans: Executing 
'C:\Work\src\lib\apps\maven\apache-maven-2.2.1-bin\apache-maven-2.2.1\bin\mvn.bat
 -Dnetbeans.execution=true install'
NetBeans:      JAVA_HOME =C:\Program Files\Java\jdk1.6.0_07
Scanning for projects...
------------------------------------------------------------------------
Building example
   task-segment: [install]
------------------------------------------------------------------------
[resources:resources]
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory 
C:\Work\src\lib\java\GeoTools\geotools-2.6-M2-project\geotools-2.6-M2\example\src\main\resources
Downloading: 
http://download.java.net/maven/2/org/geotools/gt-main/1.0-SNAPSHOT/gt-main-1.0-SNAPSHOT.pom
Unable to find resource 'org.geotools:gt-main:pom:1.0-SNAPSHOT' in repository 
maven2-repository.dev.java.net (http://download.java.net/maven/2)
Downloading: 
http://download.osgeo.org/webdav/geotools//org/geotools/gt-main/1.0-SNAPSHOT/gt-main-1.0-SNAPSHOT.pom
Unable to find resource 'org.geotools:gt-main:pom:1.0-SNAPSHOT' in repository 
osgeo (http://download.osgeo.org/webdav/geotools/)
Downloading: 
http://repo.opengeo.org/org/geotools/gt-main/1.0-SNAPSHOT/gt-main-1.0-SNAPSHOT.pom
Unable to find resource 'org.geotools:gt-main:pom:1.0-SNAPSHOT' in repository 
opengeo (http://repo.opengeo.org)
Downloading: 
http://download.java.net/maven/2/org/geotools/xsd/gt-xsd-filter/1.0-SNAPSHOT/gt-xsd-filter-1.0-SNAPSHOT.pom
Unable to find resource 'org.geotools.xsd:gt-xsd-filter:pom:1.0-SNAPSHOT' in 
repository maven2-repository.dev.java.net (http://download.java.net/maven/2)
Downloading: 
http://download.osgeo.org/webdav/geotools//org/geotools/xsd/gt-xsd-filter/1.0-SNAPSHOT/gt-xsd-filter-1.0-SNAPSHOT.pom
Unable to find resource 'org.geotools.xsd:gt-xsd-filter:pom:1.0-SNAPSHOT' in 
repository osgeo (http://download.osgeo.org/webdav/geotools/)
Downloading: 
http://repo.opengeo.org/org/geotools/xsd/gt-xsd-filter/1.0-SNAPSHOT/gt-xsd-filter-1.0-SNAPSHOT.pom
Unable to find resource 'org.geotools.xsd:gt-xsd-filter:pom:1.0-SNAPSHOT' in 
repository opengeo (http://repo.opengeo.org)
Downloading: 
http://download.java.net/maven/2/org/geotools/gt-main/1.0-SNAPSHOT/gt-main-1.0-SNAPSHOT.jar
Downloading: 
http://download.java.net/maven/2/org/geotools/xsd/gt-xsd-filter/1.0-SNAPSHOT/gt-xsd-filter-1.0-SNAPSHOT.jar
Unable to find resource 'org.geotools.xsd:gt-xsd-filter:jar:1.0-SNAPSHOT' in 
repository maven2-repository.dev.java.net (http://download.java.net/maven/2)
Unable to find resource 'org.geotools:gt-main:jar:1.0-SNAPSHOT' in repository 
maven2-repository.dev.java.net (http://download.java.net/maven/2)
Downloading: 
http://download.osgeo.org/webdav/geotools//org/geotools/xsd/gt-xsd-filter/1.0-SNAPSHOT/gt-xsd-filter-1.0-SNAPSHOT.jar
Downloading: 
http://download.osgeo.org/webdav/geotools//org/geotools/gt-main/1.0-SNAPSHOT/gt-main-1.0-SNAPSHOT.jar
Unable to find resource 'org.geotools.xsd:gt-xsd-filter:jar:1.0-SNAPSHOT' in 
repository osgeo (http://download.osgeo.org/webdav/geotools/)
Downloading: 
http://repo.opengeo.org/org/geotools/xsd/gt-xsd-filter/1.0-SNAPSHOT/gt-xsd-filter-1.0-SNAPSHOT.jar
Unable to find resource 'org.geotools:gt-main:jar:1.0-SNAPSHOT' in repository 
osgeo (http://download.osgeo.org/webdav/geotools/)
Downloading: 
http://repo.opengeo.org/org/geotools/gt-main/1.0-SNAPSHOT/gt-main-1.0-SNAPSHOT.jar
Unable to find resource 'org.geotools.xsd:gt-xsd-filter:jar:1.0-SNAPSHOT' in 
repository opengeo (http://repo.opengeo.org)
Unable to find resource 'org.geotools:gt-main:jar:1.0-SNAPSHOT' in repository 
opengeo (http://repo.opengeo.org)
------------------------------------------------------------------------
[ERROR]BUILD ERROR
------------------------------------------------------------------------
Failed to resolve artifact.

Missing:
----------
1) org.geotools.xsd:gt-xsd-filter:jar:1.0-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=org.geotools.xsd 
-DartifactId=gt-xsd-filter -Dversion=1.0-SNAPSHOT -Dpackaging=jar 
-Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=org.geotools.xsd 
-DartifactId=gt-xsd-filter -Dversion=1.0-SNAPSHOT -Dpackaging=jar 
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
          1) org.geotools.demo:example:jar:1.0-SNAPSHOT
          2) org.geotools.xsd:gt-xsd-filter:jar:1.0-SNAPSHOT

2) org.geotools:gt-main:jar:1.0-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=org.geotools -DartifactId=gt-main 
-Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=org.geotools -DartifactId=gt-main 
-Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] 
-DrepositoryId=[id]

  Path to dependency: 
          1) org.geotools.demo:example:jar:1.0-SNAPSHOT
          2) org.geotools:gt-main:jar:1.0-SNAPSHOT

----------
2 required artifacts are missing.

for artifact: 
  org.geotools.demo:example:jar:1.0-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  osgeo (http://download.osgeo.org/webdav/geotools/),
  maven2-repository.dev.java.net (http://download.java.net/maven/2),
  opengeo (http://repo.opengeo.org)



------------------------------------------------------------------------
For more information, run Maven with the -e switch
------------------------------------------------------------------------
Total time: 3 seconds
Finished at: Fri Sep 18 18:58:45 BST 2009
Final Memory: 10M/254M
------------------------------------------------------------------------



My pom.xml file is like this:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd"; 
xmlns="http://maven.apache.org/POM/4.0.0";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>geotools</artifactId>
    <groupId>org.geotools</groupId>
    <version>2.6-M2</version>
  </parent>
  <groupId>org.geotools.demo</groupId>
  <artifactId>example</artifactId>
  <version>1.0-SNAPSHOT</version>
  <name>example</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-main</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools.xsd</groupId>
      <artifactId>gt-xsd-filter</artifactId>
      <version>${project.version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <!--
           Use maven from the command line:
           1. mvn exec:java 
-Dexec.mainClass="org.geotools.demo.example.WFSExample
           2. mvn exec:java 
-Dexec.mainClass="org.geotools.demo.example.WMSExample
           3. mvn exec:java 
-Dexec.mainClass="org.geotools.demo.example.SLDExample" -Dexec.keepAlive=true
        -->
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>

I'll try again from a different machine and post back if I see my mistake.

Thanks again,

Andy
http://www.geog.leeds.ac.uk/people/a.turner/
 


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to