tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1408507 - /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
Date Mon, 12 Nov 2012 23:50:21 GMT
2012/11/13  <olamy@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message