NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

External maven does not find pom
Goto page 1, 2  Next
 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
si_l_20



Joined: 21 Oct 2009
Posts: 5

PostPosted: Thu Jan 14, 2010 1:02 pm    Post subject: External maven does not find pom Reply with quote

Hi,

I am currently using both Netbeans 6.7 an 6.8.
I have a maven project, using an external maven 2.2.1.
When I launch the build, clean, run action I get the following error.
Cannot execute mojo: clean. It requires a project with an existing pom.xml, but the build is not using one. (clean when action is clean !)
However debug works fine.
I have tried to spot where the mvn.bat was executing from and it seems to be "c:" when i expect it to be the current project path.
I could not find any config that could correct this behaviour.
Any Idea ?
Thanks.

PS: Internal maven seems to produce better results but it seems, as said by netbeans, to be a bit buggy
Back to top
mkleint
Posted via mailing list.





PostPosted: Thu Jan 14, 2010 1:35 pm    Post subject: External maven does not find pom Reply with quote

never got anything like that reported by anyone before. You can try
other maven versions to see if it's 2.2.1 specific. But I would not
recommend embedded internal maven for building. It's broken and not 100%
incompatible with the latest canonical version of maven..
It could also be caused by some of your enviromental variables settings.
If you have a reproducible scenario, feel free to submit a bug report

Milos

si_l_20 wrote:
Quote:
Hi,

I am currently using both Netbeans 6.7 an 6.8.
I have a maven project, using an external maven 2.2.1.
When I launch the build, clean, run action I get the following error.
Cannot execute mojo: clean. It requires a project with an existing pom.xml, but the build is not using one. (clean when action is clean !)
However debug works fine.
I have tried to spot where the mvn.bat was executing from and it seems to be "c:" when i expect it to be the current project path.
I could not find any config that could correct this behaviour.
Any Idea ?
Thanks.

PS: Internal maven seems to produce better results but it seems, as said by netbeans, to be a bit buggy




Back to top
si_l_20



Joined: 21 Oct 2009
Posts: 5

PostPosted: Fri Jan 15, 2010 9:19 am    Post subject: Reply with quote

Hi,

I have also tried with an older maven version 2.0.10.
Same result.
How could I embed a more stable maven in Netbeans PF ?
Thanks
Back to top
mkleint
Posted via mailing list.





PostPosted: Fri Jan 15, 2010 12:02 pm    Post subject: External maven does not find pom Reply with quote

cannot. The embedding means that we use the classes/apis of one version
from within netbeans. using a different version means netbeans module
rewrite.

It's something about your environment that makes it fail. Possibly a
netbeans bug (or your computer misconfiguration). We can't tell without
more information.

Milos

si_l_20 wrote:
Quote:
Hi,

I have also tried with an older maven version 2.0.10.
Same result.
How could I embed a more stable maven in Netbeans PF ?
Thanks




Back to top
si_l_20



Joined: 21 Oct 2009
Posts: 5

PostPosted: Fri Jan 15, 2010 12:48 pm    Post subject: Reply with quote

Ok, understood.
What I don't understand is why Netbeans guys have embedded a maven version they deprecate Smile
I have checked Env vars before posting and everything seems allright. However, I realized that new projects are created under c: when i expect them to be created under c:\documents and settings\<username> which is the value for %USERPROFILE% env var.
Projects I have been working with so far have been checked out from svn repository.
I am not sure but I feel there is a link between both issues, what do you think ?
Thanks
Back to top
mkleint
Posted via mailing list.





PostPosted: Fri Jan 15, 2010 1:37 pm    Post subject: External maven does not find pom Reply with quote

si_l_20 wrote:
Quote:
Ok, understood.
What I don't understand is why Netbeans guys have embedded a maven version they deprecate :)

Well, the story is more complicated that that. There is currently NO
released, stable version that is also embeddable. What we use is a svn
trunk from Summer 2008, heavily patched. at that time it was supposed to
be maven 2.1, but turned into maven 3.0 (which is not yet released). the
current 2.0.x, 2.1.x and 2.2.x are not embeddable. We primarily use the
embedded maven for project loading which is more stable and is very
close to what CLI maven loads. The embedded build is there just as a
visibly marked fallback and we strongly advice anyone to refer the IDE
to the CLI for building.
I have some work started in integrating maven 3.x embedder, but it's not
finished yet and maven 3.x is still just alpha. Apart from that it might
also be incompatible with the 2.x releases in some respect.

Quote:
I have checked Env vars before posting and everything seems allright. However, I realized that new projects are created under c: when i expect them to be created under c:\documents and settings\<username> which is the value for %USERPROFILE% env var.
Projects I have been working with so far have been checked out from svn repository.
I am not sure but I feel there is a link between both issues, what do you think ?


Possibly. It's most probably the same issue. new projects are created
using the maven archetype plugin so the working directory is set to the
maven CLI the same way it's doen for project builds.

Milos
Quote:
Thanks




Back to top
Loic



Joined: 05 Mar 2010
Posts: 1

PostPosted: Fri Mar 05, 2010 5:00 pm    Post subject: Reply with quote

Hi,
i have exactly the same issue,
netbeans seems to run mvn commands in c:\ instead of running them in the projects folders...

Did you find a way to make it work?
Thanks

Loic

Edit : it works find with another computer on windows xp 32 bit, doesn't work with on windows 7 64 bit....
Back to top
si_l_20



Joined: 21 Oct 2009
Posts: 5

PostPosted: Mon Mar 22, 2010 8:09 pm    Post subject: Reply with quote

Hi,

I gave up for a while.
Next step should be :
Get sources & check what is wrong Smile But I am currently feeling a little lazy.
I have met the issue only once and I got a working configuration so ...
Anyway, Im happy Im no longer alone, thanks to u Loic Smile

Just Let me remind you Loic, that, although i do not recommend it, sometimes inner maven tool does the job, I personnaly say "ça tombe en marche". Hope that helps
Good luck ! let me know if you get something
Back to top
yehohanan82



Joined: 02 Dec 2010
Posts: 8

PostPosted: Thu Dec 02, 2010 2:01 pm    Post subject: Reply with quote

Hi everyone,

I have the same problem.
Netbeans version : 6.9.1
I'm using an external maven installation : 2.2.1

Netbeans doesn't find file pom.xml.

It works fine with eclipse and in a console.

Any hint ?
Back to top
mdeggers



Joined: 28 Jan 2009
Posts: 208

PostPosted: Thu Dec 02, 2010 6:53 pm    Post subject: External maven does not find pom Reply with quote

Odd, NetBeans 6.9.1 and Maven 2.2.1 on Fedora 14 works fine from both
within NetBeans and the command line. I just changed to the root directory
of a project and ran mvn clean, then mvn package and it created the WAR
file.

I've not upgraded to 3.0.1 yet, but now that the site plugin is ready I will
probably investigate.

I haven't tried this on my Windows environment. Could this be a
Windows-specific issue?

On Fedora, I have M2_HOME and MAVEN_OPTS set (for some memory).
I also have M2_HOME/bin in my path.

Sorry, this seems to be a rather long "works for me" post.

/mde/
Back to top
yehohanan82



Joined: 02 Dec 2010
Posts: 8

PostPosted: Thu Dec 02, 2010 7:55 pm    Post subject: Reply with quote

yes i guess it's a windows specific issue.
I'm using Windows 7 64 bits.
Unfortunately, i can't try on another OS.
Back to top
mdeggers



Joined: 28 Jan 2009
Posts: 208

PostPosted: Thu Dec 02, 2010 9:08 pm    Post subject: Reply with quote

yehohanan82 wrote:
yes i guess it's a windows specific issue.
I'm using Windows 7 64 bits.
Unfortunately, i can't try on another OS.


I just tried my same project using Maven 2.2.0 on Window/XP 32 bits and
had no problems building it from the command line.

Could this be a Windows 7 ACL issue?

/mde/
Back to top
yehohanan82



Joined: 02 Dec 2010
Posts: 8

PostPosted: Mon Dec 06, 2010 10:15 am    Post subject: Reply with quote

I have no idea. What can I do to know ? Can I test something ? Thansk.
Back to top
yehohanan82



Joined: 02 Dec 2010
Posts: 8

PostPosted: Wed Dec 08, 2010 5:50 pm    Post subject: Reply with quote

I tried on a windows XP 32 bits platform and it works well. So this problem seems related to windows 7 64 bits. I don't have any clue to resolve this... Maybe this program is just not compatible at all with windows 7 for now.
Back to top
LudoMeurillon



Joined: 21 Apr 2011
Posts: 2

PostPosted: Thu Apr 21, 2011 7:22 pm    Post subject: Reply with quote

Hello everyone,


I got the exact same problem with both 6.9.1 and fresh new 7.0 versions of netbeans.

I try to manage maven project from external or embedded maven engine.
My netbeans IDE is installed and run on a Windows 7 x64

Logs generated by a simple install command looks like that :

Code:
 
cd C:\dev\workspace\module; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_23" "\"C:\\dev\\software\\NetBeans 7.0\\java\\maven\\bin\\mvn.bat\"" clean install
Scanning for projects...
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 0.100s
Finished at: Thu Apr 21 14:10:47 CEST 2011
Final Memory: 4M/490M
------------------------------------------------------------------------
The goal you specified requires a project to execute but there is no POM in this directory (c:\). Please verify you invoked Maven from the correct directory. -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException


Did anyone have this kind of problem on the same platform (Netbeans 6.9.*/7.0 + Windows 7 x64) ?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo