-
Notifications
You must be signed in to change notification settings - Fork 950
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
sbt should validate maven model before publishing #2566
Comments
or get rid of |
pomExtras is a pretty blunt tool, but I'm not sure if sbt should be validate the pom by default. Perhaps this could be a community ticket for an sbt plugin to validate it. |
well since |
test is part of sbt, but sbt doesn't come built in with scalacheck.. It's also about adding another/more dependencies.. |
Also an sbt plugin could eventually be folded into sbt. Or we could add it as a feature, off by default, or on by default with a flag to disable it.. |
An easier, partial solution, at least for the magneticio case, is that instead of building the pom from sbt settings first, and then appending pomExtra, you start with pomExtra and then you append nodes in the XML. So when you generate the XML for the licenses key, for instance, if the licenses node exists your append in it. |
Would a Java dependency to Maven Model Builder be acceptable, or would an implementation need to be Scala in order to be acceptable? Does anyone know if XSD validation would suffice? |
I downloaded all Scala 2.11 poms from maven central (~50 000 poms). Almost 10% fails to load because they are invalid poms.
For example: you cannot duplicate license tags, but sbt permits that magneticio/vamp#612
Maven model builder can validate a pom. Usage example
steps
create an invalid pom (for example magneticio/vamp#612)
publish
problem
sbt does not validate the model
expectation
I expect sbt to validate the pom before publishing
The text was updated successfully, but these errors were encountered: