-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Problem installing Hibernate with Maven
PostPosted: Wed Sep 16, 2009 9:32 am 
Newbie

Joined: Wed Sep 16, 2009 8:37 am
Posts: 5
Hi,

I am new with Hibernate. I am trying to install it, so
I have firstable downloaded Maven 2.2.1

I have installed maven and set up the enviroment variables
as well as the settings.xml as it is indicated in the Hibernate
web.

But when I run mvn clean install from the command line
I get the following error,

Code:
C:\>mvn clean install -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot execute mojo: clean. It requires a project with an existing pom.xm
l, but the build is not using one.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot execute mojo: cle
an. It requires a project with an existing pom.xml, but the build is not using o
ne.
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:719)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:556)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:535)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
0)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot execute mojo:
clean. It requires a project with an existing pom.xml, but the build is not usin
g one.
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:414)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
        ... 17 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Wed Sep 16 15:30:20 CEST 2009
[INFO] Final Memory: 1M/3M
[INFO] ------------------------------------------------------------------------


Please, what is going wrong?

My OS is WinXP

Best Regards
Oggie


Top
 Profile  
 
 Post subject: Re: Problem installing Hibernate with Maven
PostPosted: Wed Sep 16, 2009 10:03 am 
Newbie

Joined: Thu Sep 13, 2007 10:36 am
Posts: 8
You are not in your projects directory.

Code:
C:\>mvn clean install -e


Unless you have a project POM sitting in the root of your C: drive that isn't going to work.

And you don't because you get this:

Code:
[INFO] Cannot execute mojo: clean. It requires a project with an existing pom.xm
l, but the build is not using one.


Top
 Profile  
 
 Post subject: Re: Problem installing Hibernate with Maven
PostPosted: Wed Sep 16, 2009 10:24 pm 
Newbie

Joined: Wed Sep 16, 2009 8:37 am
Posts: 5
Thanks Philip,

I have tried to get a solution to my problem and I have found
Guide to using Eclipse with Maven 2.x, at the url,

http://maven.apache.org/guides/mini/guide-ide-eclipse.html#Maven_2_repository

Even with the mistakes the page has (in my opinion), I have could implement a
Multiple Module Project.

It is ok.

Regards,
Oggie


Top
 Profile  
 
 Post subject: Re: Problem installing Hibernate with Maven
PostPosted: Thu Sep 17, 2009 12:26 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
I'd suggest just working with eclipse and Hibernate without Maven. Why complicate things when you're just trying to get your environment up and running?

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.