archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1293788 - in /archiva/trunk/archiva-modules: archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/ archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/ plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/...
Date Sun, 26 Feb 2012 09:07:03 GMT
Author: olamy
Date: Sun Feb 26 09:07:03 2012
New Revision: 1293788

URL: http://svn.apache.org/viewvc?rev=1293788&view=rev
Log:
[MRM-1607] maven model build failed when model have jdk profile activation.

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html
    archiva/trunk/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java
    archiva/trunk/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js?rev=1293788&r1=1293787&r2=1293788&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
Sun Feb 26 09:07:03 2012
@@ -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();
 })

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html?rev=1293788&r1=1293787&r2=1293788&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html
Sun Feb 26 09:07:03 2012
@@ -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>

Modified: archiva/trunk/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java?rev=1293788&r1=1293787&r2=1293788&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java
(original)
+++ archiva/trunk/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java
Sun Feb 26 09:07:03 2012
@@ -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,

Modified: archiva/trunk/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java?rev=1293788&r1=1293787&r2=1293788&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java
(original)
+++ archiva/trunk/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java
Sun Feb 26 09:07:03 2012
@@ -132,6 +132,16 @@ public class Maven2RepositoryMetadataRes
     }
 
     @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 Maven2RepositoryMetadataRes
         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 Maven2RepositoryMetadataRes
         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" ),



Mime
View raw message