Netbeans 7.x:Maven在错误的目录中创建我的项目 [英] Netbeans 7.x: Maven creates my project in the wrong directory

查看:90
本文介绍了Netbeans 7.x:Maven在错误的目录中创建我的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法获得 Netbeans 7.3.1 在我指定的目录中创建 Maven Web应用程序.

I cannot get Netbeans 7.3.1 to create a Maven Web Application in the directory I specify.


OS: Windows 7 x64
NetBeans: 7.3.1
Maven: 3.0.4/3.0.5

我正在使用 NetBeans GUI 及其内部的 Maven 3.0.5 创建此类项目.不管我指定哪个文件夹,它总是在我的 E: \驱动器的中创建项目.

I am using the NetBeans GUI and its internal Maven 3.0.5 for creating that type of project. It always creates the project in the root of my E:\ drive, regardless of which folder I specify.

这里是一个示例:在提供了创建项目所需的所有参数之后,单击完成"按钮后:

Here's an example: After I click the 'finish' button after having provided all the needed parameters to create the project:

>     cd E:\Dev\Java\Test; JAVA_HOME=E:\\Apps\\Dev\\jdk6u23 "M2_HOME=E:\\Apps (x86)\\Dev\\apachemaven\\apache-maven-3.0.4"
> "\"E:\\Apps
> (x86)\\Dev\\apachemaven\\apache-maven-3.0.4\\bin\\mvn.bat\""
> -DarchetypeGroupId=org.codehaus.mojo.archetypes -DarchetypeArtifactId=webapp-javaee6 -DarchetypeVersion=1.5 -DarchetypeRepository=http://repo.maven.apache.org/maven2 -DgroupId=be.kdg -DartifactId=mavenproject22 -Dversion=1.0-SNAPSHOT -Dpackage=be.kdg.mavenproject22 -Dbasedir=E:\\Dev\\Java\\Test -Darchetype.interactive=false --batch-mode archetype:generate Scanning for projects...
>                                                                         
> ------------------------------------------------------------------------ Building Maven Stub Project (No POM) 1
> ------------------------------------------------------------------------
> 
> >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
> 
> <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom
> <<<
> 
> [archetype:generate] Generating project in Batch mode Archetype
> defined by properties
> ---------------------------------------------------------------------------- Using following parameters for creating project from Archetype:
> webapp-javaee6:1.5
> ---------------------------------------------------------------------------- 
Parameter: groupId, Value: be.kdg 
Parameter: artifactId, Value: mavenproject22
Parameter: version, Value: 1.0-SNAPSHOT 
Parameter: package, Value: be.kdg.mavenproject22
Parameter: packageInPathFormat, Value: be/kdg/mavenproject22
Parameter: package, Value: be.kdg.mavenproject22
Parameter: version, Value: 1.0-SNAPSHOT
Parameter: groupId, Value: be.kdg 
Parameter: artifactId, Value: mavenproject22

project created from Archetype in dir: E:\mavenproject22
> ------------------------------------------------------------------------ 
BUILD SUCCESS
> ------------------------------------------------------------------------ 
Total time: 1.643s Finished at: Sat Sep 21 20:01:57 CEST 2013 Final
> Memory: 8M/120M
> ------------------------------------------------------------------------

这是我第22次尝试在指定目录中创建 Maven Web应用程序项目. NetBeans或Maven只是不听,我也不知道为什么会这样.

This is the 22nd time I tried creating a Maven Web Application project in a specified directory. NetBeans or Maven just won't listen and I don't know why this is happening.

如果basedir是 E:\ Dev \ Java \ Test ,那么为什么要在 E: \ root下创建我的项目?

If the basedir is E:\Dev\Java\Test, then why does it create my project in E:\ root?

推荐答案

我遇到了相同的问题,并且尝试了以下操作:检查注册表HKEY_CURRENT_USER \ Software \ Microsoft \ Command Processor,看看是否有自动运行键集在那里.我删除了我的,并使它正常工作."但是我没有自动运行选项.此plz的任何其他解决方案!!

I've had the same problem and I have tried this: "Check registry HKEY_CURRENT_USER\Software\Microsoft\Command Processor and see if you have an Autorun key set there. I deleted mine and got it to work." But I don't have autorun option . Any other solution for this plz!! .

这篇关于Netbeans 7.x:Maven在错误的目录中创建我的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆