Cleanup pom.xml files - round #2 #11

merged 9 commits into from Jan 18, 2015


None yet
3 participants

darxriggs commented Jan 17, 2015

I have found some more things to cleanup. :-)

@johanhaleby johanhaleby added a commit that referenced this pull request Jan 18, 2015

@johanhaleby johanhaleby Merge pull request #11 from darxriggs/cleanup-pom-files
Cleanup pom.xml files - round #2

@johanhaleby johanhaleby merged commit 6335b05 into powermock:master Jan 18, 2015

1 check passed

continuous-integration/travis-ci The Travis CI build passed

johanhaleby commented Jan 18, 2015

Thanks again :)

darxriggs deleted the darxriggs:cleanup-pom-files branch Jan 18, 2015

@PascalSchumacher PascalSchumacher commented on the diff Jan 18, 2015

- <name>powermock-api-easymock</name>
- <version>1.6.2-SNAPSHOT</version>
+ <name>${project.artifactId}</name>

PascalSchumacher Jan 18, 2015

Hi René,

I'm just wondering if there is any difference - other than being more explicit - between using "project.artifactId" as "name" and not adding the "name" element. Doesn't maven use the "artifactId" as name when name is not set?


darxriggs Jan 18, 2015


The <name> element has no default value.

You can check with mvn help:effective-pom that if you don't specify it, it's not existing (not even inherited from the parent).


darxriggs Jan 18, 2015


Ok I double checked via mvn site.

If the <name> element isn't specified, the <artifactId> element's value is used.

So yes, the <name> element could be left out in this case.


PascalSchumacher Jan 18, 2015

Thanks for the response. 😄

I thought that maven sets to the if name is not specified, but effective-pom shows that's not the case. It appears that some plug-ins (site, assembly) use if is unset, but maybe other plug-ins handle this differently, so your solution is the best/safest. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment