mirror of
https://github.com/apache/archiva.git
synced 2025-02-08 02:59:43 +00:00
Merged /archiva/trunk:r882055-882383
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@882394 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
commit
69a38f7af5
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
@ -31,6 +30,7 @@
|
|||||||
import org.apache.maven.archiva.common.utils.VersionUtil;
|
import org.apache.maven.archiva.common.utils.VersionUtil;
|
||||||
import org.apache.maven.archiva.database.ArchivaDAO;
|
import org.apache.maven.archiva.database.ArchivaDAO;
|
||||||
import org.apache.maven.archiva.database.ArchivaDatabaseException;
|
import org.apache.maven.archiva.database.ArchivaDatabaseException;
|
||||||
|
import org.apache.maven.archiva.database.Constraint;
|
||||||
import org.apache.maven.archiva.database.ObjectNotFoundException;
|
import org.apache.maven.archiva.database.ObjectNotFoundException;
|
||||||
import org.apache.maven.archiva.database.constraints.ArtifactsRelatedConstraint;
|
import org.apache.maven.archiva.database.constraints.ArtifactsRelatedConstraint;
|
||||||
import org.apache.maven.archiva.database.constraints.ProjectsByArtifactUsageConstraint;
|
import org.apache.maven.archiva.database.constraints.ProjectsByArtifactUsageConstraint;
|
||||||
@ -142,7 +142,6 @@ public ArchivaProjectModel selectVersion( final String principal, final List<Str
|
|||||||
}
|
}
|
||||||
|
|
||||||
ArchivaArtifact pomArtifact = getArtifact( principal, observableRepositoryIds, groupId, artifactId, version );
|
ArchivaArtifact pomArtifact = getArtifact( principal, observableRepositoryIds, groupId, artifactId, version );
|
||||||
|
|
||||||
ArchivaProjectModel model;
|
ArchivaProjectModel model;
|
||||||
|
|
||||||
if ( !pomArtifact.getModel().isProcessed() )
|
if ( !pomArtifact.getModel().isProcessed() )
|
||||||
@ -153,6 +152,11 @@ public ArchivaProjectModel selectVersion( final String principal, final List<Str
|
|||||||
|
|
||||||
model = getProjectModel( groupId, artifactId, pomArtifact.getVersion() );
|
model = getProjectModel( groupId, artifactId, pomArtifact.getVersion() );
|
||||||
|
|
||||||
|
if ( model.getPackaging() == null || "".equals( model.getPackaging() ) )
|
||||||
|
{
|
||||||
|
model.setPackaging( pomArtifact.getType() );
|
||||||
|
}
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,42 +219,53 @@ private ArchivaArtifact getArtifact( final String principal, final List<String>
|
|||||||
throws ObjectNotFoundException, ArchivaDatabaseException
|
throws ObjectNotFoundException, ArchivaDatabaseException
|
||||||
{
|
{
|
||||||
ArchivaArtifact pomArtifact = null;
|
ArchivaArtifact pomArtifact = null;
|
||||||
|
Constraint constraint = new ArtifactsRelatedConstraint( groupId, artifactId, version );
|
||||||
|
|
||||||
for ( final String repositoryId : observableRepositoryIds )
|
try
|
||||||
{
|
{
|
||||||
try
|
List<ArchivaArtifact> artifacts = dao.getArtifactDAO().queryArtifacts( constraint );
|
||||||
|
|
||||||
|
// it's possible that similar artifacts reside in different repos
|
||||||
|
if ( !artifacts.isEmpty() )
|
||||||
{
|
{
|
||||||
pomArtifact =
|
for ( ArchivaArtifact artifact : artifacts )
|
||||||
dao.getArtifactDAO().getArtifact( groupId, artifactId, version, null, "pom", repositoryId );
|
{
|
||||||
break;
|
if ( observableRepositoryIds.contains( artifact.getRepositoryId() ) )
|
||||||
}
|
{
|
||||||
catch ( ArchivaDatabaseException e )
|
pomArtifact = artifacts.get( 0 );
|
||||||
{
|
break;
|
||||||
pomArtifact = handleGenericSnapshots( groupId, artifactId, version, repositoryId );
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch ( ArchivaDatabaseException e )
|
||||||
|
{
|
||||||
|
log.warn( "ArchivaDatabaseException occurred while querying for artifact '" + groupId + ":" + artifactId +
|
||||||
|
":" + version + "'." );
|
||||||
|
}
|
||||||
|
|
||||||
if ( pomArtifact == null )
|
if ( pomArtifact == null )
|
||||||
{
|
{
|
||||||
String type = getArtifactType( groupId, artifactId, version );
|
for ( final String repositoryId : observableRepositoryIds )
|
||||||
|
{
|
||||||
|
pomArtifact = handleGenericSnapshots( groupId, artifactId, version, repositoryId );
|
||||||
|
|
||||||
// We dont want these to persist in the database
|
if ( pomArtifact != null )
|
||||||
pomArtifact =
|
{
|
||||||
new ArchivaArtifact( groupId, artifactId, version, null, type, observableRepositoryIds.get( 0 ) );
|
break;
|
||||||
pomArtifact.getModel().setWhenProcessed( new Date() );
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allowed to see this?
|
// throw exception if pom artifact is still null!
|
||||||
if ( observableRepositoryIds.contains( pomArtifact.getModel().getRepositoryId() ) )
|
if ( pomArtifact == null )
|
||||||
{
|
|
||||||
return pomArtifact;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
throw new ObjectNotFoundException( "Unable to find artifact " + Keys.toKey( groupId, artifactId, version ) +
|
throw new ObjectNotFoundException( "Unable to find artifact " + Keys.toKey( groupId, artifactId, version ) +
|
||||||
" in observable repository [" + StringUtils.join( observableRepositoryIds.iterator(), ", " ) +
|
" in observable repository [" + StringUtils.join( observableRepositoryIds.iterator(), ", " ) +
|
||||||
"] for user " + principal );
|
"] for user " + principal );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return pomArtifact;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ArchivaProjectModel> getUsedBy( final String principal, final List<String> observableRepositoryIds,
|
public List<ArchivaProjectModel> getUsedBy( final String principal, final List<String> observableRepositoryIds,
|
||||||
@ -336,9 +351,17 @@ private ArchivaArtifact handleGenericSnapshots( final String groupId, final Stri
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
log.debug( "Retrieving artifact with version " + uniqueVersion );
|
log.debug( "Retrieving artifact with version " + uniqueVersion );
|
||||||
result =
|
Constraint constraint = new ArtifactsRelatedConstraint( groupId, artifactId, uniqueVersion );
|
||||||
dao.getArtifactDAO().getArtifact( groupId, artifactId, uniqueVersion, null, "pom", repositoryId );
|
List<ArchivaArtifact> artifacts = dao.getArtifactDAO().queryArtifacts( constraint );
|
||||||
break;
|
|
||||||
|
for ( ArchivaArtifact artifact : artifacts )
|
||||||
|
{
|
||||||
|
if ( artifact.getRepositoryId().equals( repositoryId ) )
|
||||||
|
{
|
||||||
|
result = artifact;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch ( ObjectNotFoundException e )
|
catch ( ObjectNotFoundException e )
|
||||||
{
|
{
|
||||||
|
@ -20,8 +20,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.maven.archiva.database.AbstractArchivaDatabaseTestCase;
|
import org.apache.maven.archiva.database.AbstractArchivaDatabaseTestCase;
|
||||||
import org.apache.maven.archiva.database.ArchivaDAO;
|
import org.apache.maven.archiva.database.ArchivaDatabaseException;
|
||||||
import org.apache.maven.archiva.database.ArtifactDAO;
|
import org.apache.maven.archiva.database.ArtifactDAO;
|
||||||
|
import org.apache.maven.archiva.database.Constraint;
|
||||||
|
import org.apache.maven.archiva.database.ObjectNotFoundException;
|
||||||
|
import org.apache.maven.archiva.database.constraints.ArtifactsRelatedConstraint;
|
||||||
import org.apache.maven.archiva.model.ArchivaArtifact;
|
import org.apache.maven.archiva.model.ArchivaArtifact;
|
||||||
import org.apache.maven.archiva.model.ArchivaProjectModel;
|
import org.apache.maven.archiva.model.ArchivaProjectModel;
|
||||||
|
|
||||||
@ -43,14 +46,14 @@ public class RepositoryBrowsingTest
|
|||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
GUEST_REPO_IDS = new ArrayList<String>();
|
GUEST_REPO_IDS = new ArrayList<String>();
|
||||||
GUEST_REPO_IDS.add( "central" );
|
|
||||||
GUEST_REPO_IDS.add( "snapshots" );
|
GUEST_REPO_IDS.add( "snapshots" );
|
||||||
|
GUEST_REPO_IDS.add( "central" );
|
||||||
}
|
}
|
||||||
|
|
||||||
private ArtifactDAO artifactDao;
|
private ArtifactDAO artifactDao;
|
||||||
|
|
||||||
public ArchivaArtifact createArtifact( String groupId, String artifactId, String version )
|
private ArchivaArtifact createArtifact( String groupId, String artifactId, String version )
|
||||||
{
|
{
|
||||||
ArchivaArtifact artifact = artifactDao.createArtifact( groupId, artifactId, version, "", "jar", "central" );
|
ArchivaArtifact artifact = artifactDao.createArtifact( groupId, artifactId, version, "", "jar", "central" );
|
||||||
artifact.getModel().setLastModified( new Date() ); // mandatory field.
|
artifact.getModel().setLastModified( new Date() ); // mandatory field.
|
||||||
@ -58,7 +61,7 @@ public ArchivaArtifact createArtifact( String groupId, String artifactId, String
|
|||||||
return artifact;
|
return artifact;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RepositoryBrowsing lookupBrowser()
|
private RepositoryBrowsing lookupBrowser()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
RepositoryBrowsing browser = (RepositoryBrowsing) lookup( RepositoryBrowsing.class );
|
RepositoryBrowsing browser = (RepositoryBrowsing) lookup( RepositoryBrowsing.class );
|
||||||
@ -66,7 +69,7 @@ public RepositoryBrowsing lookupBrowser()
|
|||||||
return browser;
|
return browser;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveTestData()
|
private void saveTestData()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
ArchivaArtifact artifact;
|
ArchivaArtifact artifact;
|
||||||
@ -74,46 +77,74 @@ public void saveTestData()
|
|||||||
// Setup artifacts in fresh DB.
|
// Setup artifacts in fresh DB.
|
||||||
artifact = createArtifact( "commons-lang", "commons-lang", "2.0" );
|
artifact = createArtifact( "commons-lang", "commons-lang", "2.0" );
|
||||||
artifactDao.saveArtifact( artifact );
|
artifactDao.saveArtifact( artifact );
|
||||||
|
assertArtifactWasSaved( "commons-lang", "commons-lang", "2.0" );
|
||||||
|
|
||||||
artifact = createArtifact( "commons-lang", "commons-lang", "2.1" );
|
artifact = createArtifact( "commons-lang", "commons-lang", "2.1" );
|
||||||
artifactDao.saveArtifact( artifact );
|
artifactDao.saveArtifact( artifact );
|
||||||
|
assertArtifactWasSaved( "commons-lang", "commons-lang", "2.1" );
|
||||||
|
|
||||||
artifact = createArtifact( "org.apache.maven.test", "test-one", "1.2" );
|
artifact = createArtifact( "org.apache.maven.test", "test-one", "1.2" );
|
||||||
artifactDao.saveArtifact( artifact );
|
artifactDao.saveArtifact( artifact );
|
||||||
|
assertArtifactWasSaved( "org.apache.maven.test", "test-one", "1.2" );
|
||||||
|
|
||||||
artifact = createArtifact( "org.apache.maven.test.foo", "test-two", "1.0" );
|
artifact = createArtifact( "org.apache.maven.test.foo", "test-two", "1.0" );
|
||||||
artifactDao.saveArtifact( artifact );
|
artifactDao.saveArtifact( artifact );
|
||||||
|
assertArtifactWasSaved( "org.apache.maven.test.foo", "test-two", "1.0" );
|
||||||
|
|
||||||
artifact = createArtifact( "org.apache.maven.shared", "test-two", "2.0" );
|
artifact = createArtifact( "org.apache.maven.shared", "test-two", "2.0" );
|
||||||
artifactDao.saveArtifact( artifact );
|
artifactDao.saveArtifact( artifact );
|
||||||
|
assertArtifactWasSaved( "org.apache.maven.shared", "test-two", "2.0" );
|
||||||
|
|
||||||
artifact = createArtifact( "org.apache.maven.shared", "test-two", "2.1-SNAPSHOT" );
|
artifact = createArtifact( "org.apache.maven.shared", "test-two", "2.1-SNAPSHOT" );
|
||||||
artifactDao.saveArtifact( artifact );
|
artifactDao.saveArtifact( artifact );
|
||||||
|
assertArtifactWasSaved( "org.apache.maven.shared", "test-two", "2.1-SNAPSHOT" );
|
||||||
|
|
||||||
artifact = createArtifact( "org.apache.maven.shared", "test-two", "2.1-20070522.143249-1" );
|
artifact = createArtifact( "org.apache.maven.shared", "test-two", "2.1-20070522.143249-1" );
|
||||||
artifactDao.saveArtifact( artifact );
|
artifactDao.saveArtifact( artifact );
|
||||||
|
assertArtifactWasSaved( "org.apache.maven.shared", "test-two", "2.1-20070522.143249-1" );
|
||||||
|
|
||||||
artifact = createArtifact( "org.apache.maven.shared", "test-two", "2.1-20070522.153141-2" );
|
artifact = createArtifact( "org.apache.maven.shared", "test-two", "2.1-20070522.153141-2" );
|
||||||
artifactDao.saveArtifact( artifact );
|
artifactDao.saveArtifact( artifact );
|
||||||
|
assertArtifactWasSaved( "org.apache.maven.shared", "test-two", "2.1-20070522.153141-2" );
|
||||||
|
|
||||||
artifact = createArtifact( "org.apache.maven.shared", "test-two", "2.1.1" );
|
artifact = createArtifact( "org.apache.maven.shared", "test-two", "2.1.1" );
|
||||||
artifactDao.saveArtifact( artifact );
|
artifactDao.saveArtifact( artifact );
|
||||||
|
assertArtifactWasSaved( "org.apache.maven.shared", "test-two", "2.1.1" );
|
||||||
|
|
||||||
artifact = createArtifact( "org.apache.maven.shared", "test-two", "2.1-alpha-1" );
|
artifact = createArtifact( "org.apache.maven.shared", "test-two", "2.1-alpha-1" );
|
||||||
artifactDao.saveArtifact( artifact );
|
artifactDao.saveArtifact( artifact );
|
||||||
|
assertArtifactWasSaved( "org.apache.maven.shared", "test-two", "2.1-alpha-1" );
|
||||||
|
|
||||||
artifact = createArtifact( "org.apache.maven.shared", "test-bar", "2.1" );
|
artifact = createArtifact( "org.apache.maven.shared", "test-bar", "2.1" );
|
||||||
artifactDao.saveArtifact( artifact );
|
artifactDao.saveArtifact( artifact );
|
||||||
|
assertArtifactWasSaved( "org.apache.maven.shared", "test-bar", "2.1" );
|
||||||
|
|
||||||
artifact = createArtifact( "org.codehaus.modello", "modellong", "3.0" );
|
artifact = createArtifact( "org.codehaus.modello", "modellong", "3.0" );
|
||||||
artifactDao.saveArtifact( artifact );
|
artifactDao.saveArtifact( artifact );
|
||||||
|
assertArtifactWasSaved( "org.codehaus.modello", "modellong", "3.0" );
|
||||||
|
|
||||||
|
artifact = createArtifact( "org.apache.archiva", "archiva-indexer", "1.0-20070522.143249-1" );
|
||||||
|
artifactDao.saveArtifact( artifact );
|
||||||
|
assertArtifactWasSaved( "org.apache.archiva", "archiva-indexer", "1.0-20070522.143249-1" );
|
||||||
|
|
||||||
|
artifact = createArtifact( "org.apache.archiva", "archiva-indexer", "1.0-20070522.153141-2" );
|
||||||
|
artifactDao.saveArtifact( artifact );
|
||||||
|
assertArtifactWasSaved( "org.apache.archiva", "archiva-indexer", "1.0-20070522.153141-2" );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void assertArtifactWasSaved(String groupId, String artifactId, String version)
|
||||||
|
throws ObjectNotFoundException, ArchivaDatabaseException
|
||||||
|
{
|
||||||
|
Constraint constraint = new ArtifactsRelatedConstraint( groupId, artifactId, version );
|
||||||
|
List<ArchivaArtifact> artifacts = artifactDao.queryArtifacts( constraint );
|
||||||
|
|
||||||
|
assertFalse( "Artifact '" + groupId + ":" + artifactId + ":" + version + "' should have been found.",
|
||||||
|
artifacts.isEmpty() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBrowseIntoGroupWithSubgroups()
|
public void testBrowseIntoGroupWithSubgroups()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
saveTestData();
|
|
||||||
|
|
||||||
RepositoryBrowsing browser = lookupBrowser();
|
RepositoryBrowsing browser = lookupBrowser();
|
||||||
BrowsingResults results = browser.selectGroupId( USER_GUEST, GUEST_REPO_IDS, "org.apache.maven.test" );
|
BrowsingResults results = browser.selectGroupId( USER_GUEST, GUEST_REPO_IDS, "org.apache.maven.test" );
|
||||||
assertNotNull( "Browsing Results should not be null.", results );
|
assertNotNull( "Browsing Results should not be null.", results );
|
||||||
@ -125,8 +156,6 @@ public void testBrowseIntoGroupWithSubgroups()
|
|||||||
public void testSimpleBrowse()
|
public void testSimpleBrowse()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
saveTestData();
|
|
||||||
|
|
||||||
RepositoryBrowsing browser = lookupBrowser();
|
RepositoryBrowsing browser = lookupBrowser();
|
||||||
BrowsingResults results = browser.getRoot( USER_GUEST, GUEST_REPO_IDS );
|
BrowsingResults results = browser.getRoot( USER_GUEST, GUEST_REPO_IDS );
|
||||||
assertNotNull( "Browsing Results should not be null.", results );
|
assertNotNull( "Browsing Results should not be null.", results );
|
||||||
@ -139,21 +168,37 @@ public void testSimpleBrowse()
|
|||||||
public void testViewArtifact()
|
public void testViewArtifact()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
saveTestData();
|
|
||||||
|
|
||||||
RepositoryBrowsing browser = lookupBrowser();
|
RepositoryBrowsing browser = lookupBrowser();
|
||||||
ArchivaProjectModel artifact = browser.selectVersion( USER_GUEST, GUEST_REPO_IDS, "org.apache.commons", "commons-lang", "2.0" );
|
ArchivaProjectModel artifact = browser.selectVersion( USER_GUEST, GUEST_REPO_IDS, "commons-lang", "commons-lang", "2.0" );
|
||||||
assertNotNull( "Artifact should not be null.", artifact );
|
assertNotNull( "Artifact should not be null.", artifact );
|
||||||
assertEquals( "org.apache.commons", artifact.getGroupId() );
|
assertEquals( "commons-lang", artifact.getGroupId() );
|
||||||
assertEquals( "commons-lang", artifact.getArtifactId() );
|
assertEquals( "commons-lang", artifact.getArtifactId() );
|
||||||
assertEquals( "2.0", artifact.getVersion() );
|
assertEquals( "2.0", artifact.getVersion() );
|
||||||
|
assertEquals( "jar", artifact.getPackaging() );
|
||||||
|
|
||||||
|
// MRM-1278
|
||||||
|
String repoId = browser.getRepositoryId( USER_GUEST, GUEST_REPO_IDS, "commons-lang", "commons-lang", "2.0" );
|
||||||
|
assertEquals( "central", repoId );
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testViewArtifactWithMultipleTimestampedVersions()
|
||||||
|
throws Exception
|
||||||
|
{
|
||||||
|
RepositoryBrowsing browser = lookupBrowser();
|
||||||
|
ArchivaProjectModel artifact = browser.selectVersion( USER_GUEST, GUEST_REPO_IDS, "org.apache.archiva", "archiva-indexer", "1.0-SNAPSHOT" );
|
||||||
|
assertNotNull( "Artifact should not be null.", artifact );
|
||||||
|
assertEquals( "org.apache.archiva", artifact.getGroupId() );
|
||||||
|
assertEquals( "archiva-indexer", artifact.getArtifactId() );
|
||||||
|
assertEquals( "1.0-20070522.143249-1", artifact.getVersion() );
|
||||||
|
assertEquals( "jar", artifact.getPackaging() );
|
||||||
|
|
||||||
|
String repoId = browser.getRepositoryId( USER_GUEST, GUEST_REPO_IDS, "org.apache.archiva", "archiva-indexer", "1.0-SNAPSHOT" );
|
||||||
|
assertEquals( "central", repoId );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSelectArtifactId()
|
public void testSelectArtifactId()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
saveTestData();
|
|
||||||
|
|
||||||
RepositoryBrowsing browser = lookupBrowser();
|
RepositoryBrowsing browser = lookupBrowser();
|
||||||
BrowsingResults results =
|
BrowsingResults results =
|
||||||
browser.selectArtifactId( USER_GUEST, GUEST_REPO_IDS, "org.apache.maven.shared", "test-two" );
|
browser.selectArtifactId( USER_GUEST, GUEST_REPO_IDS, "org.apache.maven.shared", "test-two" );
|
||||||
@ -168,8 +213,6 @@ public void testSelectArtifactId()
|
|||||||
public void testGetOtherSnapshotVersionsRequestedVersionIsGeneric()
|
public void testGetOtherSnapshotVersionsRequestedVersionIsGeneric()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
saveTestData();
|
|
||||||
|
|
||||||
RepositoryBrowsing browser = lookupBrowser();
|
RepositoryBrowsing browser = lookupBrowser();
|
||||||
List<String> results =
|
List<String> results =
|
||||||
browser.getOtherSnapshotVersions( GUEST_REPO_IDS, "org.apache.maven.shared", "test-two", "2.1-SNAPSHOT" );
|
browser.getOtherSnapshotVersions( GUEST_REPO_IDS, "org.apache.maven.shared", "test-two", "2.1-SNAPSHOT" );
|
||||||
@ -183,8 +226,6 @@ public void testGetOtherSnapshotVersionsRequestedVersionIsGeneric()
|
|||||||
public void testGetOtherSnapshotVersionsRequestedVersionIsUnique()
|
public void testGetOtherSnapshotVersionsRequestedVersionIsUnique()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
saveTestData();
|
|
||||||
|
|
||||||
RepositoryBrowsing browser = lookupBrowser();
|
RepositoryBrowsing browser = lookupBrowser();
|
||||||
List<String> results =
|
List<String> results =
|
||||||
browser.getOtherSnapshotVersions( GUEST_REPO_IDS, "org.apache.maven.shared", "test-two", "2.1-20070522.143249-1" );
|
browser.getOtherSnapshotVersions( GUEST_REPO_IDS, "org.apache.maven.shared", "test-two", "2.1-20070522.143249-1" );
|
||||||
@ -212,8 +253,8 @@ protected void setUp()
|
|||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
ArchivaDAO dao = (ArchivaDAO) lookup( ArchivaDAO.ROLE, "jdo" );
|
artifactDao = dao.getArtifactDAO();
|
||||||
artifactDao = dao.getArtifactDAO();
|
saveTestData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user