[Geoserver-devel] build fails on Windows XP (trunk and 2.0.1)

I am trying to do development in the
http://svn.codehaus.org/geoserver/trunk/src/community/restconfig-java/
module. I tried building just that module, but there are apparently a few things used from the rest of the code. So I have been trying to build all of geoserver following the instructions in the manual. I am on Windows XP, using maven from command line, I get the following after running mvn install:

...
Tests in error:
  org.geoserver.catalog.impl.CatalogBuilderTest
  testFullAccess(org.geoserver.security.SecureCatalogIntegrationTest)
  testCannotRead(org.geoserver.security.SecureCatalogIntegrationTest)
  testCannotWrite(org.geoserver.security.SecureCatalogIntegrationTest)

Tests run: 227, Failures: 0, Errors: 4, Skipped: 0
...
I get essentially the same thing with the trunk and the 2.0.1 tag. I searched the archives, and there are similar errors every now and again, but I didn't see what I should do about it, if anything.

Any suggestions are welcome.

But on a deeper level, I don't see why it should be necessary to build all of geoserver when all I want is to run a little java program to use the Rest interface on a geoserver installed elsewhere?

--
Tara Athan
Owner, Athan Ecological Reconciliation Services
tara_athan at alt2is.com
707-272-2115 (cell, preferred)
707-485-1198 (office)
249 W. Gobbi St. #A
Ukiah, CA 95482

Tara Athan ha scritto:

I am trying to do development in the
http://svn.codehaus.org/geoserver/trunk/src/community/restconfig-java/
module. I tried building just that module, but there are apparently a few things used from the rest of the code.

You did not say what is wrong with it. In theory you should be able to
build the module stand alone, the dependencies should be pulled
from the repositories.

Tried to build it and.. wow, lots of errors.
The pom.xml referred to the wrong versions of GeoServer (a package
on trunk cannot refer 2.0 artifacts), did not contain a reference
to the Jersey maven repository, did not contain a dependency to
JUnit. There was also some Java 6 API usage, where code is supposed
to be built with java 5 instead. Well, no surprise it was not building.

I've fixed the errors and now the package builds, even on an empty
local repository. Just svn up and you should be good (it will download a truckload of packages and maybe they are not even necessary, but
that's as much as I can do for the moment).

So I have been trying to build all of geoserver following the instructions in the manual. I am on Windows XP, using maven from command line, I get the following after running mvn install:

...
Tests in error:
  org.geoserver.catalog.impl.CatalogBuilderTest
  testFullAccess(org.geoserver.security.SecureCatalogIntegrationTest)
  testCannotRead(org.geoserver.security.SecureCatalogIntegrationTest)
  testCannotWrite(org.geoserver.security.SecureCatalogIntegrationTest)

Tests run: 227, Failures: 0, Errors: 4, Skipped: 0
...
I get essentially the same thing with the trunk and the 2.0.1 tag. I searched the archives, and there are similar errors every now and again, but I didn't see what I should do about it, if anything.

Unfortunately Windows is not a popular OS among GS developers (not
sure if there is still someone actively developing on GS core using it).

But... my guess is that the issue might be the version of the JDK
used. GeoServer is supposed to be built on Sun Java 1.5 series, not on
Java 6, in order to preserve backwards compatibility.
Sometimes there are subtle differences between the two JDKs that make
the build fail...

Ok, just tried a full build of the 2.0.x code on Java 6 (on Ubuntu 64bit)... humm... it worked without a glitch. So... dunno.

We have tried to have a automated build bot on Windows time ago but
the VM it was running on broke badly and we did not have the time
necessary to rebuild everything from scratch so it just died there.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Have you tried running

mvn clean install

It worked for me when i built the rest module on Windows XP SP3 with Java 1.6.0_19 and maven 2.1.1. My maven repo was empty.

Am 11.04.2010 um 01:39 schrieb Tara Athan:

I am trying to do development in the
http://svn.codehaus.org/geoserver/trunk/src/community/restconfig-java/
module. I tried building just that module, but there are apparently a
few things used from the rest of the code. So I have been trying to
build all of geoserver following the instructions in the manual. I am on
Windows XP, using maven from command line, I get the following after
running mvn install:

...
Tests in error:
org.geoserver.catalog.impl.CatalogBuilderTest
testFullAccess(org.geoserver.security.SecureCatalogIntegrationTest)
testCannotRead(org.geoserver.security.SecureCatalogIntegrationTest)
testCannotWrite(org.geoserver.security.SecureCatalogIntegrationTest)

Tests run: 227, Failures: 0, Errors: 4, Skipped: 0
...
I get essentially the same thing with the trunk and the 2.0.1 tag. I
searched the archives, and there are similar errors every now and again,
but I didn't see what I should do about it, if anything.

Any suggestions are welcome.

But on a deeper level, I don't see why it should be necessary to build
all of geoserver when all I want is to run a little java program to use
the Rest interface on a geoserver installed elsewhere?

--
Tara Athan
Owner, Athan Ecological Reconciliation Services
tara_athan at alt2is.com
707-272-2115 (cell, preferred)
707-485-1198 (office)
249 W. Gobbi St. #A
Ukiah, CA 95482

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Andrea,

We develop everything using Java 1.6 internally here and I probably forgot to include the Jersey maven repository since everything builds fine here through our artifactory.

That won't happen again I'm sure.

I have some updates to the API SDK as well that I will be making to the trunk soon.

Something I've always noticed is that the restconfig api changes ever so slightly in every build of Geoserver. Therefore, I always end up having to test all of the code all over again with every upgrade that your team puts out.

Another thing is that I could never find a WADL or some kind of document that lists ALL of the possible JSON/XML coming back from the RESTConfig service. There just isn't anything authoritative that lists every possible combination of return values coming back.

Therefore, the API is a best guess put together thing (with Justin's help) that met my needs.

Ronak

-----Original Message-----
From: Andrea Aime [mailto:aaime@anonymised.com]
Sent: Sunday, April 11, 2010 1:35 AM
To: tara_athan@anonymised.com
Cc: geoserver-devel@lists.sourceforge.net; Patel, Ronak Avinash (US SSA)
Subject: Re: [Geoserver-devel] build fails on Windows XP (trunk and 2.0.1)

Tara Athan ha scritto:

I am trying to do development in the
http://svn.codehaus.org/geoserver/trunk/src/community/restconfig-java/
module. I tried building just that module, but there are apparently a
few things used from the rest of the code.

You did not say what is wrong with it. In theory you should be able to
build the module stand alone, the dependencies should be pulled
from the repositories.

Tried to build it and.. wow, lots of errors.
The pom.xml referred to the wrong versions of GeoServer (a package
on trunk cannot refer 2.0 artifacts), did not contain a reference
to the Jersey maven repository, did not contain a dependency to
JUnit. There was also some Java 6 API usage, where code is supposed
to be built with java 5 instead. Well, no surprise it was not building.

I've fixed the errors and now the package builds, even on an empty
local repository. Just svn up and you should be good (it will download a
truckload of packages and maybe they are not even necessary, but
that's as much as I can do for the moment).

So I have been trying to
build all of geoserver following the instructions in the manual. I am on
Windows XP, using maven from command line, I get the following after
running mvn install:

...
Tests in error:
  org.geoserver.catalog.impl.CatalogBuilderTest
  testFullAccess(org.geoserver.security.SecureCatalogIntegrationTest)
  testCannotRead(org.geoserver.security.SecureCatalogIntegrationTest)
  testCannotWrite(org.geoserver.security.SecureCatalogIntegrationTest)

Tests run: 227, Failures: 0, Errors: 4, Skipped: 0
...
I get essentially the same thing with the trunk and the 2.0.1 tag. I
searched the archives, and there are similar errors every now and again,
but I didn't see what I should do about it, if anything.

Unfortunately Windows is not a popular OS among GS developers (not
sure if there is still someone actively developing on GS core using it).

But... my guess is that the issue might be the version of the JDK
used. GeoServer is supposed to be built on Sun Java 1.5 series, not on
Java 6, in order to preserve backwards compatibility.
Sometimes there are subtle differences between the two JDKs that make
the build fail...

Ok, just tried a full build of the 2.0.x code on Java 6 (on Ubuntu
64bit)... humm... it worked without a glitch. So... dunno.

We have tried to have a automated build bot on Windows time ago but
the VM it was running on broke badly and we did not have the time
necessary to rebuild everything from scratch so it just died there.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.