You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/10/24 09:17:23 UTC

cvs commit: avalon/merlin/kernel/unit/src/java/org/apache/avalon/merlin/unit DefaultEmbeddedKernel.java

mcconnell    2003/10/24 00:17:23

  Modified:    merlin/kernel/unit/src/java/org/apache/avalon/merlin/unit
                        DefaultEmbeddedKernel.java
  Log:
  Fix the defaults for remote repoisitories.
  
  Revision  Changes    Path
  1.3       +25 -1     avalon/merlin/kernel/unit/src/java/org/apache/avalon/merlin/unit/DefaultEmbeddedKernel.java
  
  Index: DefaultEmbeddedKernel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/unit/src/java/org/apache/avalon/merlin/unit/DefaultEmbeddedKernel.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultEmbeddedKernel.java	19 Oct 2003 06:12:59 -0000	1.2
  +++ DefaultEmbeddedKernel.java	24 Oct 2003 07:17:23 -0000	1.3
  @@ -103,6 +103,25 @@
       private static final String CONTINUE = "continue";
       private static final String EXIT = "exit";
   
  +    private static final URL DPML = createURL( "http://dpml.net/" );
  +    private static final URL IBIBLIO = createURL( "http://www.ibiblio.org/maven/" );
  +    private static final URL[] DEFAULT_REMOTE_URLS = new URL[]{ DPML, IBIBLIO };
  +
  +    private static URL createURL( String path )
  +    {
  +        try
  +        {
  +            return new URL( path );
  +        }
  +        catch( Throwable e )
  +        {
  +            // will not happen
  +            final String error =  
  +              "Unexpect error while building url: " + path;
  +            throw new UnitRuntimeException( error, e );
  +        }
  +    }
  +
       //--------------------------------------------------------
       // state
       //--------------------------------------------------------
  @@ -446,7 +465,10 @@
       {
           ArrayList list = new ArrayList();
           String path = System.getProperty( "maven.repo.remote" );
  -        if( path == null ) return new URL[0];
  +        if( path == null ) 
  +        {
  +            return DEFAULT_REMOTE_URLS;
  +        }
   
           StringTokenizer tokenizer = new StringTokenizer( path, "," );
           while( tokenizer.hasMoreElements() )
  @@ -490,6 +512,8 @@
   
      /**
       * Return the file corresponding  to the merlin system repository.
  +    * Currently hardwired to use the maven repository until we get the 
  +    * Merlin environment stuff in place.
       *
       * @return the system repository directory
       */
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org