archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <br...@apache.org>
Subject Re: svn commit: r583630 - /maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
Date Sun, 14 Oct 2007 03:37:55 GMT
I started to take a look at this - but before I get too far into it I  
realise this might be affected by some of the changes I commented  
about in the other commit where the v1 test XMLs were changed. I  
noticed the test case you committed also made some changes.

It may not have any bearing, but I'll hold off until you've had a  
chance to comment on those before I move forward.

- Brett

On 12/10/2007, at 5:47 PM, Brett Porter wrote:

> I'll take a look.
>
> On 11/10/2007, at 8:29 PM, Joakim Erdfelt wrote:
>
>> You are right, it doesn't work.
>> I can still get double repositories in the RepositoriesAction via  
>> the web browser.
>> And that line will not remove the double repositories. Added unit  
>> test to show that.
>> Open up archiva-configuration/src/test/java/org/apache/maven/ 
>> archiva/configuration/ArchivaConfigurationTest.java
>> and check out the /* commented */ XMLAssert's at the bottom of  
>> the .testAutoDetectV1() method.
>>
>> - Joakim
>>
>> Brett Porter wrote:
>>> Can you add a test to verify this?
>>>
>>> On 11/10/2007, at 12:15 AM, joakime@apache.org wrote:
>>>
>>>> Author: joakime
>>>> Date: Wed Oct 10 15:15:51 2007
>>>> New Revision: 583630
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=583630&view=rev
>>>> Log:
>>>> Eliminating duplicate repositories from showing up after the  
>>>> conversion.
>>>>
>>>> Modified:
>>>>     maven/archiva/trunk/archiva-base/archiva-configuration/src/ 
>>>> main/java/org/apache/maven/archiva/configuration/ 
>>>> DefaultArchivaConfiguration.java
>>>>
>>>> Modified: maven/archiva/trunk/archiva-base/archiva-configuration/ 
>>>> src/main/java/org/apache/maven/archiva/configuration/ 
>>>> DefaultArchivaConfiguration.java
>>>> URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva- 
>>>> base/archiva-configuration/src/main/java/org/apache/maven/ 
>>>> archiva/configuration/DefaultArchivaConfiguration.java? 
>>>> rev=583630&r1=583629&r2=583630&view=diff
>>>> =================================================================== 
>>>> ===========
>>>> --- maven/archiva/trunk/archiva-base/archiva-configuration/src/ 
>>>> main/java/org/apache/maven/archiva/configuration/ 
>>>> DefaultArchivaConfiguration.java (original)
>>>> +++ maven/archiva/trunk/archiva-base/archiva-configuration/src/ 
>>>> main/java/org/apache/maven/archiva/configuration/ 
>>>> DefaultArchivaConfiguration.java Wed Oct 10 15:15:51 2007
>>>> @@ -88,7 +88,7 @@
>>>>       * Configuration Listeners we've registered.
>>>>       */
>>>>      private Set<ConfigurationListener> listeners = new  
>>>> HashSet<ConfigurationListener>();
>>>> -
>>>> +
>>>>      /**
>>>>       * Registry Listeners we've registered.
>>>>       */
>>>> @@ -153,6 +153,9 @@
>>>>                      config.addRemoteRepository( repo );
>>>>                  }
>>>>              }
>>>> +
>>>> +            // Prevent duplicate repositories from showing up.
>>>> +            config.getRepositories().clear();
>>>>          }
>>>>
>>>>          // Normalize the order fields in the proxy connectors.
>>>> @@ -255,7 +258,7 @@
>>>>
>>>>          new ConfigurationRegistryWriter().write( configuration,  
>>>> section );
>>>>          section.save();
>>>> -
>>>> +
>>>>          triggerEvent( ConfigurationEvent.SAVED );
>>>>
>>>>          this.configuration = processExpressions( configuration );
>>>> @@ -278,8 +281,8 @@
>>>>          try
>>>>          {
>>>>              ( (Initializable) registry ).initialize();
>>>> -
>>>> -            for ( RegistryListener regListener:  
>>>> registryListeners )
>>>> +
>>>> +            for ( RegistryListener regListener :  
>>>> registryListeners )
>>>>              {
>>>>                  addRegistryChangeListener( regListener );
>>>>              }
>>>> @@ -288,7 +291,7 @@
>>>>          {
>>>>              throw new RegistryException( "Unable to  
>>>> reinitialize configuration: " + e.getMessage(), e );
>>>>          }
>>>> -
>>>> +
>>>>          triggerEvent( ConfigurationEvent.SAVED );
>>>>
>>>>          return registry.getSection( KEY + ".user" );
>>>> @@ -329,7 +332,7 @@
>>>>
>>>>          listeners.remove( listener );
>>>>      }
>>>> -
>>>> +
>>>>      public void addChangeListener( RegistryListener listener )
>>>>      {
>>>>          addRegistryChangeListener( listener );
>>>> @@ -351,7 +354,6 @@
>>>>              section.addChangeListener( listener );
>>>>          }
>>>>      }
>>>> -
>>>>
>>>>      public void initialize()
>>>>          throws InitializationException
>>>>
>>>
>>> -- 
>>> Brett Porter - brett@apache.org
>>> Blog: http://www.devzuz.org/blogs/bporter/
>>>
>>
>>
>> -- 
>> - Joakim Erdfelt
>>  joakim@erdfelt.com
>>  Open Source Software (OSS) Developer
>
> --
> Brett Porter - brett@apache.org
> Blog: http://www.devzuz.org/blogs/bporter/

--
Brett Porter - brett@apache.org
Blog: http://www.devzuz.org/blogs/bporter/

Mime
View raw message