[Geoserver-devel] Build with Maven fails

Dear developers,

some days ago I opened a request for a feature:

https://osgeo-org.atlassian.net/browse/GEOS-7914

Now I wanted to follow the invitation to test the new feature but I do have some problems to get it running.

I followed the instruction from http://docs.geoserver.org/latest/en/developer/quickstart/index.html#build-with-maven

two times.

First of all I tried to use the fork from https://github.com/bradh/geoserver/tree/geos7914

The second time I followed the instruction and used the geoserver respository given in the instructions.

In both cases mvn clean install was successfully

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary:

[INFO]

[INFO] GeoServer … SUCCESS [ 13.813 s]

[INFO] Core Platform Module … SUCCESS [ 26.618 s]

[INFO] Open Web Service Module … SUCCESS [ 23.803 s]

[INFO] Main Module … SUCCESS [04:51 min]

[INFO] GeoServer Security Modules … SUCCESS [ 1.688 s]

[INFO] GeoServer JDBC Security Module … SUCCESS [ 35.510 s]

[INFO] GeoServer LDAP Security Module … SUCCESS [03:00 min]

[INFO] Web Coverage Service Module … SUCCESS [ 3.015 s]

[INFO] Web Coverage Service 1.0 Module … SUCCESS [ 24.704 s]

[INFO] Web Coverage Service 1.1 Module … SUCCESS [ 27.004 s]

[INFO] Web Coverage Service 2.0 Module … SUCCESS [ 56.278 s]

[INFO] Web Feature Service Module … SUCCESS [01:39 min]

[INFO] Web Map Service Module … SUCCESS [02:53 min]

[INFO] KML support for GeoServer … SUCCESS [ 32.195 s]

[INFO] GeoWebCache (GWC) Module … SUCCESS [01:06 min]

[INFO] REST Support Module … SUCCESS [ 14.776 s]

[INFO] REST Configuration Service Module … SUCCESS [01:12 min]

[INFO] GeoServer Web Modules … SUCCESS [ 0.076 s]

[INFO] Core UI Module … SUCCESS [01:17 min]

[INFO] WMS UI Module … SUCCESS [ 26.978 s]

[INFO] GWC UI Module … SUCCESS [ 39.033 s]

[INFO] WFS UI Module … SUCCESS [ 10.826 s]

[INFO] Demos Module … SUCCESS [ 19.721 s]

[INFO] WCS UI Module … SUCCESS [ 14.269 s]

[INFO] Security UI Modules … SUCCESS [ 0.060 s]

[INFO] Security UI Core Module … SUCCESS [01:51 min]

[INFO] Security UI JDBC Module … SUCCESS [01:26 min]

[INFO] Security UI LDAP Module … SUCCESS [01:34 min]

[INFO] REST UI Module … SUCCESS [ 12.147 s]

[INFO] GeoServer Web Application … SUCCESS [ 22.329 s]

[INFO] Community Space … SUCCESS [ 1.304 s]

[INFO] GeoServer Extensions … SUCCESS [ 0.037 s]

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 27:40 min

[INFO] Finished at: 2016-12-28T13:50:03+01:00

[INFO] Final Memory: 77M/319M

[INFO] ------------------------------------------------------------------------

During the import into eclipse I get the following error:

Errors occurred during the build.

Errors running builder ‘Java Builder’ on project ‘gs-main’.

java.lang.NullPointerException

If I try to run the web-app as a java application despite the error I get:

at org.geoserver.web.Start.main(Start.java:122)

Caused by: java.lang.Error: Unresolved compilation problems:

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, annotations are only available if source level is 1.5 or greater

Syntax error, ‘for each’ statements are only available if source level is 1.5 or greater

Type mismatch: cannot convert from Boolean to boolean

The method putSystemDefault(RenderingHints.Key, Object) in the type Hints is not applicable for the arguments (Hints.Key, boolean)

The method putSystemDefault(RenderingHints.Key, Object) in the type Hints is not applicable for the arguments (Hints.DoubleKey, double)

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, ‘for each’ statements are only available if source level is 1.5 or greater

The method getMethod(String, Class[]) in the type Class is not applicable for the arguments (String)

The method invoke(Object, Object[]) in the type Method is not applicable for the arguments (null)

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, ‘for each’ statements are only available if source level is 1.5 or greater

Syntax error, ‘for each’ statements are only available if source level is 1.5 or greater

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, ‘for each’ statements are only available if source level is 1.5 or greater

Currently I do not have any further idea how to solve this problem.

Some information about my system:

  • OS: Ubuntu 16.04 LTS

  • Java Path: /usr/lib/jvm/java-8-oracle

  • Java info:

java version “1.8.0_111”

Java™ SE Runtime Environment (build 1.8.0_111-b14)

Java HotSpot™ 64-Bit Server VM (build 25.111-b14, mixed mode)

  • Maven info:

Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_111, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: “linux”, version: “4.4.0-57-generic”, arch: “amd64”, family: “unix”

Can anybody see my mistake and point it out to me? I would be very happy.

Kind regards

Niklas

Hi NIcklas,
“during the import in eclipse” is probably the key factor. How did you import in eclipse?
I don’t think anybody is using the native eclipse maven support as it’s too slow to develop again
with a large project such as GeoServer.
Did you try this? http://docs.geoserver.org/latest/en/developer/maven-guide/index.html#eclipse

Also, from the errors it seems you have something (the IDE maybe) setup to work with
java 5, but GeoServer requires Java 8 as a minimum

Cheers
Andrea

···

On Wed, Dec 28, 2016 at 2:42 PM, Niklas Trzaska <niklastrzaska@anonymised.com> wrote:

Dear developers,

some days ago I opened a request for a feature:

https://osgeo-org.atlassian.net/browse/GEOS-7914

Now I wanted to follow the invitation to test the new feature but I do have some problems to get it running.

I followed the instruction from http://docs.geoserver.org/latest/en/developer/quickstart/index.html#build-with-maven

two times.

First of all I tried to use the fork from https://github.com/bradh/geoserver/tree/geos7914

The second time I followed the instruction and used the geoserver respository given in the instructions.

In both cases mvn clean install was successfully

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary:

[INFO]

[INFO] GeoServer … SUCCESS [ 13.813 s]

[INFO] Core Platform Module … SUCCESS [ 26.618 s]

[INFO] Open Web Service Module … SUCCESS [ 23.803 s]

[INFO] Main Module … SUCCESS [04:51 min]

[INFO] GeoServer Security Modules … SUCCESS [ 1.688 s]

[INFO] GeoServer JDBC Security Module … SUCCESS [ 35.510 s]

[INFO] GeoServer LDAP Security Module … SUCCESS [03:00 min]

[INFO] Web Coverage Service Module … SUCCESS [ 3.015 s]

[INFO] Web Coverage Service 1.0 Module … SUCCESS [ 24.704 s]

[INFO] Web Coverage Service 1.1 Module … SUCCESS [ 27.004 s]

[INFO] Web Coverage Service 2.0 Module … SUCCESS [ 56.278 s]

[INFO] Web Feature Service Module … SUCCESS [01:39 min]

[INFO] Web Map Service Module … SUCCESS [02:53 min]

[INFO] KML support for GeoServer … SUCCESS [ 32.195 s]

[INFO] GeoWebCache (GWC) Module … SUCCESS [01:06 min]

[INFO] REST Support Module … SUCCESS [ 14.776 s]

[INFO] REST Configuration Service Module … SUCCESS [01:12 min]

[INFO] GeoServer Web Modules … SUCCESS [ 0.076 s]

[INFO] Core UI Module … SUCCESS [01:17 min]

[INFO] WMS UI Module … SUCCESS [ 26.978 s]

[INFO] GWC UI Module … SUCCESS [ 39.033 s]

[INFO] WFS UI Module … SUCCESS [ 10.826 s]

[INFO] Demos Module … SUCCESS [ 19.721 s]

[INFO] WCS UI Module … SUCCESS [ 14.269 s]

[INFO] Security UI Modules … SUCCESS [ 0.060 s]

[INFO] Security UI Core Module … SUCCESS [01:51 min]

[INFO] Security UI JDBC Module … SUCCESS [01:26 min]

[INFO] Security UI LDAP Module … SUCCESS [01:34 min]

[INFO] REST UI Module … SUCCESS [ 12.147 s]

[INFO] GeoServer Web Application … SUCCESS [ 22.329 s]

[INFO] Community Space … SUCCESS [ 1.304 s]

[INFO] GeoServer Extensions … SUCCESS [ 0.037 s]

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 27:40 min

[INFO] Finished at: 2016-12-28T13:50:03+01:00

[INFO] Final Memory: 77M/319M

[INFO] ------------------------------------------------------------------------

During the import into eclipse I get the following error:

Errors occurred during the build.

Errors running builder ‘Java Builder’ on project ‘gs-main’.

java.lang.NullPointerException

If I try to run the web-app as a java application despite the error I get:

at org.geoserver.web.Start.main(Start.java:122)

Caused by: java.lang.Error: Unresolved compilation problems:

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, annotations are only available if source level is 1.5 or greater

Syntax error, ‘for each’ statements are only available if source level is 1.5 or greater

Type mismatch: cannot convert from Boolean to boolean

The method putSystemDefault(RenderingHints.Key, Object) in the type Hints is not applicable for the arguments (Hints.Key, boolean)

The method putSystemDefault(RenderingHints.Key, Object) in the type Hints is not applicable for the arguments (Hints.DoubleKey, double)

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, ‘for each’ statements are only available if source level is 1.5 or greater

The method getMethod(String, Class[]) in the type Class is not applicable for the arguments (String)

The method invoke(Object, Object[]) in the type Method is not applicable for the arguments (null)

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, ‘for each’ statements are only available if source level is 1.5 or greater

Syntax error, ‘for each’ statements are only available if source level is 1.5 or greater

Syntax error, parameterized types are only available if source level is 1.5 or greater

Syntax error, ‘for each’ statements are only available if source level is 1.5 or greater

Currently I do not have any further idea how to solve this problem.

Some information about my system:

  • OS: Ubuntu 16.04 LTS

  • Java Path: /usr/lib/jvm/java-8-oracle

  • Java info:

java version “1.8.0_111”

Java™ SE Runtime Environment (build 1.8.0_111-b14)

Java HotSpot™ 64-Bit Server VM (build 25.111-b14, mixed mode)

  • Maven info:

Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_111, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: “linux”, version: “4.4.0-57-generic”, arch: “amd64”, family: “unix”

Can anybody see my mistake and point it out to me? I would be very happy.

Kind regards

Niklas


Check out the vibrant tech community on one of the world’s most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


Geoserver-devel mailing list
Geoserver-devel@anonymised.com.366…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Niklas,

I use the Maven Eclipse plugin to generate project information and then in Eclipse I use Import / Existing Projects into Workspace. I run this command in the top-level src directory:

mvn -DdownloadSources eclipse:clean eclipse:eclipse

Be sure to run this command from the top-level src directory to ensure that dependencies between GeoServer modules are resolved as dependencies inside your Eclipse workspace and not as dependencies on artifacts in your Maven repository.

Kind regards,
Ben.

On 29/12/16 02:42, Niklas Trzaska wrote:

Dear developers,

some days ago I opened a request for a feature:

https://osgeo-org.atlassian.net/browse/GEOS-7914

Now I wanted to follow the invitation to test the new feature but I do have
some problems to get it running.

I followed the instruction from
http://docs.geoserver.org/latest/en/developer/quickstart/index.html#build-with-maven

two times.

First of all I tried to use the fork from
https://github.com/bradh/geoserver/tree/geos7914

The second time I followed the instruction and used the geoserver
respository given in the instructions.

In both cases *mvn clean install* was successfully

[INFO]
------------------------------------------------------------------------

[INFO] Reactor Summary:

[INFO]

[INFO] GeoServer .......................................... SUCCESS [
13.813 s]

[INFO] Core Platform Module ............................... SUCCESS [
26.618 s]

[INFO] Open Web Service Module ............................ SUCCESS [
23.803 s]

[INFO] Main Module ........................................ SUCCESS [04:51
min]

[INFO] GeoServer Security Modules ......................... SUCCESS [ 1.688
s]

[INFO] GeoServer JDBC Security Module ..................... SUCCESS [
35.510 s]

[INFO] GeoServer LDAP Security Module ..................... SUCCESS [03:00
min]

[INFO] Web Coverage Service Module ........................ SUCCESS [ 3.015
s]

[INFO] Web Coverage Service 1.0 Module .................... SUCCESS [
24.704 s]

[INFO] Web Coverage Service 1.1 Module .................... SUCCESS [
27.004 s]

[INFO] Web Coverage Service 2.0 Module .................... SUCCESS [
56.278 s]

[INFO] Web Feature Service Module ......................... SUCCESS [01:39
min]

[INFO] Web Map Service Module ............................. SUCCESS [02:53
min]

[INFO] KML support for GeoServer .......................... SUCCESS [
32.195 s]

[INFO] GeoWebCache (GWC) Module ........................... SUCCESS [01:06
min]

[INFO] REST Support Module ................................ SUCCESS [
14.776 s]

[INFO] REST Configuration Service Module .................. SUCCESS [01:12
min]

[INFO] GeoServer Web Modules .............................. SUCCESS [ 0.076
s]

[INFO] Core UI Module ..................................... SUCCESS [01:17
min]

[INFO] WMS UI Module ...................................... SUCCESS [
26.978 s]

[INFO] GWC UI Module ...................................... SUCCESS [
39.033 s]

[INFO] WFS UI Module ...................................... SUCCESS [
10.826 s]

[INFO] Demos Module ....................................... SUCCESS [
19.721 s]

[INFO] WCS UI Module ...................................... SUCCESS [
14.269 s]

[INFO] Security UI Modules ................................ SUCCESS [ 0.060
s]

[INFO] Security UI Core Module ............................ SUCCESS [01:51
min]

[INFO] Security UI JDBC Module ............................ SUCCESS [01:26
min]

[INFO] Security UI LDAP Module ............................ SUCCESS [01:34
min]

[INFO] REST UI Module ..................................... SUCCESS [
12.147 s]

[INFO] GeoServer Web Application .......................... SUCCESS [
22.329 s]

[INFO] Community Space .................................... SUCCESS [ 1.304
s]

[INFO] GeoServer Extensions ............................... SUCCESS [ 0.037
s]

[INFO]
------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO]
------------------------------------------------------------------------

[INFO] Total time: 27:40 min

[INFO] Finished at: 2016-12-28T13:50:03+01:00

[INFO] Final Memory: 77M/319M

[INFO]
------------------------------------------------------------------------

During the import into eclipse I get the following error:

*Errors occurred during the build.*

*Errors running builder 'Java Builder' on project 'gs-main'.*

*java.lang.NullPointerException*

If I try to run the web-app as a java application despite the error I get:

* at org.geoserver.web.Start.main(Start.java:122)*

*Caused by: java.lang.Error: Unresolved compilation problems: *

* Syntax error, parameterized types are only available if source level is
1.5 or greater*

* Syntax error, annotations are only available if source level is 1.5 or
greater*

* Syntax error, 'for each' statements are only available if source level is
1.5 or greater*

* Type mismatch: cannot convert from Boolean to boolean*

* The method putSystemDefault(RenderingHints.Key, Object) in the type Hints
is not applicable for the arguments (Hints.Key, boolean)*

* The method putSystemDefault(RenderingHints.Key, Object) in the type Hints
is not applicable for the arguments (Hints.DoubleKey, double)*

* Syntax error, parameterized types are only available if source level is
1.5 or greater*

* Syntax error, parameterized types are only available if source level is
1.5 or greater*

* Syntax error, parameterized types are only available if source level is
1.5 or greater*

* Syntax error, parameterized types are only available if source level is
1.5 or greater*

* Syntax error, 'for each' statements are only available if source level is
1.5 or greater*

* The method getMethod(String, Class) in the type Class is not applicable
for the arguments (String)*

* The method invoke(Object, Object) in the type Method is not applicable
for the arguments (null)*

* Syntax error, parameterized types are only available if source level is
1.5 or greater*

* Syntax error, parameterized types are only available if source level is
1.5 or greater*

* Syntax error, parameterized types are only available if source level is
1.5 or greater*

* Syntax error, 'for each' statements are only available if source level is
1.5 or greater*

* Syntax error, 'for each' statements are only available if source level is
1.5 or greater*

* Syntax error, parameterized types are only available if source level is
1.5 or greater*

* Syntax error, 'for each' statements are only available if source level is
1.5 or greater*

Currently I do not have any further idea how to solve this problem.

Some information about my system:

- OS: Ubuntu 16.04 LTS

- Java Path: /usr/lib/jvm/java-8-oracle

- Java info:

java version "1.8.0_111"

Java(TM) SE Runtime Environment (build 1.8.0_111-b14)

Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

- Maven info:
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_111, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-57-generic", arch: "amd64", family: "unix"

Can anybody see my mistake and point it out to me? I would be very happy.

Kind regards

Niklas

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand