apache / apache/maven-source-plugin

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

Aperta
#196 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug priority:minor
Lingua principale
Java
Stelle
37
Fork
38
Merge medio
18h 47m
PR unite (30g)
5

Descrizione

**[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"**_)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Nell’issue non sono indicati né un file sorgente né un test. Inizia leggendo l’issue MNG-8601 collegata, quindi segui il modo in cui il plugin delle sorgenti rappresenta gli artifact delle sorgenti principali e di test. Il lavoro è completo quando le sorgenti di test hanno un tipo java-test-source distinto senza perdere le considerazioni di compatibilità all’indietro indicate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
build-system
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.