2012/11/13  <ol...@apache.org>:
> Author: olamy
> Date: Mon Nov 12 23:30:25 2012
> New Revision: 1408507
>
> URL: http://svn.apache.org/viewvc?rev=1408507&view=rev
> Log:
> we add artifact dependencies and projects from reactor if file (ie jar) as 
> users can go to install/package phase
> so artifact.getFile is a file not a directory and not added when iterate on 
> project.classPathElements
>
> Modified:
>     
> tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
>

> @@ -113,7 +113,10 @@ public class DefaultClassLoaderEntriesCa
>                      request.getLog().debug(
>                          "add dependency to webapploader " + 
> artifact.getGroupId() + ":" + artifact.getArtifactId() + ":"
>                              + artifact.getVersion() + ":" + 
> artifact.getScope() );
> -                    if ( !isInProjectReferences( artifact, 
> request.getMavenProject() ) )
> +                    // we add artifact dependencies and projects from 
> reactor if file (ie jar) as users can go to install/package phase
> +                    // so artifact.getFile is a file not a directory and not 
> added when iterate on project.classPathElements
> +                    if ( !isInProjectReferences( artifact, 
> request.getMavenProject() ) || ( artifact.getFile().exists()
> +                        && artifact.getFile().isFile() ) )
>                      {
>                          String fileName = artifact.getFile().getName();
>                          if ( !fileInClassLoaderEntries.contains( fileName ) )


Сalling both artifact.getFile().exists() &&
artifact.getFile().isFile() is redundant.

The File.isFile() method does check for existence of the file.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to