| View previous topic :: View next topic |
| Author |
Message |
si_l_20
Joined: 21 Oct 2009 Posts: 5
|
Posted: Thu Jan 14, 2010 1:02 pm Post subject: External maven does not find pom |
|
|
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.
|
Posted: Thu Jan 14, 2010 1:35 pm Post subject: External maven does not find pom |
|
|
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
|
Posted: Fri Jan 15, 2010 9:19 am Post subject: |
|
|
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.
|
Posted: Fri Jan 15, 2010 12:02 pm Post subject: External maven does not find pom |
|
|
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
|
Posted: Fri Jan 15, 2010 12:48 pm Post subject: |
|
|
Ok, understood.
What I don't understand is why Netbeans guys have embedded a maven version they deprecate
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.
|
Posted: Fri Jan 15, 2010 1:37 pm Post subject: External maven does not find pom |
|
|
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
|
|
| Back to top |
|
 |
Loic
Joined: 05 Mar 2010 Posts: 1
|
Posted: Fri Mar 05, 2010 5:00 pm Post subject: |
|
|
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
|
Posted: Mon Mar 22, 2010 8:09 pm Post subject: |
|
|
Hi,
I gave up for a while.
Next step should be :
Get sources & check what is wrong 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
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
|
Posted: Thu Dec 02, 2010 2:01 pm Post subject: |
|
|
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
|
Posted: Thu Dec 02, 2010 6:53 pm Post subject: External maven does not find pom |
|
|
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
|
Posted: Thu Dec 02, 2010 7:55 pm Post subject: |
|
|
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
|
Posted: Thu Dec 02, 2010 9:08 pm Post subject: |
|
|
| 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
|
Posted: Mon Dec 06, 2010 10:15 am Post subject: |
|
|
| 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
|
Posted: Wed Dec 08, 2010 5:50 pm Post subject: |
|
|
| 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
|
Posted: Thu Apr 21, 2011 7:22 pm Post subject: |
|
|
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 |
|
 |
|