mirror of https://github.com/apache/archiva.git
[MRM-1607] maven model build failed when model have jdk profile activation.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1293788 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5fbb07bdb4
commit
4974097379
|
@ -186,6 +186,20 @@ $(function() {
|
|||
$(this).parent("li").addClass("active");
|
||||
})
|
||||
|
||||
$( "#quick-search-autocomplete" ).autocomplete({
|
||||
|
||||
minLength: 3,
|
||||
source: function( request, response ) {
|
||||
$.log("source");
|
||||
return ["foo","bar"];
|
||||
/*var data = $.getJSON( "restServices/archivaServices/searchService/quickSearch?queryString="+encodeURIComponent(request.term));
|
||||
return $.map(data,function(item){
|
||||
return item.artifactId;
|
||||
})*/
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
startArchivaApplication();
|
||||
})
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</li>
|
||||
<li class="pull-right">
|
||||
<form class="form-search pull-right" action="">
|
||||
<input type="text" class="search-query" placeholder="Search" />
|
||||
<input type="text" class="ui-widget" id="quick-search-autocomplete" placeholder="Search" />
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -226,6 +226,12 @@ public class Maven2RepositoryStorage
|
|||
.setTwoPhaseBuilding( false )
|
||||
.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL );
|
||||
|
||||
|
||||
//MRM-1607. olamy this will resolve jdk profiles on the current running archiva jvm
|
||||
req.setSystemProperties( System.getProperties() );
|
||||
|
||||
|
||||
|
||||
// MRM-1411
|
||||
req.setModelResolver(
|
||||
new RepositoryModelResolver( basedir, pathTranslator, wagonFactory, remoteRepositories, networkProxies,
|
||||
|
|
|
@ -131,6 +131,16 @@ public class Maven2RepositoryMetadataResolverTest
|
|||
when( wagonFactory.getWagon( "wagon#http" ) ).thenReturn( wagon );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testModelWithJdkProfileActivation()
|
||||
throws Exception
|
||||
{
|
||||
|
||||
ProjectVersionMetadata metadata =
|
||||
storage.readProjectVersionMetadata( TEST_REPO_ID, "org.apache.maven", "maven-archiver", "2.4.1" );
|
||||
MavenProjectFacet facet = (MavenProjectFacet) metadata.getFacet( MavenProjectFacet.FACET_ID );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetProjectVersionMetadata()
|
||||
throws Exception
|
||||
|
@ -633,10 +643,11 @@ public class Maven2RepositoryMetadataResolverTest
|
|||
assertEquals( Arrays.asList( "apache" ), storage.listProjects( TEST_REPO_ID, "org.apache", ALL ) );
|
||||
assertEquals( Arrays.asList( "archiva", "archiva-base", "archiva-common", "archiva-modules", "archiva-parent" ),
|
||||
storage.listProjects( TEST_REPO_ID, "org.apache.archiva", ALL ) );
|
||||
assertEquals( Collections.<String>emptyList(), storage.listProjects( TEST_REPO_ID, "org.apache.maven", ALL ) );
|
||||
assertEquals( Arrays.asList( "maven-archiver", "maven-parent" ),
|
||||
storage.listProjects( TEST_REPO_ID, "org.apache.maven", ALL ) );
|
||||
assertEquals( Collections.<String>emptyList(),
|
||||
storage.listProjects( TEST_REPO_ID, "org.apache.maven.plugins", ALL ) );
|
||||
assertEquals( Arrays.asList( "maven-downloader" ),
|
||||
assertEquals( Arrays.asList( "maven-downloader", "maven-shared-components" ),
|
||||
storage.listProjects( TEST_REPO_ID, "org.apache.maven.shared", ALL ) );
|
||||
}
|
||||
|
||||
|
@ -653,7 +664,7 @@ public class Maven2RepositoryMetadataResolverTest
|
|||
assertEquals( Arrays.asList( "1.0" ),
|
||||
storage.listProjectVersions( TEST_REPO_ID, "com.example.test", "invalid-pom", ALL ) );
|
||||
|
||||
assertEquals( Arrays.asList( "4", "5-SNAPSHOT" ),
|
||||
assertEquals( Arrays.asList( "4", "5-SNAPSHOT", "7" ),
|
||||
storage.listProjectVersions( TEST_REPO_ID, "org.apache", "apache", ALL ) );
|
||||
|
||||
assertEquals( Arrays.asList( "1.2.1", "1.2.2" ),
|
||||
|
|
Loading…
Reference in New Issue