[Geoserver-devel] ERROR - Build Geoserver 2.3.1 with Maven 2.2.1

Hello, I am new developing in Geoserver 2.3.1 and triying to build it with maven Apache Maven 2.2.1 (rdebian-1)
  but it shows the following error:

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The API of the mojo scanner is not compatible with this plugin version. Please check the plugin dependencies configured in the POM and ensure the versions match.

Embedded error: org.apache.maven.tools.plugin.scanner.MojoScanner.populatePluginDescriptor(Lorg/apache/maven/tools/plugin/PluginToolsRequest;)V

I have tried several solutions found it on the Internet, but after proved it didn't work. Has anybody compiled Geoserver 2.3.1 with Maven 2.2.1 successfully? Have you got any idea how to solve this problem?

Thanks in advance,

On Thu, Apr 26, 2012 at 9:37 AM, Eduardo de la Montaña <
emontana@anonymised.com> wrote:

Hello, I am new developing in Geoserver 2.3.1 and triying to build it with
maven Apache Maven 2.2.1 (rdebian-1)
but it shows the following error:

[INFO] ------------------------------**------------------------------**
------------
[ERROR] BUILD ERROR
[INFO] ------------------------------**------------------------------**
------------
[INFO] The API of the mojo scanner is not compatible with this plugin
version. Please check the plugin dependencies configured in the POM and
ensure the versions match.

I build with 2.2.1, but using the official version, not the debian packaged
one:

mvn --version
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_27
Java home: /usr/lib/jvm/jdk1.6.0_27/jre
Default locale: it_IT, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-41-generic" arch: "amd64" Family: "unix"

Cheers
Andrea

--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------

Hi again, I am going to answer myself. I have solved the problem using an old Maven version, 2.0.11, after setting the following environment variables:

export M2_HOME=<dir_apache_maven>/apache-maven-2.0.11
export M2=$M2_HOME/bin
export MAVEN_OPTS=“-Xms256m -Xmx512m”
export PATH=$M2:$PATH
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24
export PATH=$JAVA_HOME/bin:$PATH
mvn -DskipTests clean install

Geoserver 2.3.3 is build successfully now.

Regards,

Eduardo

GeoServer is built on GeoTools, which warns against Apache Maven 2.2.1 (rdebian-1).

"It is very tempting to use apt-get to install maven, ubuntu users I am looking at you! Please be careful of the maven provided out of the box by unbuntu: Apache Maven 2.2.1 (rdebian-1) It is not actually apache maven as provided by apache"
http://docs.geotools.org/latest/userguide/advanced/build/install/mvn.html#do-not-use-apt-get

On 26/04/12 15:37, Eduardo de la Montaña wrote:

Hello, I am new developing in Geoserver 2.3.1 and triying to build it
with maven Apache Maven 2.2.1 (rdebian-1)
   but it shows the following error:

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] The API of the mojo scanner is not compatible with this plugin
version. Please check the plugin dependencies configured in the POM and
ensure the versions match.

Embedded error:
org.apache.maven.tools.plugin.scanner.MojoScanner.populatePluginDescriptor(Lorg/apache/maven/tools/plugin/PluginToolsRequest;)V

I have tried several solutions found it on the Internet, but after
proved it didn't work. Has anybody compiled Geoserver 2.3.1 with Maven
2.2.1 successfully? Have you got any idea how to solve this problem?

Thanks in advance,

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Thank Ben for you response, I couldn’t find any explicit warning about ubuntu maven as yours.

At last I was able to build Geoserver using Maven 2.0.11 from Apache and setting a few environment variables:

export M2_HOME=<dir_apache_maven>/apache-maven-2.0.11
export M2=$M2_HOME/bin
export MAVEN_OPTS=“-Xms256m -Xmx512m”
export PATH=$M2:$PATH
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24
export PATH=$JAVA_HOME/bin:$PATH

Thanks againg for your

El 27 de abril de 2012 a las 3:47 Ben Caradoc-Davies Ben.Caradoc-Davies@anonymised.com escribió:

GeoServer is built on GeoTools, which warns against Apache Maven 2.2.1
(rdebian-1).

“It is very tempting to use apt-get to install maven, ubuntu users I am
looking at you! Please be careful of the maven provided out of the box
by unbuntu: Apache Maven 2.2.1 (rdebian-1) It is not actually apache
maven as provided by apache”
http://docs.geotools.org/latest/userguide/advanced/build/install/mvn.html#do-not-use-apt-get

On 26/04/12 15:37, Eduardo de la Montaña wrote:

Hello, I am new developing in Geoserver 2.3.1 and triying to build it
with maven Apache Maven 2.2.1 (rdebian-1)
but it shows the following error:

[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] The API of the mojo scanner is not compatible with this plugin
version. Please check the plugin dependencies configured in the POM and
ensure the versions match.

Embedded error:
org.apache.maven.tools.plugin.scanner.MojoScanner.populatePluginDescriptor(Lorg/apache/maven/tools/plugin/PluginToolsRequest;)V

I have tried several solutions found it on the Internet, but after
proved it didn’t work. Has anybody compiled Geoserver 2.3.1 with Maven
2.2.1 successfully? Have you got any idea how to solve this problem?

Thanks in advance,


Ben Caradoc-Davies Ben.Caradoc-Davies@anonymised.com
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre