[Geoserver-users] Building GeoServer with Eclipse

Often when a jar doesn't download, you just have to try again and it should work. But you have it working now so no biggie.

The first thing I see is that eclipse is only finding one project called 'Geoserver'. There should actually be around 10 projects that it finds (main, wms, wcs, wfs, maven, tests...). Did you run 'mvn eclipse:eclipse' from the root of the geoserver src directory?

You are correct that you can ignore the community module. It always has errors.

As for the geotools error though, that should not be there. Can you check your maven repository and see if the geotools jars are all available, or if they are even there. Maven should download these automatically for you, but it might be missing some. If the jars are there, try deleting all of the geotools jars in the repository and build again, sometimes that fixes things. If all else fails you can install geotools yourself and build it: http://docs.codehaus.org/display/GEOT/2+Building

Brent Owens
(The Open Planning Project)

Noorhoff, Ivo wrote:

Hi,

Here is my setup :
Windows XP Pro SP2
Java jdk1.6.0
GeoServer branch 1.5x revision 6327
Jai ImageIO 1.1
Eclipse-SDK-3.2.2

I've set the maven repository to : C:\Projecten\Repository

In the root of the source directory (C:\Projecten\GeoServer) I execute :
mvn clean
mvn compile
mvn install
mvn eclipse:eclipse

During the compile i can see the repository being filled.

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) javax.transaction:jta:jar:1.0.1B

  Try downloading the file manually from:
      http://java.sun.com/products/jta

  Then, install it using the command:
      mvn install:install-file -DgroupId=javax.transaction
-DartifactId=jta \
          -Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/file

  Path to dependency:
        1) org.geoserver:preference_core:jar:0.4
        2) org.springframework:spring-remoting:jar:1.2.5
        3) org.springframework:spring-dao:jar:1.2.5
        4) javax.transaction:jta:jar:1.0.1B

----------
1 required artifact is missing.

for artifact:
  org.geoserver:preference_core:jar:0.4

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)

I fix this :

mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta
-Dversion=1.0.1B -Dpackaging=jar
-Dfile=C:\Data\Downloads\jta-1_0_1B-classes.zip

And restart :
mvn compile

Next is the eclipse project
mvn eclipse:eclipse

Next I import the generated projects in eclipse:
Workspace -> Import -> General -> Existing Projects into workspace ->
Select root directory = "C:\Projecten\GeoServer\geoserver"

The Project box only shows one project : "geoServer". I select finish.

Next is :
Window -> Preferences -> Java / Build Path / Classpath Variables -> New
"M2_REPO" as "C:/Projecten/Repository"

I also change the compiler compliance level to 6.0 (Java / Compiler ->
Compiler Compliance Level = 6.0)

And in the Project Properties I enable annotation processing.

Eclipse builds the workspace. Building genetrates 145 errors. The first
of those are in the "community" branch which I understand is not
guaranteed to build. The next relevant one is :

Severity and Description Path Resource Location
Creation Time Id
FilterBuilder cannot be resolved
geoServer/main/src/main/java/org/vfny/geoserver/util/requests/readers
KvpRequestReader.java line 516 1174065394812 2887

In the imports of this file I can see that "org.geotools.txt" cannot be
resolved.

Any hints or tips would be welcome !

Cheers, Ivo

-----Oorspronkelijk bericht-----
Van: Brent Owens [mailto:brentowens@anonymised.com] Verzonden: Friday, March 16, 2007 16:56
Aan: Noorhoff, Ivo
CC: geoserver users
Onderwerp: Re: Building GeoServer with Eclipse

Hi
You just need the M2_REPO, not the other one.
GeoServer will download the appropriate jars for Spring and Struts so
you don't need to do it by hand. The only thing you need is Maven.
Any eclipse 3 should work.

Are you getting errors when you are trying to set up geoserver in
eclipse?

cheers,

Brent Owens
(The Open Planning Project)

Noorhoff, Ivo wrote:
  

Hi,

I'm trying to build GeoServer with eclipse following this guide (http://docs.codehaus.org/display/GEOSDOC/5+Eclipse ) and I have the impression some assumpions are made that are not described in the document.

With plain vanilla eclipse, I have no tomcat, struts or spring. However
(http://docs.codehaus.org/download/attachments/31528/preferences.png)
shows spring and struts in the classpath. There are also two maven repositories (M2_REPO and MAVEN_REPO).

Is there a specific Eclipse distro I need ? Are there things I have to
    
install before following this guide ?

Kind Regards,

Met vriendelijke groet,
Grontmij Nederland bv

Ivo Noorhoff
Systeemontwikkelaar GIS
_______________________________________________
B Bovendonk 29, 4707 ZH Roosendaal
P Postbus 1747, 4700 BS Roosendaal
T +31 165 57 57 21 F + 31 165 56 13 68
E ivo.noorhoff@anonymised.com
W http://www.grontmij.com
_______________________________________________

<< Please read our E-mail Disclaimer at http://emaildisclaimer.grontmij.com >>

<< Please read our E-mail Disclaimer at http://emaildisclaimer.grontmij.com >>

<< Please read our E-mail Disclaimer at http://emaildisclaimer.grontmij.com >>

<< Please read our E-mail Disclaimer at http://emaildisclaimer.grontmij.com >>