tags:

views:

450

answers:

6

I am a newbie to maven and i gone through the configuration steps given in Apache site, but still i cant configure it. So anyone please help me with simple steps to configure MAVEN in windows. Thanks in advance.

EDITED

C:\Documents and Settings\arselv>mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-         resources-     plugin/2.3/maven-resources-plugin-2.3.pom
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-  plugin/2.3/maven-resources-plugin-2.3.pom
 [INFO] ------------------------------------------------------------------------
 [ERROR] BUILD ERROR
 [INFO] ------------------------------------------------------------------------
 [INFO] Error building POM (may not be this project's POM).

 Project ID: org.apache.maven.plugins:maven-resources-plugin
 Reason: POM 'org.apache.maven.plugins:maven-resources-plugin' not found in   repository: Unable to download the artifact from any repository
 org.apache.maven.plugins:maven-resources-plugin:pom:2.3
 from the specified remote repositories:
 central (http://repo1.maven.org/maven2)
 for project org.apache.maven.plugins:maven-resources-plugin

 [INFO] ------------------------------------------------------------------------
 [INFO] For more information, run Maven with the -e switch
 [INFO] ------------------------------------------------------------------------
 [INFO] Total time: 42 seconds
 [INFO] Finished at: Fri Feb 05 13:10:06 IST 2010
 [INFO] Final Memory: 2M/5M
 [INFO] ------------------------------------------------------------------------

So Above is the Error whil trying to do the steps given in apache site.

A: 

The simplest steps to follow is what is on:

http://maven.apache.org/download.html#Installation

You mentioned some steps on an Apache site. Was that the page you were looking at? Which step are you having trouble with?

aberrant80
A: 

The installation of Maven is really simple: Download the ZIP from the site, unzip it in any directory of your hard drive, and then, just add the bin/ directory in your PATH Windows system variable. This way, you will be able to run the command mvn ... from any other directory.

romaintaz
Please go through the edited text and hope u can help me!!!
i2ijeya
Your problem may be linked to the presence of a proxy. Read the Pascal Thivent answer to know how you can solve this.
romaintaz
+1  A: 

One thing you can try if you're missing a particular resource, is to browse the repository directly, e.g. http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.3/

In this case it looks like the 'maven-resources-plugin' is present. If you are behind a firewall, it might be worth editing your /conf/settings.xml to specify proxy details.

Another thing you can try is to execute the mvn command with -U. This should force an update of resources not in your local repository.

lrussell
+2  A: 

If you are behind a proxy, you need to configure Maven to use this proxy. To do so, edit or create the file ${user.home}/.m2/settings.xml and add the following snippet to it:

<settings>
  .
  .
  <proxies>
   <proxy>
      <active>true</active>
      <protocol>http</protocol>
      <host>proxy.somewhere.com</host>
      <port>8080</port>
      <username>proxyuser</username>
      <password>somepassword</password>
      <nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
    </proxy>
  </proxies>
  .
  .
</settings>
Pascal Thivent
+1 Thanks Pascal and others for your valuable info's.. Its works..
i2ijeya
+1  A: 

The problem you're seeing there is probably to do with not having a suitable network connection to the default Maven central repository.

Once you've got that network issue sorted, you'll need to get up to speed with Maven and what it can do for you. For that I'd suggest you read the Better Builds With Maven eBook. It'll tell you everything you need to know.

One handy tip during initial installation is if you are developing on a multiple user profile machine (i.e. you log into a network and your profile is synchronized at login/logout) you'll want to do the following:

1) Edit your /.m2/settings.xml so that your local repository is outside of your network profile to avoid moving gigs of data every day. An example configuration could be:

<settings>
<localRepository>/Users/Shared/Repository</localRepository>
</settings>

2) Consider using Artifactory to provide a company wide central Maven repository which will be the first port of call for resolving Maven artifacts with repo1.maven.org/maven2 being the second one. This will mean that your developed code stays in house and any specialised artifacts requiring licenses (such as Oracle JDBC drivers or JTA stuff) can be made available without manual installation.

If you need any further help or advice, please feel free to contact me.

Gary Rowe
A: 

Hi all,

I ran into the same problem but none of configurations were changed before.

It was working all fine till yesterday. Today morning only the problem started.

My proxy settings are like this.

true http 192.168.2.4 8080 localhost|127.0.0.1|au-syd-dev-vm1

Any advise or help?

Thank you, Jani

jani
Hi all,I resolved it.I had to delete the plugins folder on my local repository then Maven downloaded the plugins agian.It works fine now.Thank you,Jani.
jani