Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different POM Format in XML for build pom #74

Open
khmarbaise opened this issue Jun 26, 2024 · 0 comments
Open

Different POM Format in XML for build pom #74

khmarbaise opened this issue Jun 26, 2024 · 0 comments

Comments

@khmarbaise
Copy link
Collaborator

khmarbaise commented Jun 26, 2024

Goals

  • The idea is to create a new XML based POM format which is much more streamlined based on the discussion Simplified developer POMs #72 than the currently used format.
  • Make the new format default for Maven 4+ (may be 4.1. or even later)..

Non-Goals

It is not a goal to

  • Replace XML in general with something like YAML, JSON or alike...
  • Replace the current build pom (ModelVersion: 4.0.0 and 4.1.0) for Maven 4.0.0 GA release

Compatibility Concerns/Issues

  • It could be thought of having two formats over a transition time supported in parallel and after that time to remove the support of the old format.
  • Is it required to have major version change for such thing?
  • TBD more thouroughly...

Motivation

The idea is to make the resulting XML format more concise and less bloated. There are many people who are complaining about the XML format in general or about the verboseness of the current format.

TBD

  • Create a PoC, to make an estimation possible and see which issues could be occur based on those changes.

Examples

We could think of using attributes instead of tags to define a dependency. The current format looks like this:

<dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <type>jar</type>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>

A Simple Solution Approach

The simplest approach could be to use attributes instead of tags, which would already stream line the XML format:

<dependency groupId="some.group.id" artifactId="some-artifact-id" version="1.2.3" classifier="..." scope="..." type="xxx" optional="true" />

A more Streamed Line Solution

Another approache could be define an id attribute which allows to define a short expression for the cooridnates like groupId, aritfactId, version, scope etc.

<dependency id="groupId:artifactId:version[:...]">

Another Approach

We could also think of things like this:

<dependency coordinate="some.group.id:some-artifact-id:1.2.3" />

Konsequences

  • All Tooling providers have to change the consumption of the build pom in that different format.
    • Alle IDE manufactore have to change their products
  • Are there any more involved? TBD?
@khmarbaise khmarbaise changed the title WIP: Different POM Format in XML for build pom Different POM Format in XML for build pom Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants