import java.security.PrivilegedAction;
/**
- * TODO: Description.
+ * Applet that takes a file on the local filesystem and checksums it for sending to the server.
*
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
*/
import java.util.List;
/**
- * TODO [!]: Description.
+ * Base class for the artifact and metadata discoverers.
*
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
*/
* @param blacklistedPatterns pattern that lists any files to prevent from being included when scanning
* @param includeSnapshots whether to discover snapshots
* @return the list of artifacts discovered
- * @todo replace repositoryBase with wagon repository
* @todo do we want blacklisted patterns in another form? Part of the object construction?
* @todo should includeSnapshots be configuration on the component?
* @todo instead of a returned list, should a listener be passed in?
* @param blacklistedPatterns pattern that lists any files to prevent from being included when scanning
* @param includeSnapshots whether to discover snapshots
* @return the list of artifacts discovered
- * @todo replace repositoryBase with wagon repository
* @todo do we want blacklisted patterns in another form? Part of the object construction?
* @todo should includeSnapshots be configuration on the component?
* @todo instead of a returned list, should a listener be passed in?
}
catch ( FileNotFoundException fe )
{
- // TODO: log ignored metadata
+ // TODO: log ignored metadata!
}
catch ( XmlPullParserException xe )
{
- // TODO: log ignored metadata
+ // TODO: log ignored metadata!
}
catch ( MalformedURLException e )
{
- // TODO: log ignored metadata
+ // TODO: log ignored metadata!
}
catch ( IOException ie )
{
- // TODO: log ignored metadata
+ // TODO: log ignored metadata!
}
return metadata;
* @author Edwin Punzalan
* @plexus.component role="org.apache.maven.repository.proxy.ProxyManager"
* @todo too much of wagon manager is reproduced here because checksums need to be downloaded separately - is that necessary?
- * @todo this isn't reusing the parts of wagon manager than handle snapshots
+ * @todo this isn't reusing the parts of wagon manager than handle snapshots [!]
*/
public class DefaultProxyManager
extends AbstractLogEnabled
private ArtifactRepositoryPolicy getReleasesPolicy()
{
- //todo get policy configuration from ProxyConfiguration
+ //todo get policy configuration from ProxyConfiguration [!]
return new ArtifactRepositoryPolicy();
}
private ArtifactRepositoryPolicy getSnapshotsPolicy()
{
- //todo get policy configuration from ProxyConfiguration
+ //todo get policy configuration from ProxyConfiguration [!]
return new ArtifactRepositoryPolicy();
}
{
wagon = wagonManager.getWagon( repository.getProtocol() );
- //@todo configure wagonManager
+ //@todo configure wagonManager [!]
if ( useChecksum )
{
* Class used to bridge the servlet to the repository proxy implementation.
*
* @author Edwin Punzalan
- * @todo the names get() and getRemoteFile() are confusing
+ * @todo the names get() and getRemoteFile() are confusing [!]
*/
public interface ProxyManager
{
*
* @author Edwin Punzalan
* @plexus.component role="org.apache.maven.repository.proxy.configuration.ProxyConfiguration"
- * @todo investigate how these should be set - probably plexus configuration
+ * @todo investigate how these should be set - probably plexus configuration [!]
*/
public class ProxyConfiguration
{
{
private Cache cache;
- private static final double CACHE_HIT_RATIO = 0.5;
-
+ public static final double CACHE_HIT_RATIO = 0.5;
public CachedRepositoryQueryLayer( ArtifactRepository repository )
{
public class CachedRepositoryQueryLayerTest
extends AbstractRepositoryQueryLayerTestCase
{
- // TODO: share
- private static final double CACHE_HIT_RATIO = 0.5;
protected void setUp()
throws Exception
testContainsArtifactTrue();
assertEquals( 0, queryLayer.getCacheHitRate(), 0 );
testContainsArtifactTrue();
- assertEquals( CACHE_HIT_RATIO, queryLayer.getCacheHitRate(), 0 );
+ assertEquals( CachedRepositoryQueryLayer.CACHE_HIT_RATIO, queryLayer.getCacheHitRate(), 0 );
}
public void testUseMetadataCache()
testArtifactVersionsTrue();
assertEquals( 0, queryLayer.getCacheHitRate(), 0 );
testArtifactVersionsTrue();
- assertEquals( CACHE_HIT_RATIO, queryLayer.getCacheHitRate(), 0 );
+ assertEquals( CachedRepositoryQueryLayer.CACHE_HIT_RATIO, queryLayer.getCacheHitRate(), 0 );
}
public void testUseFileCacheOnSnapshot()
testContainsSnapshotArtifactTrue();
assertEquals( 0, queryLayer.getCacheHitRate(), 0 );
testContainsSnapshotArtifactTrue();
- assertEquals( CACHE_HIT_RATIO, queryLayer.getCacheHitRate(), 0 );
+ assertEquals( CachedRepositoryQueryLayer.CACHE_HIT_RATIO, queryLayer.getCacheHitRate(), 0 );
}
}
import java.util.List;
/**
- * TODO: Description.
+ * Search by package name.
*
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="org.apache.maven.repository.manager.web.action.PackageSearchAction"
return ERROR;
}
- // TODO: better config
+ // TODO: better config [!]
String indexPath = configuration.getIndexDirectory();
// TODO: reduce the amount of lookup?
import java.util.TreeMap;\r
\r
/**\r
- * TODO: Description.\r
+ * Browse the repository.\r
*\r
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="org.apache.maven.repository.manager.web.action.RepositoryBrowseAction"\r
*/\r
*
* @throws MalformedURLException
* @throws RepositoryIndexException
- * @todo why is this any different from legacy?
+ * @todo why is this any different from legacy? [!]
*/
protected void executeDiscovererInDefaultRepo()
throws MalformedURLException, RepositoryIndexException