Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven and POM file

 
Varnam Aayiram
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I have some issues with Maven. Here is what I did:

1. Placed the apache-maven-3.0.3 folder in C:\dev

2. Created a JAVA_HOME System Variable
- variable value = C:\Program Files\Java\jdk1.6.0_25


3. Created an M2_HOME System Variable
- variable value = C:\dev\apache-maven-3.0.3

4. Added %JAVA_HOME%\bin;%M2_HOME%\bin; to System Path

5. I ran the following in the command prompt:
- C:\Documents and Settings\MyName> mvn clean

6. I get a 'Build Failure' message that basically says I have no POM in this directory.


True enough I have no POM file in the 'C:\Documents and Settings\MyName>' directory, but does anyone actually have a POM file in this directory? Also I checked out the '.m2' folder created in the following location: 'C:\Documents and Settings\MyName\.m2\repository' it's empty. Am I doing something wrong? Hope someone can advise. Thanks.

regards
glisando



 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is your POM file located? It needs to be somewhere. (or checked out from a repository)
 
Varnam Aayiram
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne Boyarsky ,

I did a search on my C drive and found 7 POM files. Their locations are as follow:

1. C:\Program Files\NetBeans 7.0\java\modules\ext\maven

2. C:\Documents and Settings\MyName\.jenkins\war\META-INF\maven\org.jenkins-ci.main\jenkins-war

3. C:\Documents and Settings\MyName\.jenkins\plugins\cvs\META-INF\maven\org.jvnet.hudson.plugins\cvs

4. C:\Documents and Settings\MyName\.jenkins\plugins\maven-plugin\META-INF\maven\org.jenkins-ci.main\maven-plugin

5. C:\Documents and Settings\MyName\.jenkins\plugins\ssh-slaves\META-INF\maven\org.jvnet.hudson.plugins\ssh-slaves

6. C:\Documents and Settings\MyName\.jenkins\plugins\subversion\META-INF\maven\org.jvnet.hudson.plugins\subversion

7. C:\Program Files\glassfish-3.1\glassfish\lib\install\applications\__admingui\META-INF\maven\org.glassfish.admingui\war

What should I do? Am I to move one of them to the desktop, won't I be breaking anything if I do that? Hope somone can advise. Thanks.

regards
glisando
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Varnam Aayiram wrote:Hi guys,

I have some issues with Maven. Here is what I did:

1. Placed the apache-maven-3.0.3 folder in C:\dev

2. Created a JAVA_HOME System Variable
- variable value = C:\Program Files\Java\jdk1.6.0_25


3. Created an M2_HOME System Variable
- variable value = C:\dev\apache-maven-3.0.3

4. Added %JAVA_HOME%\bin;%M2_HOME%\bin; to System Path

5. I ran the following in the command prompt:
- C:\Documents and Settings\MyName> mvn clean

6. I get a 'Build Failure' message that basically says I have no POM in this directory.


True enough I have no POM file in the 'C:\Documents and Settings\MyName>' directory, but does anyone actually have a POM file in this directory? Also I checked out the '.m2' folder created in the following location: 'C:\Documents and Settings\MyName\.m2\repository' it's empty. Am I doing something wrong? Hope someone can advise. Thanks.

regards
glisando





What do you expect Maven to do when you run mvn clean at C:\Documents and Settings\MyNam? Do you have a Maven project at this location? If not, then Maven is doing the right thing by letting you know that there is no project at this location or rather no pom in this location.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you need to read the getting started guide:
http://maven.apache.org/guides/getting-started/index.html

After that, the complete reference guide will come in handy:
http://www.sonatype.com/people/2010/11/maven-the-complete-reference/
 
Tinh T. Dinh
Greenhorn
Posts: 1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter Johnson wrote:Sounds like you need to read the getting started guide:
http://maven.apache.org/guides/getting-started/index.html

After that, the complete reference guide will come in handy:
http://www.sonatype.com/people/2010/11/maven-the-complete-reference/


Add another more very good tutorial site with full topic for beginners need quick start:
http://www.mkyong.com/tutorials/maven-tutorials/
And <optional> try m2eclipse on Eclipse IDE for beginners painful to create pom file <- be careful, maybe confuse ->:
http://m2eclipse.sonatype.org/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic