public final class MavenUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
GROUP_ID_APACHE_MAVEN |
static String |
GROUP_ID_CODEHAUS_MOJO |
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(org.apache.maven.model.Plugin plugin,
String groupId,
String artifactId)
Tests whether a plugin has got a given artifact id and group id
|
static boolean |
equals(org.apache.maven.model.ReportPlugin plugin,
String groupId,
String artifactId)
Tests whether a ReportPlugin has got a given artifact id and group id
|
static String |
getJavaSourceVersion(org.apache.maven.project.MavenProject pom) |
static String |
getJavaVersion(org.apache.maven.project.MavenProject pom)
Returns the version of Java used by the maven compiler plugin
|
static org.apache.maven.model.Plugin |
getPlugin(Collection<org.apache.maven.model.Plugin> plugins,
String groupId,
String artifactId)
Queries a collection of plugins based on a group id and an artifact id and returns the plugin if it exists
|
static Charset |
getSourceCharset(org.apache.maven.project.MavenProject pom)
Returns the charset of a pom
|
static String |
getSourceEncoding(org.apache.maven.project.MavenProject pom) |
public static final String GROUP_ID_APACHE_MAVEN
public static final String GROUP_ID_CODEHAUS_MOJO
public static String getJavaVersion(org.apache.maven.project.MavenProject pom)
pom
- the project pompublic static String getJavaSourceVersion(org.apache.maven.project.MavenProject pom)
public static org.apache.maven.model.Plugin getPlugin(Collection<org.apache.maven.model.Plugin> plugins, String groupId, String artifactId)
plugins
- the plugins collectiongroupId
- the group idartifactId
- the artifact idpublic static boolean equals(org.apache.maven.model.Plugin plugin, String groupId, String artifactId)
plugin
- the plugin to testgroupId
- the group idartifactId
- the artifact idpublic static boolean equals(org.apache.maven.model.ReportPlugin plugin, String groupId, String artifactId)
plugin
- the ReportPlugin to testgroupId
- the group idartifactId
- the artifact idpublic static String getSourceEncoding(org.apache.maven.project.MavenProject pom)
public static Charset getSourceCharset(org.apache.maven.project.MavenProject pom)
pom
- the project pomCopyright © 2009-2014 SonarSource. All Rights Reserved.