Pergunta

I am trying to run the Broadleaf Demosite project in eclipse. I have setup the Demosite by following the instructions from the Getting started guide from broadleaf site. The default code in the build.properties file inside the Demosite maven parent project shows this,

#required
maven.home=/usr/share/maven

#optional
jrebel.path=/usr/lib/jrebel/jrebel.jar

As maven.home is required to start up the server and so now that I have downloaded and extracted the maven 3.0.4 in C:\Users\admin\Downloads\apache-maven-3.0.4\lib.

What is the path I have to specify in the maven.home line in the properties file,

Should it be something like this?

maven.home=C:\User\admin\apache-maven-3.0.4\lib
Foi útil?

Solução 2

I just changed the maven.home to point to the path like this,

maven.home==/Users/admin/Downloads/apache-maven-3.0.4

Download maven and extract it wherever you want in you computer. Set the path to that directory using command prompt,

C:\Users\admin>set PATH="c:\Users\admin\downloads\apache-maven-3.0.4\bin";%PATH%

Now I'm able to start the jetty server in eclipse with BUILD SUCCESS.

UPDATE:

As the above solution only works for once and you need to run that command every-time you restart the system. For it to work always you have to set the PATH environment variable for maven. Look at How to install maven in Windows? for a permanent solution. Once installed run the following to check if you have installed maven correctly and to check other variables are properly set.

CMD PROMPT

C:\Users\admin>mvn -version
Apache Maven 3.0.4 (r1232337; 2012-01-17 14:14:56+0530)
Maven home: c:\Users\admin\Downloads\apache-maven-3.0.4\bin\..
Java version: 1.6.0_32, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_32\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
C:\Users\admin>

If all the above works fine then in the properties file, you have to specify the maven home directory which in my case was,

C:/Users/admin/Downloads/apache-maven-3.0.4

Sometimes the single forward slash(/) doesn't work in Windows, so replace it with double-forward slash(//) and that should work.

Outras dicas

Maven is shipped into a .zip archive. So unzip maven where do you want. Let's say somewhere like :

C:\User\admin\apache-maven-3.0.4\

then set into your build.properties

maven.home=C:/User/admin/apache-maven-3.0.4

and this should work.

Default value in build.properties file:

#required
maven.home=/usr/share/maven 

You have to follow the below format:-

#required
maven.home=C://Program Files//apache-maven-3.0.5-bin//apache-maven-3.0.5
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top