Hi Justin
cool, it works like a charm. I added some 3rd party jar to my repository and added a dependency in my pom.xml file. Is there a way to have this jar exported when building the module?
regards
Stefan
mit freundlichem Gruss
Stefan Ziegler
----- Originalnachricht -----
Von: Justin Deoliveira <jdeolive@anonymised.com>
Gesendet: Fre, 2.10.2009 15:49
An: Ziegler Stefan <Stefan.Ziegler@anonymised.com>
Cc: geoserver-devel@lists.sourceforge.net
Betreff: Re: [Geoserver-devel] create wfs output format
Hi Stefan,
No problem. Hope you are making progress
Ziegler Stefan wrote:
Hi Justin
thanks so far. I try to find some wifi here in the office to use my notebook. In the meantime one more question: How does the mvn archetype:create command knows where to look for the appropriate archetype which is somewhere on my local machine? I don't see any reference between <geoserver_checkout> and <somewhere_else> directories.
Basically, it will local in your local maven repository. Usually in your
home directory under .m2/repository.
WHen you specify:
mvn archetype:create -DarchetypeGroupId=org.geoserver.maven \
-DarchetypeArtifactId=geoserver-archetype-wfsoutputformat \
-DarchetypeVersion=1.7.7-SNAPSHOT
It will look in the directory:
<HOME>/.m2/repository/org/geoserver/maven/geoserver-archetype-wfsoutputformat/1.7.7-SNAPSHOT
Now, let's say you don't have it installed locally. What will happen is:
a) if you are running the archetype from an existing maven project (ie a
directory that has a pom.xml), it will use any repositories defined in
the pom.xml.
b) if you are not running the archetype from an existing project it will
use the default public maven repository (http://repo1.maven.org/maven2/).
So to sum up, in the wfs output format tutorial the first step is to
build geoserver, which will put the archetype in the local repository.
Unfortunately the version on the wiki is old, and it references an old
version.
Hope that helps.
-Justin
regards
Stefanmit freundlichem Gruss
Stefan Ziegler----- Originalnachricht -----
Von: Justin Deoliveira <jdeolive@anonymised.com>
Gesendet: Fre, 2.10.2009 14:20
An: Ziegler Stefan <Stefan.Ziegler@anonymised.com>
Cc: geoserver-devel@lists.sourceforge.net
Betreff: Re: [Geoserver-devel] create wfs output formatHi Stefan,
So yeah, what i am suggesting is you do the following:
1) update from svn (1.7.x or 2.0.x, your choice)
2) do a full geoserver build (this will include the new archetype)
3) change the archetype version to 1.7.7-SNAPSHOT or 2.0-SNAPSHOT
(whichever version you choose to use)To verify i deleted all local jars for geoserver, geotools, and geoapi
from my local repository and did the following:cd <geoserver_checkout>/src
mvn clean install
cd <somewhere else>
mvn archetype:create -DarchetypeGroupId=org.geoserver.maven \
-DarchetypeArtifactId=geoserver-archetype-wfsoutputformat \
-DarchetypeVersion=1.7.7-SNAPSHOT -DgroupId=org.geoserver \
-DartifactId=csv
cd csv
mvn eclipse:eclipseI then loaded the csv project into eclipse with no problems.
Hope that helps.
-Justin
Ziegler Stefan wrote:
Hi Justin
I tried to use the version written in the tutorial (1.7.0.-SNAPSHOT). The maven archedtype:create command ends with the following error:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error creating from archetypeEmbedded error: org.apache.maven.archetype.downloader.DownloadNotFoundException: Requested download does not exist.
Unable to determine the release versionTry downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.geoserver.maven -DartifactId=geoserver-archetype-wfsoutputformat -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/fileAlternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.geoserver.maven -DartifactId=geoserver-archetype-wfsoutputformat -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]org.geoserver.maven:geoserver-archetype-wfsoutputformat:jar:RELEASE
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error creating from archetype
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:227)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
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: org.apache.maven.plugin.MojoExecutionException: Error creating from archetype
at org.apache.maven.archetype.mojos.MavenArchetypeMojo.execute(MavenArchetypeMojo.java:241)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
... 16 more
Caused by: org.apache.maven.archetype.exception.UnknownArchetype: org.apache.maven.archetype.downloader.DownloadNotFoundException: Requested download does not exist.
at org.apache.maven.archetype.common.DefaultArchetypeArtifactManager.getArchetypeFile(DefaultArchetypeArtifactManager.java:117)
at org.apache.maven.archetype.old.DefaultOldArchetype.createArchetype(DefaultOldArchetype.java:119)
at org.apache.maven.archetype.mojos.MavenArchetypeMojo.execute(MavenArchetypeMojo.java:230)
... 18 more
Caused by: org.apache.maven.archetype.downloader.DownloadNotFoundException: Requested download does not exist.
at org.apache.maven.archetype.downloader.DefaultDownloader.download(DefaultDownloader.java:63)
at org.apache.maven.archetype.common.DefaultArchetypeArtifactManager.getArchetypeFile(DefaultArchetypeArtifactManager.java:98)
... 20 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to determine the release versionTry downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.geoserver.maven -DartifactId=geoserver-archetype-wfsoutputformat -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/fileAlternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.geoserver.maven -DartifactId=geoserver-archetype-wfsoutputformat -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]org.geoserver.maven:geoserver-archetype-wfsoutputformat:jar:RELEASE
at org.apache.maven.artifact.transform.ReleaseArtifactTransformation.transformForResolve(ReleaseArtifactTransformation.java:53)
at org.apache.maven.artifact.transform.DefaultArtifactTransformationManager.transformForResolve(DefaultArtifactTransformationManager.java:57)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:129)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:74)
at org.apache.maven.archetype.downloader.DefaultDownloader.download(DefaultDownloader.java:55)
... 21 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Thu Oct 01 19:20:28 CEST 2009
[INFO] Final Memory: 9M/81M
[INFO] ------------------------------------------------------------------------So I used -DarchetypeVersion=1.7.0 which was the only one without getting the error. I build GeoServer from SVN and found some wfs-outputformat-2.0.jar (can't remember the precise name of the jar). Can I force maven to use this one instead (you see I'm really not familiar with this maven stuff :-)).
regards
Stefanmit freundlichem Gruss
Stefan Ziegler----- Originalnachricht -----
Von: Justin Deoliveira <jdeolive@anonymised.com>
Gesendet: Don, 1.10.2009 15:05
An: Ziegler Stefan <Stefan.Ziegler@anonymised.com>
Cc: geoserver-devel@lists.sourceforge.net
Betreff: Re: [Geoserver-devel] create wfs output formatHi Stefan,
The geoapi dependency *should* be getting dragged in transitively.
Although i guess depending on your local maven repository it might not be.What version of the archetype are you using? I just tweaked the
resulting pom in svn to add the opengeo repository to the resulting pom.
That might fix the problem. Are you running from svn? If so can you
update. If not i can send you an updated archetype jar.-Justin
Ziegler Stefan wrote:
Hi
I'm following the "Creating a WFS Output Format" tutorial [1] to create a new wfs output format but struggling a bit at step 4: Eclipse throws some errors in the import section since the org.opengis.feature.simple classes cannot be resolved/imported. Do I have to add them somehow?
[1]: http://geoserver.org/display/GEOSDOC/Creating+a+WFS+Output+Format
regards
Stefanmit freundlichem Gruss
Stefan Ziegler------------------------------------------------------------------------------
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
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.