akarasulu 2003/11/02 22:35:41
Modified: merlin/repository/spi project.xml
Added: merlin/repository/spi/src/java/org/apache/avalon/repository
RepositoryConfig.java RepositoryFactory.java
RepositoryLoader.java repository.properties
merlin/repository/spi/src/test/org/apache/avalon/repository
RepositoryLoaderTest.java
Log:
Added a repository configuration bean and bootstrapping code.
Revision Changes Path
1.1
avalon/merlin/repository/spi/src/java/org/apache/avalon/repository/RepositoryConfig.java
Index: RepositoryConfig.java
===================================================================
/*
============================================================================
The Apache Software License, Version 1.1
============================================================================
Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
"Apache Software Foundation" must not be used to endorse or promote
products derived from this software without prior written
permission. For written permission, please contact [EMAIL PROTECTED]
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation. For more information on the
Apache Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.avalon.repository ;
import java.net.URL ;
import java.net.MalformedURLException ;
/**
* Repository configuration parameters bean.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Alex Karasulu</a>
* @author $Author: akarasulu $
* @version $Revision: 1.1 $
*/
public class RepositoryConfig
{
/** the set of remote repositories to pull jars from */
private URL [] m_remoteRepositories = null ;
/** the path to the local repository that caches remote artifacts */
private String m_localRepository = null ;
/** descriptor for proxy used to access remote repositories */
private ProxyContext m_proxyCtx = null ;
/**
* Gets the ProxyContext used by the Kernel to access remote repositories.
*
* @return the proxy context used by the Kernel
*/
public ProxyContext getProxyContext()
{
return m_proxyCtx ;
}
/**
* Sets the ProxyContext for this KernelConfig.
*
* @param a_proxyCtx sets the proxy context
*/
public void setProxyContext( ProxyContext a_proxyCtx )
{
m_proxyCtx = a_proxyCtx ;
}
/**
* Gets the set of remote repositories used to download artifacts.
*
* @return the remote repositories to use
*/
public URL[] getRemoteRepositories()
{
return m_remoteRepositories ;
}
/**
* @param a_remoteRepositoryUrls the remote Repositories to use.
*/
public void setRemoteRepositoryUrls( URL[] a_remoteRepositories )
{
m_remoteRepositories = a_remoteRepositories ;
}
/**
* @param a_remoteRepositoryUrls the remote Repositories to use.
*/
public void setRemoteRepositoryUrls( String[] a_remoteRepositories )
throws MalformedURLException
{
URL [] a_urls = new URL [a_remoteRepositories.length] ;
for ( int ii = 0; ii < a_urls.length; ii++ )
{
a_urls[ii] = new URL( a_remoteRepositories[ii] ) ;
}
m_remoteRepositories = a_urls ;
}
/**
* @return Returns the localRepository.
*/
public String getLocalRepository()
{
return m_localRepository ;
}
/**
* @param a_localRepository the localRepository to set
*/
public void setLocalRepository( String a_localRepository )
{
m_localRepository = a_localRepository ;
}
}
1.1
avalon/merlin/repository/spi/src/java/org/apache/avalon/repository/RepositoryFactory.java
Index: RepositoryFactory.java
===================================================================
/*
============================================================================
The Apache Software License, Version 1.1
============================================================================
Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
"Apache Software Foundation" must not be used to endorse or promote
products derived from this software without prior written
permission. For written permission, please contact [EMAIL PROTECTED]
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation. For more information on the
Apache Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.avalon.repository ;
/**
* Interface for Repository factories.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Alex Karasulu</a>
* @author $Author: akarasulu $
* @version $Revision: 1.1 $
*/
public interface RepositoryFactory
{
/**
* Creates a new default configuration bean populated with default values.
*
* @return a default configuration bean used for Repository creation
* @throws RepositoryException if there is a problem generating defaults
*/
RepositoryConfig getDefaultConfig() throws RepositoryException ;
/**
* Creates a new Repository using a configuration bean.
*
* @param a_config the Repository configuration bean
* @return the newly created Repository
* @throws RepositoryException if there is a problem creating the Repository
*/
Repository create( RepositoryConfig a_config ) throws RepositoryException ;
}
1.1
avalon/merlin/repository/spi/src/java/org/apache/avalon/repository/RepositoryLoader.java
Index: RepositoryLoader.java
===================================================================
/*
============================================================================
The Apache Software License, Version 1.1
============================================================================
Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
"Apache Software Foundation" must not be used to endorse or promote
products derived from this software without prior written
permission. For written permission, please contact [EMAIL PROTECTED]
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation. For more information on the
Apache Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.avalon.repository ;
import java.io.File ;
import java.io.IOException ;
import java.io.InputStream ;
import java.io.FileOutputStream ;
import java.util.ArrayList ;
import java.util.Properties ;
import java.util.Enumeration ;
import java.net.URL ;
import java.net.URLConnection ;
import java.net.URLClassLoader ;
import java.net.HttpURLConnection ;
import java.net.MalformedURLException ;
/**
* Sets up the environment to create repositories by downloading the required
* jars, preparing a ClassLoader and delegating calls to repository factory
* methods using a newly configured ClassLoader.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Alex Karasulu</a>
* @author $Author: akarasulu $
* @version $Revision: 1.1 $
*/
public class RepositoryLoader implements RepositoryFactory
{
/** base property key for the urls of the required jars */
public static final String URLS_BASE = "url" ;
/** factory delegate implementation class name key */
public static final String FACTORY_KEY = "factory" ;
/** the properties file containing seed information */
public static final String PROPS = "repository.properties" ;
/** the delegate repository factory instantiated */
private RepositoryFactory m_delegate = null ;
// ------------------------------------------------------------------------
// C O N S T R U C T O R S
// ------------------------------------------------------------------------
/**
* Creates a repository loader which loads a default repository factory
* and delegates calls to it.
*
* @throws RepositoryException
*/
public RepositoryLoader() throws RepositoryException
{
/*
* Create the temporary directory to pull down files into
*/
String l_userHome = System.getProperty( "user.home" ) ;
File l_tmpDir = new File( l_userHome, ".bootstrap" ) ;
if ( ! l_tmpDir.exists() )
{
l_tmpDir.mkdirs() ;
}
/*
* Load default bootstrap (seed) properties
*/
Properties l_props = new Properties() ;
try
{
Class l_clazz = RepositoryLoader.class ;
l_props.load( l_clazz.getResourceAsStream( PROPS ) ) ;
}
catch( IOException e )
{
throw new RepositoryException( "Failed to read " + PROPS, e ) ;
}
/*
* Pull down all jars required to bootstrap the repository
*/
ArrayList l_urlsList = new ArrayList() ;
Enumeration l_list = l_props.propertyNames() ;
while ( l_list.hasMoreElements() )
{
String l_key = ( String ) l_list.nextElement() ;
if ( ! l_key.startsWith( URLS_BASE ) )
{
continue ;
}
String l_url = l_props.getProperty( l_key ) ;
int l_fileIdx = l_url.lastIndexOf( '/' ) ;
String l_fileName = l_url.substring( l_fileIdx + 1 ) ;
File l_localFile = new File( l_tmpDir, l_fileName ) ;
boolean l_isSuccess = false ;
try
{
l_isSuccess = getTempFile( l_url, l_localFile, true ) ;
}
catch ( Exception e )
{
throw new RepositoryException(
"Failed to download bootstrap jar: " + l_url, e ) ;
}
try
{
l_urlsList.add( new URL( l_url ) ) ;
}
catch ( MalformedURLException e )
{
throw new RepositoryException( l_url + " not a valid URL", e ) ;
}
}
/*
* Check that we have the factory implementation for the delegate
*/
if ( ! l_props.containsKey( FACTORY_KEY ) )
{
throw new RepositoryException( "Factory property " + FACTORY_KEY
+ " must be defined for a factory implementation." ) ;
}
/*
* Create the factory class loaders and instantiate the delegate factory
*/
String l_factory = l_props.getProperty( FACTORY_KEY ) ;
ClassLoader l_loader = new URLClassLoader( ( URL [] )
l_urlsList.toArray( new URL [0] ),
Thread.currentThread().getContextClassLoader() ) ;
try
{
Class l_clazz = l_loader.loadClass( l_factory ) ;
m_delegate = ( RepositoryFactory ) l_clazz.newInstance() ;
}
catch( IllegalAccessException e )
{
throw new RepositoryException( "Could not default constructor on: "
+ l_factory, e ) ;
}
catch( InstantiationException e )
{
throw new RepositoryException(
"Could not instantiate the factory class: " + l_factory, e ) ;
}
catch( ClassNotFoundException e )
{
throw new RepositoryException( "Could not find the factory class: "
+ l_factory, e ) ;
}
}
// ------------------------------------------------------------------------
// RepositoryFactory Implementations
// ------------------------------------------------------------------------
/**
* Factory method that creates a repository by calling the delegate factory.
*
* @param a_config a repository configuration bean
* @return the newly created repository
* @throws RepositoryException if there is a failure while creating the repo
* @see org.apache.avalon.repository.RepositoryFactory#
* create(org.apache.avalon.repository.RepositoryConfig)
*/
public Repository create( RepositoryConfig a_config )
throws RepositoryException
{
return m_delegate.create( a_config ) ;
}
/**
* Factory method that creates a default repository configuration bean
* by calling the delegate factory.
*
* @see org.apache.avalon.repository.RepositoryFactory#getDefaultConfig()
*/
public RepositoryConfig getDefaultConfig() throws RepositoryException
{
return m_delegate.getDefaultConfig() ;
}
// ------------------------------------------------------------------------
// Utility Methods
// ------------------------------------------------------------------------
/**
* Retrieve a remote file. Returns true if the file was successfully
* retrieved or if it is up to date (when the useTimestamp flag is set).
*
* Moved here from HttpController.
*
* @param a_url the of the file to retrieve
* @param a_destFile where to store it
* @param a_useTimestamp whether to check the modified timestamp on the
* <code>destinationFile</code> against the remote <code>source</code>
* @return TRUE if the file was updated else FALSE
*/
public static boolean getTempFile( String a_url, File a_destFile,
boolean a_useTimestamp ) throws Exception
{
URL l_source = null ;
String l_username = null ;
String l_password = null ;
// We want to be able to deal with Basic Auth where the username
// and password are part of the URL. An example of the URL string
// we would like to be able to parse is like the following:
//
// http://username:[EMAIL PROTECTED]
int l_atIdx = a_url.indexOf( "@" ) ;
if ( l_atIdx > 0 )
{
String s = a_url.substring( 7, l_atIdx ) ;
int l_colonIdx = s.indexOf( ":" ) ;
l_username = s.substring( 0, l_colonIdx ) ;
l_password = s.substring( l_colonIdx + 1 ) ;
l_source = new URL( "http://" + a_url.substring( l_atIdx + 1 ) ) ;
}
else
{
l_source = new URL( a_url ) ;
}
//set the timestamp to the file date.
long l_timestamp = 0 ;
boolean l_hasTimestamp = false ;
if ( a_useTimestamp && a_destFile.exists() )
{
l_timestamp = a_destFile.lastModified() ;
l_hasTimestamp = true ;
}
//set up the URL connection
URLConnection l_connection = l_source.openConnection() ;
//modify the headers
//NB: things like user authentication could go in here too.
if ( a_useTimestamp && l_hasTimestamp )
{
l_connection.setIfModifiedSince( l_timestamp ) ;
}
//connect to the remote site (may take some time)
l_connection.connect() ;
//next test for a 304 result (HTTP only)
if ( l_connection instanceof HttpURLConnection )
{
HttpURLConnection l_httpConnection =
( HttpURLConnection ) l_connection ;
if ( l_httpConnection.getResponseCode() ==
HttpURLConnection.HTTP_NOT_MODIFIED )
{
return false ;
}
// test for 401 result (HTTP only)
if ( l_httpConnection.getResponseCode() ==
HttpURLConnection.HTTP_UNAUTHORIZED )
{
throw new Exception( "Not authorized." ) ;
}
}
// REVISIT: at this point even non HTTP connections may support the
// if-modified-since behaviour - we just check the date of the
// content and skip the write if it is not newer.
// Some protocols (FTP) dont include dates, of course.
InputStream l_in = null ;
for ( int ii = 0; ii < 3; ii++ )
{
try
{
l_in = l_connection.getInputStream() ;
break ;
}
catch ( IOException ex )
{
// do nothing
}
}
if ( l_in == null )
{
final String error =
"Connection returned a null input stream: " + a_url ;
throw new IOException( error ) ;
}
File parent = a_destFile.getParentFile() ;
parent.mkdirs() ;
FileOutputStream l_out = new FileOutputStream( a_destFile ) ;
byte[] buffer = new byte[100 * 1024] ;
int length ;
System.out.print( "Source: " + l_source + "\n") ;
while ( ( length = l_in.read( buffer ) ) >= 0 )
{
l_out.write( buffer, 0, length ) ;
System.out.print( "." ) ;
}
System.out.println( "" ) ;
l_out.close() ;
l_in.close() ;
// if (and only if) the use file time option is set, then the
// saved file now has its timestamp set to that of the downloaded
// file
if ( a_useTimestamp )
{
long l_remoteTimestamp = l_connection.getLastModified() ;
if ( l_remoteTimestamp != 0 )
{
long l_modifiedTime ;
if ( l_remoteTimestamp < 0 )
{
l_modifiedTime = System.currentTimeMillis() ;
}
else
{
l_modifiedTime = l_remoteTimestamp ;
}
a_destFile.setLastModified( l_modifiedTime ) ;
return true ;
}
}
return true ;
}
}
1.1
avalon/merlin/repository/spi/src/java/org/apache/avalon/repository/repository.properties
Index: repository.properties
===================================================================
factory=org.apache.avalon.repository.impl.DefaultFactory
local.repository.path=.repository
remote.repository.url.0=http://ibiblio.org/maven
#url.0=http://ibiblio.org/maven/avalon-repository/jars/avalon-repository-spi-SNAPSHOT.jar
#url.1=http://ibiblio.org/maven/avalon-repository/jars/avalon-repository-impl-SNAPSHOT.jar
url.2=file:../../util/defaults/target/avalon-util-defaults-1.0-dev.jar
url.3=file:../../util/env/target/avalon-util-env-1.0-dev.jar
url.4=file:../../repository/impl/target/avalon-repository-impl-1.0b1.jar
url.5=file:../../repository/spi/target/avalon-repository-spi-1.0b1.jar
1.1
avalon/merlin/repository/spi/src/test/org/apache/avalon/repository/RepositoryLoaderTest.java
Index: RepositoryLoaderTest.java
===================================================================
/*
============================================================================
The Apache Software License, Version 1.1
============================================================================
Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
"Apache Software Foundation" must not be used to endorse or promote
products derived from this software without prior written
permission. For written permission, please contact [EMAIL PROTECTED]
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation. For more information on the
Apache Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.avalon.repository ;
import junit.framework.TestCase ;
/**
* @todo
* @author <a href="mailto:[EMAIL PROTECTED]">Alex Karasulu</a>
* @author $Author: akarasulu $
* @version $Revision: 1.1 $
*/
public class RepositoryLoaderTest extends TestCase
{
public static void main(String[] args)
{
junit.textui.TestRunner.run(RepositoryLoaderTest.class);
}
/*
* @see TestCase#setUp()
*/
protected void setUp() throws Exception
{
super.setUp();
}
/*
* @see TestCase#tearDown()
*/
protected void tearDown() throws Exception
{
super.tearDown();
}
/**
* Constructor for RepositoryLoaderTest.
* @param arg0
*/
public RepositoryLoaderTest(String arg0)
{
super(arg0);
}
public void testRepositoryLoader() throws Exception
{
//RepositoryLoader l_loader = new RepositoryLoader() ;
//assertNotNull( l_loader ) ;
}
public void testGetDefaultConfig() throws Exception
{
RepositoryLoader l_loader = new RepositoryLoader() ;
assertNotNull( l_loader ) ;
RepositoryConfig l_config = l_loader.getDefaultConfig() ;
assertNotNull( l_config ) ;
}
public void testGetTempFile()
{
//@todo Implement getTempFile().
}
}
1.2 +43 -0 avalon/merlin/repository/spi/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/avalon/merlin/repository/spi/project.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- project.xml 24 Sep 2003 09:36:00 -0000 1.1
+++ project.xml 3 Nov 2003 06:35:41 -0000 1.2
@@ -14,4 +14,47 @@
<inceptionYear>2002</inceptionYear>
<shortDescription>Avalon Repository SPI</shortDescription>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+
+ <sourceDirectory>${basedir}/src/java/</sourceDirectory>
+ <unitTestSourceDirectory>${basedir}/src/test/</unitTestSourceDirectory>
+
+ <unitTest>
+ <includes>
+ <include>**/*Test.*</include>
+ <include>**/*TestCase.*</include>
+ </includes>
+ <excludes>
+ <exclude>**/Abstract*.*</exclude>
+ </excludes>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/test</directory>
+ <includes>
+ <include>**/*.x*</include>
+ </includes>
+ </resource>
+ </resources>
+ </unitTest>
+
+ <resources>
+ <resource>
+ <directory>${basedir}/src/java</directory>
+ <includes>
+ <include>**/*.properties</include>
+ </includes>
+ </resource>
+ </resources>
+
+ <jars></jars>
+
+ </build>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]