archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r691860 - in /archiva/branches/archiva-1.1.x: archiva-jetty/ archiva-jetty/src/main/assembly/ archiva-modules/ archiva-modules/archiva-base/archiva-consumers/archiva-dependency-tree-consumer/ archiva-modules/archiva-web/archiva-rss/ archiva...
Date Thu, 04 Sep 2008 03:37:45 GMT
Author: oching
Date: Wed Sep  3 20:37:44 2008
New Revision: 691860

URL: http://svn.apache.org/viewvc?rev=691860&view=rev
Log:
merged the following from trunk:
-r684620 (ignore IML)
-r685059 (MRM-880: upgraded appassambler-maven-plugin version to latest snapshot; include
solaris-sparc-32, solaris-sparc-64 and linux-x86-64 bin 
and lib files in the standalone bundle)
-r685076 (MRM-893: return a 404 when the request is a resource file appended with a '/')

Modified:
    archiva/branches/archiva-1.1.x/archiva-jetty/pom.xml
    archiva/branches/archiva-1.1.x/archiva-jetty/src/main/assembly/bin.xml
    archiva/branches/archiva-1.1.x/archiva-modules/   (props changed)
    archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-dependency-tree-consumer/
  (props changed)
    archiva/branches/archiva-1.1.x/archiva-modules/archiva-web/archiva-rss/   (props changed)
    archiva/branches/archiva-1.1.x/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java
    archiva/branches/archiva-1.1.x/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletBrowseTest.java

Modified: archiva/branches/archiva-1.1.x/archiva-jetty/pom.xml
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-1.1.x/archiva-jetty/pom.xml?rev=691860&r1=691859&r2=691860&view=diff
==============================================================================
--- archiva/branches/archiva-1.1.x/archiva-jetty/pom.xml (original)
+++ archiva/branches/archiva-1.1.x/archiva-jetty/pom.xml Wed Sep  3 20:37:44 2008
@@ -142,7 +142,7 @@
        <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>appassembler-maven-plugin</artifactId>
-        <version>1.0-beta-1</version>
+        <version>1.0-SNAPSHOT</version>
         <configuration>
           <daemons>
             <daemon>
@@ -200,6 +200,15 @@
                       <value>30</value>
                     </property>
                   </configuration>
+                  <includes>
+                    <include>linux-x86-32</include>
+                    <include>linux-x86-64</include>
+                    <include>macosx-x86-universal-32</include>
+                    <include>solaris-x86-32</include>
+                    <include>solaris-sparc-32</include>
+                    <include>solaris-sparc-64</include>
+                    <include>windows-x86-32</include>
+                  </includes>
                 </generatorConfiguration>
               </generatorConfigurations>
               <jvmSettings>

Modified: archiva/branches/archiva-1.1.x/archiva-jetty/src/main/assembly/bin.xml
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-1.1.x/archiva-jetty/src/main/assembly/bin.xml?rev=691860&r1=691859&r2=691860&view=diff
==============================================================================
--- archiva/branches/archiva-1.1.x/archiva-jetty/src/main/assembly/bin.xml (original)
+++ archiva/branches/archiva-1.1.x/archiva-jetty/src/main/assembly/bin.xml Wed Sep  3 20:37:44
2008
@@ -60,8 +60,11 @@
       <outputDirectory>bin</outputDirectory>
       <includes>   
          <include>wrapper-linux-x86-32</include>
+         <include>wrapper-linux-x86-64</include>
          <include>wrapper-macosx-universal-32</include>
          <include>wrapper-solaris-x86-32</include>
+         <include>wrapper-solaris-sparc-32</include>
+         <include>wrapper-solaris-sparc-64</include>
       </includes>
       <fileMode>0755</fileMode>
     </fileSet>

Propchange: archiva/branches/archiva-1.1.x/archiva-modules/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Sep  3 20:37:44 2008
@@ -1 +1,2 @@
 target
+*.iml

Propchange: archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-dependency-tree-consumer/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Sep  3 20:37:44 2008
@@ -1,4 +1,5 @@
 .classpath
+*.iml
 .project
 .settings
 target

Propchange: archiva/branches/archiva-1.1.x/archiva-modules/archiva-web/archiva-rss/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Sep  3 20:37:44 2008
@@ -1,4 +1,5 @@
 .classpath
+*.iml
 .project
 .settings
 target

Modified: archiva/branches/archiva-1.1.x/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-1.1.x/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java?rev=691860&r1=691859&r2=691860&view=diff
==============================================================================
--- archiva/branches/archiva-1.1.x/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java
(original)
+++ archiva/branches/archiva-1.1.x/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java
Wed Sep  3 20:37:44 2008
@@ -409,6 +409,17 @@
         throws DavException
     {
         File resourceFile = new File( managedRepository.getRepoRoot(), logicalResource.getPath()
);
+        
+        //MRM-893, dont send back a file when user intentionally wants a directory
+        if ( locator.getHref( false ).endsWith( "/" ) )
+        {
+            if ( ! resourceFile.isDirectory() )
+            {
+                //force a resource not found 
+                return null;
+            }
+        }
+
         ArchivaDavResource resource =
             new ArchivaDavResource( resourceFile.getAbsolutePath(), logicalResource.getPath(),
                                     managedRepository.getRepository(), request.getRemoteAddr(),

Modified: archiva/branches/archiva-1.1.x/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletBrowseTest.java
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-1.1.x/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletBrowseTest.java?rev=691860&r1=691859&r2=691860&view=diff
==============================================================================
--- archiva/branches/archiva-1.1.x/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletBrowseTest.java
(original)
+++ archiva/branches/archiva-1.1.x/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletBrowseTest.java
Wed Sep  3 20:37:44 2008
@@ -72,6 +72,30 @@
         String expectedLinks[] = new String[] { "../", "apache/", "codehaus/" };
         assertLinks(expectedLinks, response.getLinks());
     }
+
+    public void testGetDirectoryWhichHasMatchingFile() //MRM-893
+        throws Exception
+    {
+        new File( repoRootInternal, "org/apache/archiva/artifactId/1.0" ).mkdirs();
+        new File( repoRootInternal, "org/apache/archiva/artifactId/1.0/artifactId-1.0.jar"
).createNewFile();
+
+        WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/org/apache/archiva/artifactId"
);
+        WebResponse response = sc.getResponse( request );
+        assertEquals( "Response", HttpServletResponse.SC_OK, response.getResponseCode() );
+
+        request = new GetMethodWebRequest( "http://machine.com/repository/internal/org/apache/archiva/artifactId/"
);
+        response = sc.getResponse( request );
+        assertEquals( "Response", HttpServletResponse.SC_OK, response.getResponseCode() );
+        
+        request = new GetMethodWebRequest( "http://machine.com/repository/internal/org/apache/archiva/artifactId/1.0/artifactId-1.0.jar"
);
+        response = sc.getResponse( request );
+        assertEquals( "Response", HttpServletResponse.SC_OK, response.getResponseCode() );
+        
+        request = new GetMethodWebRequest( "http://machine.com/repository/internal/org/apache/archiva/artifactId/1.0/artifactId-1.0.jar/"
);
+        response = sc.getResponse( request );
+        assertEquals( "Response", HttpServletResponse.SC_NOT_FOUND, response.getResponseCode()
);
+    }
+    
     
     private void assertLinks(String expectedLinks[], WebLink actualLinks[])
     {



Mime
View raw message