apache / apache/maven-source-plugin

[MSOURCES-124] Sources and test sources should have separate artifact types

Offen
#196 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug priority:minor
Vorherrschende Sprache
Java
Sterne
37
Forks
38
Ø Merge
18 Std. 47 Min.
Gemergte PRs (30 T.)
5

Beschreibung

**[Peter De Maeyer](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=peterdm)** opened **[MSOURCES-124](https://issues.apache.org/jira/browse/MSOURCES-124?redirect=false)** and commented

Imagine a project that has main and test sources, resulting in 4 artifacts:
|Artifact|Type|Default classifier|
|:---|:---|:---|
|Main JAR|"jar"| |
|Test JAR|"test-jar"|"tests"|
|Main sources|"java-source"|"sources"|
|Test sources|"java-source"|"test-sources"|

Both sources and test sources have type "java-source".
As a result, it is not possible to distinguish the sources from the test sources based on type alone.
The classifier can be used to make that distinction, but the classifier can be overridden to be anything while the type is fixed.
To fix this, I suggest to introduce a separate type "java-test-source" for test sources.
The only drawback of that is backward compatibility and impact on other plugins which might use hard-coded types.
On the other hand, attaching test sources is not often used, so I don't expect it to break a lot, and it will be better in the long run.

---

**Affects:** 3.2.1

**Issue Links:**
- [MNG-8601](https://issues.apache.org/jira/browse/MNG-8601) Add type test-java-source similar to type java-source
(_**"is fixed by"**_)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

In der Issue wird keine Quelldatei und kein Test genannt. Beginne damit, die verknüpfte MNG-8601-Issue zu lesen, und verfolge anschließend, wie das Quell-Plugin Haupt- und Test-Quellartefakte darstellt. Die Aufgabe ist erledigt, wenn Testquellen einen eigenen java-test-source-Typ haben, ohne die genannten Überlegungen zur Abwärtskompatibilität zu verlieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
build-system
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.