apache / apache/maven-source-plugin

[MSOURCES-150] Skip creation of sources jar when sources are empty

Aperta
#197 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement priority:major
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-150](https://issues.apache.org/jira/browse/MSOURCES-150?redirect=false)** and commented

The `maven-jar-plugin` can be configured with `skipIfEmpty` to skip the creation of a jar when the main sources are empty. This is useful for example when a project only has test sources.

However, even if the sources are empty, the `maven-source-plugin` _always_ creates a sources jar, even if there is no jar.

For symmetry reasons, it would therefore be useful if the `maven-source-plugin` also had an option `skipIfEmpty`.

Also consider the same for test sources. Although it seems that for test sources it already works like this by default.

---

**Affects:** 3.3.0

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia confrontando il comportamento di maven-source-plugin con l’opzione skipIfEmpty di maven-jar-plugin, concentrandoti sulla gestione delle sorgenti principali e di test vuote. Il lavoro è completato quando il plugin delle sorgenti offre skipIfEmpty per le sorgenti principali, evita di creare un sources jar vuoto quando l’opzione è abilitata e conserva o verifica il comportamento esistente delle sorgenti di test.

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

Valutazione

Stack tecnologico
java
Ambito
build-system
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.