Package org.kordamp.maven.checker
Class MavenCentralChecker
java.lang.Object
org.kordamp.maven.checker.MavenCentralChecker
Checks if a POM complies with the rules for uploading to Maven Central.
The following blocks are required:
- <groupId>
- <artifactId>
- <version>
- <name>
- <description>
- <url>
- <licenses>
- <scm>
strict = true
- <repositories>
- <pluginRepositories>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidChecks the resolved model of the given MaveProject for compliance.private static org.apache.maven.project.MavenProjectreadProject(File pom) private static StringresolveParentName(File directory, org.apache.maven.model.Model fullModel)
-
Constructor Details
-
MavenCentralChecker
public MavenCentralChecker()
-
-
Method Details
-
check
public static void check(Logger log, org.apache.maven.project.MavenProject project, boolean release, boolean strict) throws PomCheckException Checks the resolved model of the given MaveProject for compliance.- Parameters:
log- the logger to use.project- the project to be checked.release- iftruechecks if version is not -SNAPSHOT.strict- iftruechecks that <repositories> and <pluginRepositories> are not present- Throws:
PomCheckException- if the POM is invalid
-
resolveParentName
-
readProject
-