Hi.
I'm a complete newbie with GeoTools but I'm hoping to use it for a
university project. So please bear with me...
I'm having trouble with the Quickstart guide trying to create the example
project.
When I run the command
mvn archetype:create -DgroupId=org.geotools.demo -DartifactId=example
it does indeed wirr and click but ultimately I get a BUILD ERROR:
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:create] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoad
er'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:create {execution: default-cli}]
[WARNING] This goal is deprecated. Please use mvn archetype:generate instead
[INFO] Defaulting package to group ID: org.geotools.demo
[INFO]
----------------------------------------------------------------------------
[INFO] Using following parameters for creating OldArchetype:
maven-archetype-quickstart:RELEASE
[INFO]
----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.geotools.demo
[INFO] Parameter: packageName, Value: org.geotools.demo
[INFO] Parameter: package, Value: org.geotools.demo
[INFO] Parameter: artifactId, Value: example
[INFO] Parameter: basedir, Value: C:\Program Files\Java
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error creating from archetype
Embedded error: Error merging velocity templates
C:\Program Files\Java\example\pom.xml (The system cannot find the path
specified)
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
So then, as the warning suggested, I tried:
mvn archetype:generate -DgroupId=org.geotools.demo -DartifactId=example
I chose option 15 (maven-archetype-quickstart), but still got a build
failure:
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoad
er'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart
(org.apache.maven.archetypes:maven-archetype-quickstart:1.
0)
Choose archetype:
1: internal -> appfuse-basic-jsf (AppFuse archetype for creating a web
application with Hibernate, Spring and JSF)
2: internal -> appfuse-basic-spring (AppFuse archetype for creating a web
application with Hibernate, Spring and Spring
MVC)
3: internal -> appfuse-basic-struts (AppFuse archetype for creating a web
application with Hibernate, Spring and Struts
2)
4: internal -> appfuse-basic-tapestry (AppFuse archetype for creating a web
application with Hibernate, Spring and Tapes
try 4)
5: internal -> appfuse-core (AppFuse archetype for creating a jar
application with Hibernate and Spring and XFire)
6: internal -> appfuse-modular-jsf (AppFuse archetype for creating a modular
application with Hibernate, Spring and JSF)
7: internal -> appfuse-modular-spring (AppFuse archetype for creating a
modular application with Hibernate, Spring and S
pring MVC)
8: internal -> appfuse-modular-struts (AppFuse archetype for creating a
modular application with Hibernate, Spring and S
truts 2)
9: internal -> appfuse-modular-tapestry (AppFuse archetype for creating a
modular application with Hibernate, Spring and
Tapestry 4)
10: internal -> maven-archetype-j2ee-simple (A simple J2EE Java application)
11: internal -> maven-archetype-marmalade-mojo (A Maven plugin development
project using marmalade)
12: internal -> maven-archetype-mojo (A Maven Java plugin development
project)
13: internal -> maven-archetype-portlet (A simple portlet application)
14: internal -> maven-archetype-profiles ()
15: internal -> maven-archetype-quickstart ()
16: internal -> maven-archetype-site-simple (A simple site generation
project)
17: internal -> maven-archetype-site (A more complex site project)
18: internal -> maven-archetype-webapp (A simple Java web application)
19: internal -> jini-service-archetype (Archetype for Jini service project
creation)
20: internal -> softeu-archetype-seam (JSF+Facelets+Seam Archetype)
21: internal -> softeu-archetype-seam-simple (JSF+Facelets+Seam (no
persistence) Archetype)
22: internal -> softeu-archetype-jsf (JSF+Facelets Archetype)
23: internal -> jpa-maven-archetype (JPA application)
24: internal -> spring-osgi-bundle-archetype (Spring-OSGi archetype)
25: internal -> confluence-plugin-archetype (Atlassian Confluence plugin
archetype)
26: internal -> jira-plugin-archetype (Atlassian JIRA plugin archetype)
27: internal -> maven-archetype-har (Hibernate Archive)
28: internal -> maven-archetype-sar (JBoss Service Archive)
29: internal -> wicket-archetype-quickstart (A simple Apache Wicket project)
30: internal -> scala-archetype-simple (A simple scala project)
31: internal -> lift-archetype-blank (A blank/empty liftweb project)
32: internal -> lift-archetype-basic (The basic (liftweb) project)
33: internal -> cocoon-22-archetype-block-plain
([http://cocoon.apache.org/2.2/maven-plugins/])
34: internal -> cocoon-22-archetype-block
([http://cocoon.apache.org/2.2/maven-plugins/])
35: internal -> cocoon-22-archetype-webapp
([http://cocoon.apache.org/2.2/maven-plugins/])
36: internal -> myfaces-archetype-helloworld (A simple archetype using
MyFaces)
37: internal -> myfaces-archetype-helloworld-facelets (A simple archetype
using MyFaces and facelets)
38: internal -> myfaces-archetype-trinidad (A simple archetype using Myfaces
and Trinidad)
39: internal -> myfaces-archetype-jsfcomponents (A simple archetype for
create custom JSF components using MyFaces)
40: internal -> gmaven-archetype-basic (Groovy basic archetype)
41: internal -> gmaven-archetype-mojo (Groovy mojo archetype)
Choose a number:
(1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37
/38/39/40/41) 15: : 15
Define value for version: 1.0-SNAPSHOT: :
Confirm properties configuration:
groupId: org.geotools.demo
artifactId: example
version: 1.0-SNAPSHOT
package: org.geotools.demo
Y: :
[INFO]
----------------------------------------------------------------------------
[INFO] Using following parameters for creating OldArchetype:
maven-archetype-quickstart:RELEASE
[INFO]
----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.geotools.demo
[INFO] Parameter: packageName, Value: org.geotools.demo
[INFO] Parameter: package, Value: org.geotools.demo
[INFO] Parameter: artifactId, Value: example
[INFO] Parameter: basedir, Value: C:\Program Files\Java
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[ERROR] Error merging velocity templates
org.apache.maven.archetype.old.ArchetypeTemplateProcessingException: Error
merging velocity templates
at
org.apache.maven.archetype.old.DefaultOldArchetype.processTemplate(DefaultOldArchetype.java:905)
at
org.apache.maven.archetype.old.DefaultOldArchetype.processTemplate(DefaultOldArchetype.java:742)
at
org.apache.maven.archetype.old.DefaultOldArchetype.processTemplates(DefaultOldArchetype.java:483)
at
org.apache.maven.archetype.old.DefaultOldArchetype.createArchetype(DefaultOldArchetype.java:331)
at
org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processOldArchetype(DefaultArchetypeGenerator.
java:253)
at
org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.ja
va:143)
at
org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.ja
va:286)
at
org.apache.maven.archetype.DefaultArchetype.generateProjectFromArchetype(DefaultArchetype.java:69)
at
org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:1
84)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.jav
a:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.io.FileNotFoundException: C:\Program
Files\Java\example\pom.xml (The system cannot find the path specifi
ed)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at
org.apache.maven.archetype.old.DefaultOldArchetype.processTemplate(DefaultOldArchetype.java:895)
... 27 more
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] :
org.apache.maven.archetype.old.ArchetypeTemplateProcessingException: Error
merging velocity templates
Error merging velocity templates
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 13 seconds
[INFO] Finished at: Wed Apr 21 10:57:05 BST 2010
[INFO] Final Memory: 17M/177M
[INFO]
------------------------------------------------------------------------
Could anyone please help me with this so that I can get going with the
tutorial? It's depressing to fail at the first hurdle!
Cheers.
mbedward wrote:
>
> Dear GeoTools friends,
>
> Jody and I would be eternally grateful if any of you have a few
> minutes to look over the new introductory web pages that we're putting
> together at the moment. In particular, these two...
>
> http://geotools.org/quickstart.html
>
> http://geotools.org/examples/csv2shp.html
>
> (if you've looked at either of these in the last few days please
> refresh your browser to get the latest page, hot off the press)
>
> The other pages in the Examples area are in a state of creative chaos
> at the moment so don't worry about those yet, although any suggestions
> are welcome.
>
> Feedback to the list please.
>
> cheers
> Michael
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® 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-12, 2009. Register
> now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
--
View this message in context:
http://n2.nabble.com/quickstart-and-example-pages-tp3699345p4936128.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users