After copying the project in Eclipse, how to change the name of the project and other related configuration?

At work, we occasionally need to create a new project, but do not need to build their own framework of the project, but can be copied directly on a project. After copying, change the project name after the discovery, access paths, such as the name and packaging will keep the old name of the project, looks very unhappy, then we need to completely re-renovation project.

The first part : Right-click the project -> Properties -> Web Project Settings

  Changing Context root, change to the new project name

 

 

The second part : Eclipse, click Window -> Show view -> Navigator , get a new view mode; then click on the project under .setting file, select the file to open org.eclipse.wst.common.component

Modify the name of one of the old project, a total of three:

<wb-module deploy-name="第一处"> ; <property name="context-root" value="第二处"/> ;<property name="java-output-path" value="/第三处/target/classes"/>

 

the third part:

Open the pom.xml file for the project, which modify the 300

At first: <artifactId>; second at: <name>; third place: <finalName>. This three respectively at the beginning and end of the file not far away.

This completely revised better.

 

Part IV : This part can change the access address and port number of projects

1. No port: After the project is added tomcat, double tomcat, HTTP in the Overview view, Ports of / 1.1 Port number is the port number to access

2. Visit address: Switch to the Modules view, select Web Modules in a row, then click the "Edit ......", the Path into a new project name

Guess you like

Origin blog.csdn.net/qq_39429962/article/details/85069092