2011/10/21 Konstantin Kolinko <knst.koli...@gmail.com>:
> 2011/10/21  <ol...@apache.org>:
>> Author: olamy
>> Date: Fri Oct 21 09:15:37 2011
>> New Revision: 1187232
>>
>> URL: http://svn.apache.org/viewvc?rev=1187232&view=rev
>> Log:
>> prefer Set to prevent duplicate entries
>
>>
>> Modified:
>>    
>> tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
>>
>> Modified: 
>> tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java?rev=1187232&r1=1187231&r2=1187232&view=diff
>> ==============================================================================
>> --- 
>> tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
>>  (original)
>> +++ 
>> tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
>>  Fri Oct 21 09:15:37 2011
>> @@ -38,7 +38,9 @@ import java.io.FilenameFilter;
>>  import java.io.IOException;
>>  import java.util.ArrayList;
>>  import java.util.Collection;
>> +import java.util.HashSet;
>>  import java.util.List;
>> +import java.util.Set;
>>
>>  /**
>>  * @author Olivier Lamy
>> @@ -56,7 +58,8 @@ public class DefaultClassLoaderEntriesCa
>>     public List<String> calculateClassPathEntries( 
>> ClassLoaderEntriesCalculatorRequest request )
>>         throws TomcatRunException
>>     {
>> -        List<String> classLoaderEntries = new ArrayList<String>();
>> +        Set<String> classLoaderEntries = new HashSet<String>();
>> +        //List<String> classLoaderEntries = new ArrayList<String>( );
>
>
> Maybe java.util.LinkedHashSet  like Tomcat does in
> org.apache.catalina.startup.ClassLoaderFactory ?
>
> So that it will preserve order.
> (Though I do not know whether it is important for your use case or not).
Agree that can be important in a particular use case when users has
dependencies on an other war artifact. (thanks for the catch! )

During dev on tomcat7 integration, I have just noticed that using the
embeded Tomcat class and adding a webapp as it:
tomcat.addWebapp( contextPath, path to a war file );
If the war file contains a context file ( META-INF/context.xml ) it's
not use automatically when adding the context/webapp.
So I have to manually add it with: setConfigFile ( new URL(
"jar:file:" + warPath + "!/META-INF/context.xml" ) ) (if exists in the
war).

Do you consider that as an issue ?



>
>>         // add classes directories to loader
>>
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>



-- 
Olivier Lamy
Talend : http://talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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

Reply via email to