1 package org.apache.archiva.repository.metadata;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
22 import org.apache.archiva.admin.model.beans.ManagedRepository;
23 import org.apache.commons.io.FileUtils;
24 import org.apache.commons.lang.StringUtils;
25 import org.apache.archiva.common.utils.VersionComparator;
26 import org.apache.archiva.configuration.ProxyConnectorConfiguration;
27 import org.apache.archiva.model.ProjectReference;
28 import org.apache.archiva.model.VersionedReference;
29 import org.apache.archiva.policies.CachedFailuresPolicy;
30 import org.apache.archiva.policies.ChecksumPolicy;
31 import org.apache.archiva.policies.ReleasesPolicy;
32 import org.apache.archiva.policies.SnapshotsPolicy;
33 import org.apache.archiva.repository.AbstractRepositoryLayerTestCase;
34 import org.apache.archiva.repository.ManagedRepositoryContent;
35 import org.apache.archiva.repository.MockConfiguration;
36 import org.apache.archiva.repository.RemoteRepositoryContent;
37 import org.apache.archiva.repository.layout.LayoutException;
38 import org.custommonkey.xmlunit.DetailedDiff;
39 import org.custommonkey.xmlunit.Diff;
40 import org.junit.Test;
41 import org.springframework.test.context.ContextConfiguration;
42 import org.xml.sax.SAXException;
45 import java.io.IOException;
46 import java.util.ArrayList;
47 import java.util.Collections;
48 import java.util.List;
50 import javax.inject.Inject;
51 import javax.inject.Named;
52 import javax.xml.parsers.ParserConfigurationException;
54 import static org.junit.Assert.*;
61 @ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-metadata-tools-test.xml" } )
62 public class MetadataToolsTest
63 extends AbstractRepositoryLayerTestCase
65 @Inject @Named(value = "metadataTools#test")
66 private MetadataTools tools;
69 @Named( value = "archivaConfiguration#mock" )
70 protected MockConfiguration config;
73 public void testGatherSnapshotVersionsA()
76 removeProxyConnector( "test-repo", "apache-snapshots" );
77 removeProxyConnector( "test-repo", "internal-snapshots" );
78 removeProxyConnector( "test-repo", "snapshots.codehaus.org" );
80 assertSnapshotVersions( "snap_shots_a", "1.0-alpha-11-SNAPSHOT",
81 new String[]{ "1.0-alpha-11-SNAPSHOT", "1.0-alpha-11-20070221.194724-2",
82 "1.0-alpha-11-20070302.212723-3", "1.0-alpha-11-20070303.152828-4",
83 "1.0-alpha-11-20070305.215149-5", "1.0-alpha-11-20070307.170909-6",
84 "1.0-alpha-11-20070314.211405-9", "1.0-alpha-11-20070316.175232-11" } );
88 public void testGatherSnapshotVersionsAWithProxies()
91 // These proxied repositories do not need to exist for the purposes of this unit test,
92 // just the repository ids are important.
93 createProxyConnector( "test-repo", "apache-snapshots" );
94 createProxyConnector( "test-repo", "internal-snapshots" );
95 createProxyConnector( "test-repo", "snapshots.codehaus.org" );
97 assertSnapshotVersions( "snap_shots_a", "1.0-alpha-11-SNAPSHOT",
98 new String[]{ "1.0-alpha-11-SNAPSHOT", "1.0-alpha-11-20070221.194724-2",
99 "1.0-alpha-11-20070302.212723-3", "1.0-alpha-11-20070303.152828-4",
100 "1.0-alpha-11-20070305.215149-5", "1.0-alpha-11-20070307.170909-6",
101 "1.0-alpha-11-20070314.211405-9", "1.0-alpha-11-20070315.033030-10"
102 /* Arrives in via snapshots.codehaus.org proxy */,
103 "1.0-alpha-11-20070316.175232-11" } );
107 public void testGetRepositorySpecificName()
110 RemoteRepositoryContent repoJavaNet =
111 createRemoteRepositoryContent( "maven2-repository.dev.java.net", "Java.net Repository for Maven 2",
112 "http://download.java.net/maven/2/", "default" );
113 RemoteRepositoryContent repoCentral =
114 createRemoteRepositoryContent( "central", "Central Global Repository", "http://repo1.maven.org/maven2/",
117 String convertedName =
118 tools.getRepositorySpecificName( repoJavaNet, "commons-lang/commons-lang/maven-metadata.xml" );
119 assertMetadataPath( "commons-lang/commons-lang/maven-metadata-maven2-repository.dev.java.net.xml",
122 convertedName = tools.getRepositorySpecificName( repoCentral, "commons-lang/commons-lang/maven-metadata.xml" );
123 assertMetadataPath( "commons-lang/commons-lang/maven-metadata-central.xml", convertedName );
126 // TODO: replace with group tests
127 // public void testUpdateProjectBadArtifact()
132 // assertUpdatedProjectMetadata( "bad_artifact", null );
133 // fail( "Should have thrown an IOException on a bad artifact." );
135 // catch ( IOException e )
142 public void testUpdateProjectNonExistingVersion()
145 ManagedRepositoryContent testRepo = createTestRepoContent();
146 ProjectReference reference = new ProjectReference();
147 reference.setGroupId( "org.apache.archiva.metadata.tests" );
148 reference.setArtifactId( "missing_artifact" );
150 prepTestRepo( testRepo, reference );
152 // check metadata prior to update -- should contain the non-existing artifact version
153 assertProjectMetadata( testRepo, reference, "missing_artifact",
154 new String[]{ "1.0-SNAPSHOT", "1.1-SNAPSHOT", "1.2-SNAPSHOT" }, "1.2-SNAPSHOT", null );
156 tools.updateMetadata( testRepo, reference );
158 // metadata should not contain the non-existing artifact version -- 1.1-SNAPSHOT
159 assertProjectMetadata( testRepo, reference, "missing_artifact", new String[]{ "1.0-SNAPSHOT", "1.2-SNAPSHOT" },
160 "1.2-SNAPSHOT", null );
164 public void testUpdateProjectMissingMultipleVersions()
167 assertUpdatedProjectMetadata( "missing_metadata_b",
168 new String[]{ "1.0", "1.0.1", "2.0", "2.0.1", "2.0-20070821-dev" },
169 "2.0-20070821-dev", "2.0-20070821-dev" );
173 public void testUpdateProjectMissingMultipleVersionsWithProxies()
176 // Attach the (bogus) proxies to the managed repo.
177 // These proxied repositories do not need to exist for the purposes of this unit test,
178 // just the repository ids are important.
179 createProxyConnector( "test-repo", "central" );
180 createProxyConnector( "test-repo", "java.net" );
182 assertUpdatedProjectMetadata( "proxied_multi",
183 new String[]{ "1.0-spec" /* in java.net */, "1.0" /* in managed, and central */,
184 "1.0.1" /* in central */, "1.1" /* in managed */, "2.0-proposal-beta"
185 /* in java.net */, "2.0-spec" /* in java.net */, "2.0"
186 /* in central, and java.net */, "2.0.1" /* in java.net */, "2.1"
187 /* in managed */, "3.0" /* in central */, "3.1" /* in central */ }, "3.1",
192 public void testUpdateProjectSimpleYetIncomplete()
195 assertUpdatedProjectMetadata( "incomplete_metadata_a", new String[]{ "1.0" }, "1.0", "1.0" );
199 public void testUpdateProjectSimpleYetMissing()
202 assertUpdatedProjectMetadata( "missing_metadata_a", new String[]{ "1.0" }, "1.0", "1.0" );
206 public void testUpdateVersionSimple10()
209 assertUpdatedReleaseVersionMetadata( "missing_metadata_a", "1.0" );
213 public void testUpdateVersionSimple20()
216 assertUpdatedReleaseVersionMetadata( "missing_metadata_b", "2.0" );
220 public void testUpdateVersionSimple20NotSnapshot()
223 assertUpdatedReleaseVersionMetadata( "missing_metadata_b", "2.0-20070821-dev" );
227 public void testUpdateVersionSnapshotA()
230 assertUpdatedSnapshotVersionMetadata( "snap_shots_a", "1.0-alpha-11-SNAPSHOT", "20070316", "175232", "11" );
234 public void testToPathFromVersionReference()
236 VersionedReference reference = new VersionedReference();
237 reference.setGroupId( "com.foo" );
238 reference.setArtifactId( "foo-tool" );
239 reference.setVersion( "1.0" );
241 assertEquals( "com/foo/foo-tool/1.0/maven-metadata.xml", tools.toPath( reference ) );
245 public void testToPathFromProjectReference()
247 ProjectReference reference = new ProjectReference();
248 reference.setGroupId( "com.foo" );
249 reference.setArtifactId( "foo-tool" );
251 assertEquals( "com/foo/foo-tool/maven-metadata.xml", tools.toPath( reference ) );
255 public void testToProjectReferenceFooTools()
256 throws RepositoryMetadataException
258 assertProjectReference( "com.foo", "foo-tools", "com/foo/foo-tools/maven-metadata.xml" );
262 public void testToProjectReferenceAReallyLongPath()
263 throws RepositoryMetadataException
265 String groupId = "net.i.have.a.really.long.path.just.for.the.hell.of.it";
266 String artifactId = "a";
267 String path = "net/i/have/a/really/long/path/just/for/the/hell/of/it/a/maven-metadata.xml";
269 assertProjectReference( groupId, artifactId, path );
273 public void testToProjectReferenceCommonsLang()
274 throws RepositoryMetadataException
276 String groupId = "commons-lang";
277 String artifactId = "commons-lang";
278 String path = "commons-lang/commons-lang/maven-metadata.xml";
280 assertProjectReference( groupId, artifactId, path );
283 private void assertProjectReference( String groupId, String artifactId, String path )
284 throws RepositoryMetadataException
286 ProjectReference reference = tools.toProjectReference( path );
288 assertNotNull( "Reference should not be null.", reference );
289 assertEquals( "ProjectReference.groupId", groupId, reference.getGroupId() );
290 assertEquals( "ProjectReference.artifactId", artifactId, reference.getArtifactId() );
294 public void testToVersionedReferenceFooTool()
295 throws RepositoryMetadataException
297 String groupId = "com.foo";
298 String artifactId = "foo-tool";
299 String version = "1.0";
300 String path = "com/foo/foo-tool/1.0/maven-metadata.xml";
302 assertVersionedReference( groupId, artifactId, version, path );
306 public void testToVersionedReferenceAReallyLongPath()
307 throws RepositoryMetadataException
309 String groupId = "net.i.have.a.really.long.path.just.for.the.hell.of.it";
310 String artifactId = "a";
311 String version = "1.1-alpha-1";
312 String path = "net/i/have/a/really/long/path/just/for/the/hell/of/it/a/1.1-alpha-1/maven-metadata.xml";
314 assertVersionedReference( groupId, artifactId, version, path );
318 public void testToVersionedReferenceCommonsLang()
319 throws RepositoryMetadataException
321 String groupId = "commons-lang";
322 String artifactId = "commons-lang";
323 String version = "2.1";
324 String path = "commons-lang/commons-lang/2.1/maven-metadata.xml";
326 assertVersionedReference( groupId, artifactId, version, path );
330 public void testToVersionedReferenceSnapshot()
331 throws RepositoryMetadataException
333 String groupId = "com.foo";
334 String artifactId = "foo-connector";
335 String version = "2.1-SNAPSHOT";
336 String path = "com/foo/foo-connector/2.1-SNAPSHOT/maven-metadata.xml";
338 assertVersionedReference( groupId, artifactId, version, path );
341 private void assertVersionedReference( String groupId, String artifactId, String version, String path )
342 throws RepositoryMetadataException
344 VersionedReference reference = tools.toVersionedReference( path );
345 assertNotNull( "Reference should not be null.", reference );
347 assertEquals( "VersionedReference.groupId", groupId, reference.getGroupId() );
348 assertEquals( "VersionedReference.artifactId", artifactId, reference.getArtifactId() );
349 assertEquals( "VersionedReference.version", version, reference.getVersion() );
352 private void assertSnapshotVersions( String artifactId, String version, String[] expectedVersions )
355 File repoRootDir = new File( "src/test/repositories/metadata-repository" );
357 VersionedReference reference = new VersionedReference();
358 reference.setGroupId( "org.apache.archiva.metadata.tests" );
359 reference.setArtifactId( artifactId );
360 reference.setVersion( version );
362 ManagedRepository repo =
363 createRepository( "test-repo", "Test Repository: " + name.getMethodName(), repoRootDir );
364 ManagedRepositoryContent repoContent =
365 applicationContext.getBean( "managedRepositoryContent#default", ManagedRepositoryContent.class );
366 repoContent.setRepository( repo );
368 Set<String> testedVersionSet = tools.gatherSnapshotVersions( repoContent, reference );
370 // Sort the list (for asserts)
371 List<String> testedVersions = new ArrayList<String>();
372 testedVersions.addAll( testedVersionSet );
373 Collections.sort( testedVersions, new VersionComparator() );
375 // Test the expected array of versions, to the actual tested versions
376 assertEquals( "Assert Snapshot Versions: length/size", expectedVersions.length, testedVersions.size() );
378 for ( int i = 0; i < expectedVersions.length; i++ )
380 String actualVersion = testedVersions.get( i );
381 assertEquals( "Snapshot Versions[" + i + "]", expectedVersions[i], actualVersion );
385 private void assertMetadata( String expectedMetadata, ManagedRepositoryContent repository,
386 ProjectReference reference )
387 throws LayoutException, IOException, SAXException, ParserConfigurationException
389 File metadataFile = new File( repository.getRepoRoot(), tools.toPath( reference ) );
390 String actualMetadata = FileUtils.readFileToString( metadataFile, null );
392 DetailedDiff detailedDiff = new DetailedDiff( new Diff( expectedMetadata, actualMetadata ) );
393 if ( !detailedDiff.similar() )
395 // If it isn't similar, dump the difference.
396 assertEquals( expectedMetadata, actualMetadata );
400 private void assertMetadata( String expectedMetadata, ManagedRepositoryContent repository,
401 VersionedReference reference )
402 throws LayoutException, IOException, SAXException, ParserConfigurationException
404 File metadataFile = new File( repository.getRepoRoot(), tools.toPath( reference ) );
405 String actualMetadata = FileUtils.readFileToString( metadataFile, null );
407 DetailedDiff detailedDiff = new DetailedDiff( new Diff( expectedMetadata, actualMetadata ) );
408 if ( !detailedDiff.similar() )
410 // If it isn't similar, dump the difference.
411 assertEquals( expectedMetadata, actualMetadata );
415 private void assertMetadataPath( String expected, String actual )
417 assertEquals( "Repository Specific Metadata Path", expected, actual );
420 private void assertUpdatedProjectMetadata( String artifactId, String[] expectedVersions, String latestVersion,
421 String releaseVersion )
424 ManagedRepositoryContent testRepo = createTestRepoContent();
425 ProjectReference reference = new ProjectReference();
426 reference.setGroupId( "org.apache.archiva.metadata.tests" );
427 reference.setArtifactId( artifactId );
429 prepTestRepo( testRepo, reference );
431 tools.updateMetadata( testRepo, reference );
433 StringBuilder buf = new StringBuilder();
434 buf.append( "<metadata>\n" );
435 buf.append( " <groupId>" ).append( reference.getGroupId() ).append( "</groupId>\n" );
436 buf.append( " <artifactId>" ).append( reference.getArtifactId() ).append( "</artifactId>\n" );
437 // buf.append( " <version>1.0</version>\n" );
439 if ( expectedVersions != null )
441 buf.append( " <versioning>\n" );
442 if ( latestVersion != null )
444 buf.append( " <latest>" ).append( latestVersion ).append( "</latest>\n" );
446 if ( releaseVersion != null )
448 buf.append( " <release>" ).append( releaseVersion ).append( "</release>\n" );
451 buf.append( " <versions>\n" );
452 for ( int i = 0; i < expectedVersions.length; i++ )
454 buf.append( " <version>" ).append( expectedVersions[i] ).append( "</version>\n" );
456 buf.append( " </versions>\n" );
457 buf.append( " </versioning>\n" );
459 buf.append( "</metadata>" );
461 assertMetadata( buf.toString(), testRepo, reference );
464 private void assertProjectMetadata( ManagedRepositoryContent testRepo, ProjectReference reference,
465 String artifactId, String[] expectedVersions, String latestVersion,
466 String releaseVersion )
469 StringBuilder buf = new StringBuilder();
470 buf.append( "<metadata>\n" );
471 buf.append( " <groupId>" ).append( reference.getGroupId() ).append( "</groupId>\n" );
472 buf.append( " <artifactId>" ).append( reference.getArtifactId() ).append( "</artifactId>\n" );
474 if ( expectedVersions != null )
476 buf.append( " <versioning>\n" );
477 if ( latestVersion != null )
479 buf.append( " <latest>" ).append( latestVersion ).append( "</latest>\n" );
481 if ( releaseVersion != null )
483 buf.append( " <release>" ).append( releaseVersion ).append( "</release>\n" );
486 buf.append( " <versions>\n" );
487 for ( int i = 0; i < expectedVersions.length; i++ )
489 buf.append( " <version>" ).append( expectedVersions[i] ).append( "</version>\n" );
491 buf.append( " </versions>\n" );
492 buf.append( " </versioning>\n" );
494 buf.append( "</metadata>" );
496 assertMetadata( buf.toString(), testRepo, reference );
499 private void assertUpdatedReleaseVersionMetadata( String artifactId, String version )
502 ManagedRepositoryContent testRepo = createTestRepoContent();
503 VersionedReference reference = new VersionedReference();
504 reference.setGroupId( "org.apache.archiva.metadata.tests" );
505 reference.setArtifactId( artifactId );
506 reference.setVersion( version );
508 prepTestRepo( testRepo, reference );
510 tools.updateMetadata( testRepo, reference );
512 StringBuilder buf = new StringBuilder();
513 buf.append( "<metadata>\n" );
514 buf.append( " <groupId>" ).append( reference.getGroupId() ).append( "</groupId>\n" );
515 buf.append( " <artifactId>" ).append( reference.getArtifactId() ).append( "</artifactId>\n" );
516 buf.append( " <version>" ).append( reference.getVersion() ).append( "</version>\n" );
517 buf.append( "</metadata>" );
519 assertMetadata( buf.toString(), testRepo, reference );
522 private void assertUpdatedSnapshotVersionMetadata( String artifactId, String version, String expectedDate,
523 String expectedTime, String expectedBuildNumber )
526 ManagedRepositoryContent testRepo = createTestRepoContent();
527 VersionedReference reference = new VersionedReference();
528 reference.setGroupId( "org.apache.archiva.metadata.tests" );
529 reference.setArtifactId( artifactId );
530 reference.setVersion( version );
532 prepTestRepo( testRepo, reference );
534 tools.updateMetadata( testRepo, reference );
536 StringBuilder buf = new StringBuilder();
537 buf.append( "<metadata>\n" );
538 buf.append( " <groupId>" ).append( reference.getGroupId() ).append( "</groupId>\n" );
539 buf.append( " <artifactId>" ).append( reference.getArtifactId() ).append( "</artifactId>\n" );
540 buf.append( " <version>" ).append( reference.getVersion() ).append( "</version>\n" );
541 buf.append( " <versioning>\n" );
542 buf.append( " <snapshot>\n" );
543 buf.append( " <buildNumber>" ).append( expectedBuildNumber ).append( "</buildNumber>\n" );
544 buf.append( " <timestamp>" );
545 buf.append( expectedDate ).append( "." ).append( expectedTime );
546 buf.append( "</timestamp>\n" );
547 buf.append( " </snapshot>\n" );
548 buf.append( " <lastUpdated>" ).append( expectedDate ).append( expectedTime ).append( "</lastUpdated>\n" );
549 buf.append( " </versioning>\n" );
550 buf.append( "</metadata>" );
552 assertMetadata( buf.toString(), testRepo, reference );
555 private void removeProxyConnector( String sourceRepoId, String targetRepoId )
557 ProxyConnectorConfiguration toRemove = null;
558 for (ProxyConnectorConfiguration pcc : config.getConfiguration().getProxyConnectors())
560 if (pcc.getTargetRepoId().equals( targetRepoId ) && pcc.getSourceRepoId().equals( sourceRepoId ))
565 if (toRemove != null)
567 config.getConfiguration().removeProxyConnector(toRemove);
568 String prefix = "proxyConnectors.proxyConnector(" + "1" + ")"; // XXX
569 config.triggerChange( prefix + ".sourceRepoId", toRemove.getSourceRepoId() );
570 config.triggerChange( prefix + ".targetRepoId", toRemove.getTargetRepoId() );
571 config.triggerChange( prefix + ".proxyId", toRemove.getProxyId() );
572 config.triggerChange( prefix + ".policies.releases", toRemove.getPolicy( "releases", "" ) );
573 config.triggerChange( prefix + ".policies.checksum", toRemove.getPolicy( "checksum", "" ) );
574 config.triggerChange( prefix + ".policies.snapshots", toRemove.getPolicy( "snapshots", "" ) );
575 config.triggerChange( prefix + ".policies.cache-failures", toRemove.getPolicy( "cache-failures", "" ) );
579 private void createProxyConnector( String sourceRepoId, String targetRepoId )
581 ProxyConnectorConfiguration connectorConfig = new ProxyConnectorConfiguration();
582 connectorConfig.setSourceRepoId( sourceRepoId );
583 connectorConfig.setTargetRepoId( targetRepoId );
584 connectorConfig.addPolicy( ProxyConnectorConfiguration.POLICY_CHECKSUM, ChecksumPolicy.IGNORE );
585 connectorConfig.addPolicy( ProxyConnectorConfiguration.POLICY_RELEASES, ReleasesPolicy.ALWAYS );
586 connectorConfig.addPolicy( ProxyConnectorConfiguration.POLICY_SNAPSHOTS, SnapshotsPolicy.ALWAYS );
587 connectorConfig.addPolicy( ProxyConnectorConfiguration.POLICY_CACHE_FAILURES, CachedFailuresPolicy.NO );
589 int count = config.getConfiguration().getProxyConnectors().size();
590 config.getConfiguration().addProxyConnector( connectorConfig );
592 // Proper Triggering ...
593 String prefix = "proxyConnectors.proxyConnector(" + count + ")";
594 config.triggerChange( prefix + ".sourceRepoId", connectorConfig.getSourceRepoId() );
595 config.triggerChange( prefix + ".targetRepoId", connectorConfig.getTargetRepoId() );
596 config.triggerChange( prefix + ".proxyId", connectorConfig.getProxyId() );
597 config.triggerChange( prefix + ".policies.releases", connectorConfig.getPolicy( "releases", "" ) );
598 config.triggerChange( prefix + ".policies.checksum", connectorConfig.getPolicy( "checksum", "" ) );
599 config.triggerChange( prefix + ".policies.snapshots", connectorConfig.getPolicy( "snapshots", "" ) );
600 config.triggerChange( prefix + ".policies.cache-failures", connectorConfig.getPolicy( "cache-failures", "" ) );
603 private ManagedRepositoryContent createTestRepoContent()
606 File repoRoot = new File( "target/metadata-tests/" + name.getMethodName() );
607 if ( repoRoot.exists() )
609 FileUtils.deleteDirectory( repoRoot );
614 ManagedRepository repoConfig =
615 createRepository( "test-repo", "Test Repository: " + name.getMethodName(), repoRoot );
617 ManagedRepositoryContent repoContent =
618 applicationContext.getBean( "managedRepositoryContent#default", ManagedRepositoryContent.class );
619 repoContent.setRepository( repoConfig );
623 private void prepTestRepo( ManagedRepositoryContent repo, ProjectReference reference )
626 String groupDir = StringUtils.replaceChars( reference.getGroupId(), '.', '/' );
627 String path = groupDir + "/" + reference.getArtifactId();
629 File srcRepoDir = new File( "src/test/repositories/metadata-repository" );
630 File srcDir = new File( srcRepoDir, path );
631 File destDir = new File( repo.getRepoRoot(), path );
633 assertTrue( "Source Dir exists: " + srcDir, srcDir.exists() );
636 FileUtils.copyDirectory( srcDir, destDir );
639 private void prepTestRepo( ManagedRepositoryContent repo, VersionedReference reference )
642 ProjectReference projectRef = new ProjectReference();
643 projectRef.setGroupId( reference.getGroupId() );
644 projectRef.setArtifactId( reference.getArtifactId() );
646 prepTestRepo( repo, projectRef );