[jboss-svn-commits] JBL Code SVN: r14098 - labs/jbossbuild/maven-plugins/trunk/maven-jboss-retro-plugin/src/main/java/org/jboss/maven/plugins/retro.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Aug 8 11:31:40 EDT 2007


Author: pgier
Date: 2007-08-08 11:31:39 -0400 (Wed, 08 Aug 2007)
New Revision: 14098

Modified:
   labs/jbossbuild/maven-plugins/trunk/maven-jboss-retro-plugin/src/main/java/org/jboss/maven/plugins/retro/RetroCheckMojo.java
Log:
Minor improvement to retro check error handling.
      


Modified: labs/jbossbuild/maven-plugins/trunk/maven-jboss-retro-plugin/src/main/java/org/jboss/maven/plugins/retro/RetroCheckMojo.java
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jboss-retro-plugin/src/main/java/org/jboss/maven/plugins/retro/RetroCheckMojo.java	2007-08-08 15:12:03 UTC (rev 14097)
+++ labs/jbossbuild/maven-plugins/trunk/maven-jboss-retro-plugin/src/main/java/org/jboss/maven/plugins/retro/RetroCheckMojo.java	2007-08-08 15:31:39 UTC (rev 14098)
@@ -151,16 +151,16 @@
    
    public void execute() throws MojoExecutionException
    {
-      // First, make sure checker and runtime available on the classpath
-      this.resolveCheckerLocation();
-      
-      if ( jvm == null || jvm.equals("") )
+      if ( jvm == null || jvm.equals("") || ! new File(jvm).exists())
       {
-          // use the same JVM as the one used to run Maven (the "java.home" one)
-          jvm = System.getProperty( "java.home" ) + File.separator + "bin" + File.separator + "java";
-          getLog().debug( "Using JVM: " + jvm );
+          getLog().error("Unable to locate jvm: " + jvm);
+          getLog().error("Skipping retro check");
+          return;
       }
 
+      // Make sure checker and runtime available on the classpath
+      this.resolveCheckerLocation();
+      
       this.getLog().info("Checking classes for jdk14");
       
       ArrayList<String> argsList = new ArrayList<String>();




More information about the jboss-svn-commits mailing list