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 void
Checks the resolved model of the given MaveProject for compliance.private static org.apache.maven.project.MavenProject
readProject
(File pom) private static String
resolveParentName
(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
- iftrue
checks if version is not -SNAPSHOT.strict
- iftrue
checks that <repositories> and <pluginRepositories> are not present- Throws:
PomCheckException
- if the POM is invalid
-
resolveParentName
-
readProject
-