~ubuntu-branches/ubuntu/utopic/build-helper-maven-plugin/utopic

« back to all changes in this revision

Viewing changes to src/main/java/org/codehaus/mojo/buildhelper/MavenVersionMojo.java

  • Committer: Package Import Robot
  • Author(s): tony mancill, Emmanuel Bourg, tony mancill
  • Date: 2013-06-01 20:19:34 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130601201934-hzv7zmdcgazfyupp
Tags: 1.7-1
[ Emmanuel Bourg ]
* Team upload.
* New upstream release
* Set the compiler source/target to 1.5
* Updated Standards-Version to 3.9.4 (no changes)
* debian/copyright:
  - Updated the Format URI to 1.0
  - Removed the duplicate Copyright fields

[ tony mancill ]
* debian/control:
  - Add libmaven-invoker-plugin-java to build-depends-indep.
  - Wrap long lines.
  - Update Vcs-Git URL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
import org.apache.maven.artifact.versioning.ArtifactVersion;
28
28
import org.apache.maven.execution.RuntimeInformation;
29
29
import org.apache.maven.plugin.AbstractMojo;
30
 
import org.apache.maven.plugin.MojoExecutionException;
31
30
import org.apache.maven.project.MavenProject;
32
31
 
33
32
/**
37
36
 * @phase validate
38
37
 * @author pgier
39
38
 * @since 1.3
 
39
 * @threadSafe
40
40
 */
41
41
public class MavenVersionMojo
42
42
    extends AbstractMojo
68
68
    /**
69
69
     * Main plugin execution
70
70
     * 
71
 
     * @throws MojoExecutionException if the plugin execution fails.
72
71
     */
73
72
    public void execute()
74
 
        throws MojoExecutionException
75
73
    {
76
74
        ArtifactVersion mavenVersion = runtime.getApplicationVersion();
77
75
 
78
 
        getLog().debug( "Retrieved maven version: " + mavenVersion.toString() );
 
76
        if( getLog().isDebugEnabled() )
 
77
        {
 
78
            getLog().debug( "Retrieved maven version: " + mavenVersion.toString() );
 
79
        }
79
80
 
80
81
        if ( project != null )
81
82
        {