nfms4redd / portal

NFMS web portal client
1 stars 1 forks source link

Compilation error from mvn command line #53

Closed Damianofds closed 10 years ago

Damianofds commented 10 years ago

Although the reference JDK is still oracle jdk6 I think is time to start to wonder to a openJDK7 migration... this is the first issue:

D:\work\code\portalFdsFork\src\main\java\org\fao\unredd\portal\TestServlet.java:[22,35] error: cannot find symbol

could not parse error message: symbol: method getServletContext() location: variable req of type HttpServletRequest D:\work\code\portalFdsFork\src\main\java\org\fao\unredd\layers\GeoserverDataLocator.java:131: warning: Uri is internal proprietary API and may be removed in a future release String path = new Uri(url).getPath(); ^

Compilation profile D:\work\code\portalFdsFork>mvn -version Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) Java version: 1.7.0_55 Java home: C:\Program Files\Java\jdk1.7.0_55\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows"

fergonco commented 10 years ago

Same error with this:

$ mvn -version Apache Maven 3.1.0 (893ca28a1da9d5f51ac03827af98bb730128f9f2; 2013-06-28 04:15:32+0200) Maven home: /home/fergonco/bin/apache-maven-3.1.0 Java version: 1.6.0_31, vendor: Sun Microsystems Inc. Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.2.0-65-generic", arch: "amd64", family: "unix"

I think it is related with compilation configuration. In eclipse this is a warning.

So Damiano's issue may not be related to jdk7. Anyways +1 to be compatible with last jdk.

Damianofds commented 10 years ago

mmmm me and Stefano are experiencing some strange behaviors compiling with maven although inside eclipse everything seems works... yes maybe is not a jdk7 related issue... It seems to me that the compiler pluging ( https://github.com/nfms4redd/portal/blob/develop/pom.xml#L140 ) isn't work in the proper way...

fergonco commented 10 years ago

I have identified the cause of the HttpServletRequest. It's related with #29. Look my last update there.

The other is just a beginners mistake I did. I assign this to me to fix it.

fergonco commented 10 years ago

Successfully compiled with jdk7 without these two mistakes, updating title.