如何更改从 mvn eclipse:eclipse 创建的 .project 中的项目名称?

How to change project name in .project created from mvn eclipse:eclipse?

这是我的内容 pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <url>http://maven.apache.org</url>

    <name>SomeProject</name>

    <groupId>com.test.te</groupId>
    <artifactId>testjar</artifactId>
    <version>1.1.6</version>
    <packaging>jar</packaging>

    <dependencies>
    ....
    ....
    </dependencies>
    <build>        
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

我正在通过执行以下命令创建 eclipse 的 .project 文件。

mvn eclipse:clean
mvn eclipse:eclipse

这是我的 .project 文件的内容

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>testjar</name>
    <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.jdt.core.javanature</nature>
    </natures>
</projectDescription>

它正在创建项目名称 testjar 而不是 SomeProject。

如何用maven方式修改?

添加了另一个插件来支持这个,并给出了项目名称

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <configuration>
            <projectNameTemplate>SomeProject</projectNameTemplate>
        </configuration>
    </plugin>