Cleanup pom.xml files - round #2 #11

Merged
merged 9 commits into from Jan 18, 2015

Conversation

Projects
None yet
3 participants
Contributor

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
6335b05

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

1 check passed

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

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

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

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

darxriggs Jan 18, 2015

Contributor

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

darxriggs Jan 18, 2015

Contributor

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

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