google-cloud-eclipse icon indicating copy to clipboard operation
google-cloud-eclipse copied to clipboard

Bring markup for mavenCoordinates in sync with maven

Open elharo opened this issue 8 years ago • 1 comments

While adding new libraries by reference to Maven central in libraries/plugin.xml, it occurred to me that

        <mavenCoordinates
              artifactId="servlet-api"
              groupId="javax.servlet"
              version="2.5" />

is unnecessarily distinct from actual maven pom.xml markup. This might better be simply

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>servlet-api</artifactId>
    <version>2.5</version>
</dependency>

If nothing else, this enables us to add new libraries with more copy-pasta and less error-prone manual typing. I did encounter on bug (mixed up groupId and artifactID) that cost me a few minutes here.

elharo avatar Mar 11 '17 14:03 elharo

The downside to using Maven XML syntax is that

  1. it suggests we support the full spec (scope?),
  2. it makes it hard to deviate (e.g., if we want to specify a specific repository),
  3. it makes adding via the manifest editor more difficult (multiple elements), and
  4. Maven is itself moving to support multiple language styles (polyglot).

Not to mention the choice may inspire rage in Gradle zealots :-)

briandealwis avatar Mar 13 '17 17:03 briandealwis