-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
[deploy] Checking Maven Central rules fails for submodules not producing jar archives #1031
Comments
Oof, absolutely. Staged artifacts with |
Simple XML parsing should be performed otherwise we'd have to resolve parent poms that may also be staged and that would complicate matters a lot. |
What about a good-old // warning: just a POC
try {
Document document = DocumentBuilderFactory.newInstance()
.newDocumentBuilder()
.parse(new File(path));
String query = "/project/packaging";
String packaging = (String) XPathFactory.newInstance()
.newXPath()
.compile(query)
.evaluate(document, XPathConstants.STRING);
// value or an empty string (default packaging)
} catch (ParserConfigurationException | IOException | SAXException | XPathExpressionException e) {
throw new RuntimeException(e); // TODO: do something meaningful instead
} I'll be happy to pick this up unless you're very into XML parsing 😉 |
Thank you @mikemybytes, we welcome contributions! 😄 |
Released in v1.4.0 -> https://github.com/jreleaser/jreleaser/releases/tag/v1.4.0 |
The current implementation of the
AbstractMavenDeployer#checkMavenCentralRules
seems not to be prepared for a multi-module Maven project containing modules that don't producejar
archives. For example, verification fails on a submodule with<packaging>pom</packaging>
with a following message:An example project structure causing such issues could be observed here.
Probably, the Deployable class could be extended with a packaging type info, that could be then used to decide whether or not to expect sources and Javadoc jar archives.
The text was updated successfully, but these errors were encountered: