org.sonar.api.batch.maven
Class MavenUtils

java.lang.Object
  extended by org.sonar.api.batch.maven.MavenUtils

Deprecated. since 4.5 we don't want any dependency on Maven anymore

@Deprecated
public final class MavenUtils
extends Object

An utility class to manipulate Maven concepts

Since:
1.10

Field Summary
static String GROUP_ID_APACHE_MAVEN
          Deprecated.  
static String GROUP_ID_CODEHAUS_MOJO
          Deprecated.  
 
Method Summary
static boolean equals(org.apache.maven.model.Plugin plugin, String groupId, String artifactId)
          Deprecated. 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)
          Deprecated. Tests whether a ReportPlugin has got a given artifact id and group id
static String getJavaSourceVersion(org.apache.maven.project.MavenProject pom)
          Deprecated.  
static String getJavaVersion(org.apache.maven.project.MavenProject pom)
          Deprecated. 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)
          Deprecated. 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)
          Deprecated. Returns the charset of a pom
static String getSourceEncoding(org.apache.maven.project.MavenProject pom)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GROUP_ID_APACHE_MAVEN

public static final String GROUP_ID_APACHE_MAVEN
Deprecated. 
See Also:
Constant Field Values

GROUP_ID_CODEHAUS_MOJO

public static final String GROUP_ID_CODEHAUS_MOJO
Deprecated. 
See Also:
Constant Field Values
Method Detail

getJavaVersion

public static String getJavaVersion(org.apache.maven.project.MavenProject pom)
Deprecated. 
Returns the version of Java used by the maven compiler plugin

Parameters:
pom - the project pom
Returns:
the java version

getJavaSourceVersion

public static String getJavaSourceVersion(org.apache.maven.project.MavenProject pom)
Deprecated. 

getPlugin

public static org.apache.maven.model.Plugin getPlugin(Collection<org.apache.maven.model.Plugin> plugins,
                                                      String groupId,
                                                      String artifactId)
Deprecated. 
Queries a collection of plugins based on a group id and an artifact id and returns the plugin if it exists

Parameters:
plugins - the plugins collection
groupId - the group id
artifactId - the artifact id
Returns:
the corresponding plugin if it exists, null otherwise

equals

public static boolean equals(org.apache.maven.model.Plugin plugin,
                             String groupId,
                             String artifactId)
Deprecated. 
Tests whether a plugin has got a given artifact id and group id

Parameters:
plugin - the plugin to test
groupId - the group id
artifactId - the artifact id
Returns:
whether the plugin has got group + artifact ids

equals

public static boolean equals(org.apache.maven.model.ReportPlugin plugin,
                             String groupId,
                             String artifactId)
Deprecated. 
Tests whether a ReportPlugin has got a given artifact id and group id

Parameters:
plugin - the ReportPlugin to test
groupId - the group id
artifactId - the artifact id
Returns:
whether the ReportPlugin has got group + artifact ids

getSourceEncoding

public static String getSourceEncoding(org.apache.maven.project.MavenProject pom)
Deprecated. 
Returns:
source encoding

getSourceCharset

public static Charset getSourceCharset(org.apache.maven.project.MavenProject pom)
Deprecated. 
Returns the charset of a pom

Parameters:
pom - the project pom
Returns:
the charset


Copyright © 2009–2015 SonarSource. All rights reserved.