Thanks Todd,

You pretty much covered the provided functionality. It is worth to mention that <name> element is optional and we can't always rely on it. Maven uses some derivation rules to calculate name based on artifactId in case if name is omitted and as far as I know the name value is only used by Maven to show on console during the build (personally I'd prefer to see the artifactId and/or module names in there).

There is also Eclipse limitation, so any project located directly in the Eclipse workspace folder must have the same name as that folder (i.e. you have to rename folder in order to change the project name in Eclipse). When you add that on top of Maven best practice to name module folders to match the artifactId, it leads to the chosen default to use the artifactId as a project name.

Anyways, if you still want to be able to use the <name> element in the project name template, please submit an enhancement request to the project issue tracker at http://jira.codehaus.org/browse/MNGECLIPSE

 regards,
 Eugene


Todd Thiessen wrote:
When you import, there is a little "Advanced" expansion button. Click on
that and you can see "some" options to change the name of your imported
project so it doesn't just default to the artifact ID. You can include
other things like the group and version.

There is no option to use the "name" tag though. Perhaps this element
can contain special characters that eclipse doesn't allow?

---
Todd Thiessen
-----Original Message-----
From: Mikael Edlund [mailto:[email protected]] Sent: Friday, February 20, 2009 3:33 AM
To: [email protected]
Subject: [m2eclipse-user] Project name

Hi
If I import the following pom:
<?xml version="1.0" encoding="UTF-8"?> <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>
  <parent>
    <artifactId>my-parent</artifactId>
    <groupId>com.mycompany</groupId>
    <version>1.0.0</version>
  </parent>
  <groupId>com.mycompany</groupId>
  <artifactId>web</artifactId>
  <packaging>war</packaging>
  <version>1.0.0</version>
  <name>MyCompanyWeb</name>
  ...
</project>
I want my eclipse project to use the name "MyCompanyWeb".
Instead I get the folder name "web" for my eclipse project.
The path looks like this: parent (parent pom.xml)
  |
  |
  \-------web (MyCompanyWeb pom.xml)
In the parent pom.xml I reference to my subpom like this: <modules>
    <module>web</module>
  </modules>

Have I misinterpreted the meaning of the <name>-tag?
/Mikael E



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to