Might it be better to require JDK 5, since most versions of Maven do now? I 
know that doesn't help with this particular command (though I'd also be fine 
with jumping to JDK 6 if it's documented what version is needed for the older 
JDKs :)

On 14/09/2011, at 7:13 AM, rfscho...@codehaus.org wrote:

> Revision
> 14684
> Author
> rfscholte
> Date
> 2011-09-13 16:13:21 -0500 (Tue, 13 Sep 2011)
> Log Message
> 
> Remove File.canExecute(), because this is a JDK6 feature, while this plugin 
> is still based on JDK1.4 Added animal-sniffer to prevent this in the future.
> Modified Paths
> 
> trunk/mojo/exec-maven-plugin/pom.xml
> trunk/mojo/exec-maven-plugin/src/main/java/org/codehaus/mojo/exec/ExecMojo.java
> Diff
> 
> Modified: trunk/mojo/exec-maven-plugin/pom.xml (14683 => 14684)
> --- trunk/mojo/exec-maven-plugin/pom.xml      2011-09-13 20:52:38 UTC (rev 
> 14683)
> +++ trunk/mojo/exec-maven-plugin/pom.xml      2011-09-13 21:13:21 UTC (rev 
> 14684)
> @@ -157,6 +157,25 @@
>      <build>
>          <plugins>
>              <plugin>
> +              <groupId>org.codehaus.mojo</groupId>
> +              <artifactId>animal-sniffer-maven-plugin</artifactId>
> +              <version>1.7</version>
> +              <executions>
> +                <execution>
> +                  <goals>
> +                    <goal>check</goal>
> +                  </goals>
> +                </execution>
> +              </executions>
> +              <configuration>
> +                <signature>
> +                  <groupId>org.codehaus.mojo.signature</groupId>
> +                  <artifactId>java14</artifactId>
> +                  <version>1.0</version>
> +                </signature>
> +              </configuration>
> +            </plugin>
> +            <plugin>
>                  <groupId>org.apache.maven.plugins</groupId>
>                  <artifactId>maven-invoker-plugin</artifactId>
>                  <configuration>
> Modified: 
> trunk/mojo/exec-maven-plugin/src/main/java/org/codehaus/mojo/exec/ExecMojo.java
>  (14683 => 14684)
> --- 
> trunk/mojo/exec-maven-plugin/src/main/java/org/codehaus/mojo/exec/ExecMojo.java
>    2011-09-13 20:52:38 UTC (rev 14683)
> +++ 
> trunk/mojo/exec-maven-plugin/src/main/java/org/codehaus/mojo/exec/ExecMojo.java
>    2011-09-13 21:13:21 UTC (rev 14684)
> @@ -520,14 +520,8 @@
>          String exec = null;
>          if ( execFile.isFile() )
>          {
> -            if ( execFile.canExecute() )
> -            {
> -                getLog().debug( "Toolchains are ignored, 'executable' 
> parameter is set to " + executable );
> -                exec = execFile.getAbsolutePath();
> -            }
> -            else {
> -                getLog().debug( "Can't execute " + 
> execFile.getAbsolutePath() + "; continue to search" );
> -            }
> +            getLog().debug( "Toolchains are ignored, 'executable' parameter 
> is set to " + executable );
> +            exec = execFile.getAbsolutePath();
>          }
>          
>          if ( exec == null )
> @@ -550,13 +544,7 @@
>                      File f = new File( dir, ex );
>                      if ( f.isFile() )
>                      {
> -                        if ( f.canExecute() )
> -                        {
> -                            exec = ex;
> -                        }
> -                        else {
> -                            getLog().debug( "Can't execute " + 
> f.getAbsolutePath() + "; continue to search" );
> -                        }
> +                        exec = ex;
>                      }
>                      
>                      if ( exec == null )
> @@ -572,15 +560,8 @@
>                                  f = new File( new File( elems[i] ), ex );
>                                  if ( f.isFile() )
>                                  {
> -                                    if ( f.canExecute() )
> -                                    {
> -                                        exec = ex;
> -                                        break;
> -                                    }
> -                                    else 
> -                                    {
> -                                        getLog().debug( "Can't execute " + 
> f.getAbsolutePath() + "; continue to search" );
> -                                    }
> +                                    exec = ex;
> +                                    break;
>                                  }
>                              }
>                          }
> 
> To unsubscribe from this list please visit:
> 
> http://xircles.codehaus.org/manage_email
> 

--
Brett Porter
br...@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter




Reply via email to