Hi all,
I'm trying to build geoserver from source so that I'll have a starting point
for writing a plugin. Let me say from the outset that this is unfamiliar
territory: I've never used maven, jetty, or any of the associated paraphernalia
before.
What I'm doing seems like it should be simple, but things keep going wrong. I
checked out the source with:
svn co http://svn.codehaus.org/geoserver/branches/1.7.x geoserver-1.7.x
I'm trying to compile with:
cd geoserver-1.7.x/src
mvn compile
I end up with the following error:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) org.geoserver:ows:jar:tests:1.7.3-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.geoserver -DartifactId=ows -Dversion=1.7.3-SNAPSHOT -Dclassifier=tests -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.geoserver -DartifactId=ows -Dversion=1.7.3-SNAPSHOT -Dclassifier=tests -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) org.geoserver:wms:jar:1.7.3-SNAPSHOT
2) org.geoserver:ows:jar:tests:1.7.3-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
org.geoserver:wms:jar:1.7.3-SNAPSHOT
What am I doing wrong? I can see from the hudson server that this code branch
passes automated build tests. I've tried manually finding the missing jar file
on-line and installing it as described in the error message, but then I run
into another missing artifact and another, ad infinitum. What am I missing?
Any help would be greatly appreciated!
-Eric
--
Eric W. Anderson University of Colorado
eric.anderson@anonymised.com Dept. of Computer Science
phone: +1-720-984-8864 Systems Research Lab - ECCR 1B54
PGP key fingerprints:
personal: 1BD4 CFCE 8B59 8D6E EA3E EBD5 4DC9 3E61 656C 462B
academic: D3C5 D6FF EDED 9F1F C36D 53A3 74B7 53A6 3C74 5F12
Hi Eric,
You actually have to do an "install" rather than "compile". The reason being that there are modules that depend on other modules for test code, in addition to just regular code. "compile" just complies the regular source code (non-tests). Whereas install will compile both regular code and test code, and install it in your local maven repository.
The command I usually build with is "mvn clean install".
Let us know if that does not work for you.
-Justin
Eric W Anderson wrote:
Hi all,
I'm trying to build geoserver from source so that I'll have a starting point
for writing a plugin. Let me say from the outset that this is unfamiliar
territory: I've never used maven, jetty, or any of the associated paraphernalia
before.
What I'm doing seems like it should be simple, but things keep going wrong. I
checked out the source with:
svn co http://svn.codehaus.org/geoserver/branches/1.7.x geoserver-1.7.x
I'm trying to compile with:
cd geoserver-1.7.x/src
mvn compile
I end up with the following error:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) org.geoserver:ows:jar:tests:1.7.3-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command: mvn install:install-file -DgroupId=org.geoserver -DartifactId=ows -Dversion=1.7.3-SNAPSHOT -Dclassifier=tests -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.geoserver -DartifactId=ows -Dversion=1.7.3-SNAPSHOT -Dclassifier=tests -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency: 1) org.geoserver:wms:jar:1.7.3-SNAPSHOT
2) org.geoserver:ows:jar:tests:1.7.3-SNAPSHOT
----------
1 required artifact is missing.
for artifact: org.geoserver:wms:jar:1.7.3-SNAPSHOT
What am I doing wrong? I can see from the hudson server that this code branch
passes automated build tests. I've tried manually finding the missing jar file
on-line and installing it as described in the error message, but then I run
into another missing artifact and another, ad infinitum. What am I missing?
Any help would be greatly appreciated!
-Eric
------------------------------------------------------------------------
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
Hi Eric,
Glad it is working. So basically what you have to do is build the release artifacts. You will get the binary and war artifact, one of which you can deploy to your server.
The entire release process is documented in detail here:
http://gridlock.openplans.org/geoserver/1.7.x/doc/developer/release-guide.html
But you probably will only care about this section:
http://gridlock.openplans.org/geoserver/1.7.x/doc/developer/release-guide.html#build-release-artifacts
To sum up:
From the root:
1) mvn -P release clean install
2) mvn assembly:attached
If you want to include a custom data directory you need to specify the configId and configDirectory flags in step 1. Example:
mvn -DconfigId=myDataDirectory
-DconfigDirectory=/location/where/i/keep/data/directories
-P release clean install
Hope that helps.
-Justin
Eric W Anderson wrote:
Hi Justin,
Thanks for your help! It seems to be building perfectly now, but that brings
me to another maven and/or web services newbie question: How do I move
geoserver from being installed in my local maven repository (looks like a
directory tree under ~/.m2/repository/) to being installed on my web server?
Is there a tar/jar/war/zip somewhere that I can copy to the appropriate machine
and directory?
Thanks again,
Eric
Thus spake Justin Deoliveira (jdeolive@anonymised.com):
Hi Eric,
You actually have to do an "install" rather than "compile". The reason being that there are modules that depend on other modules for test code, in addition to just regular code. "compile" just complies the regular source code (non-tests). Whereas install will compile both regular code and test code, and install it in your local maven repository.
The command I usually build with is "mvn clean install".
Let us know if that does not work for you.
-Justin
Eric W Anderson wrote:
Hi all,
I'm trying to build geoserver from source so that I'll have a starting point
for writing a plugin. Let me say from the outset that this is unfamiliar
territory: I've never used maven, jetty, or any of the associated paraphernalia
before.
What I'm doing seems like it should be simple, but things keep going wrong. I
checked out the source with:
svn co http://svn.codehaus.org/geoserver/branches/1.7.x geoserver-1.7.x
I'm trying to compile with:
cd geoserver-1.7.x/src
mvn compile
I end up with the following error:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) org.geoserver:ows:jar:tests:1.7.3-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command: mvn install:install-file -DgroupId=org.geoserver -DartifactId=ows -Dversion=1.7.3-SNAPSHOT -Dclassifier=tests -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.geoserver -DartifactId=ows -Dversion=1.7.3-SNAPSHOT -Dclassifier=tests -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency: 1) org.geoserver:wms:jar:1.7.3-SNAPSHOT
2) org.geoserver:ows:jar:tests:1.7.3-SNAPSHOT
----------
1 required artifact is missing.
for artifact: org.geoserver:wms:jar:1.7.3-SNAPSHOT
What am I doing wrong? I can see from the hudson server that this code branch
passes automated build tests. I've tried manually finding the missing jar file
on-line and installing it as described in the error message, but then I run
into another missing artifact and another, ad infinitum. What am I missing?
Any help would be greatly appreciated!
-Eric
------------------------------------------------------------------------
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.