简体   繁体   English

在Netbeans中重命名Grails项目

[英]Renaming Grails Project in Netbeans

I have a project that I would like to rename (I'm using Netbeans) and I can't find an option to do so. 我有一个我想重命名的项目(我正在使用Netbeans),但是找不到这样做的选项。 With a Java project it was as simple as right click project -> rename. 使用Java项目,就像右键单击项目->重命名一样简单。

Is there a way to rename a Grails project? 有没有一种方法可以重命名Grails项目? (Without causing issues with the classes therein) (不会导致其中的类出现问题)

This has moved to the project.xml file in the most recent versions of NetBeans (I'm running 7.1). 这已移至最新版本的NetBeans(我正在运行7.1)中的project.xml文件。

  1. open [project directory] /nbproject/project.xml 打开[项目目录] /nbproject/project.xml
  2. change the <name> to reflect the new name of the project: 更改<name>以反映项目的新名称:

<name>[new project name]</name>

(1) Close any applications which may be using the app (Netbeans, Grails run-app, etc..) (1)关闭所有可能正在使用该应用程序的应用程序(Netbeans,Grails运行应用程序等)。

(2) Update your application.properties file to have your new application name. (2)更新您的application.properties文件以使用新的应用程序名称。

app.name=youroldappname

(3) Rename the base directory where your project is to yournewappname . (3)将项目所在的基本目录重命名为yournewappname

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM