You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2009/06/23 22:09:11 UTC
svn commit: r787818 - in
/maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy:
./ DummyArtifactMetadataSource.java LegacyRepositorySystemTest.java
Author: bentmann
Date: Tue Jun 23 20:09:11 2009
New Revision: 787818
URL: http://svn.apache.org/viewvc?rev=787818&view=rev
Log:
[MNG-4217] trunk create a directory with %20 in name (trunk rev 787409)
o Added missing test classes
Added:
maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/ (with props)
maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/DummyArtifactMetadataSource.java (with props)
maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java (with props)
Propchange: maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/
------------------------------------------------------------------------------
bugtraq:label = Enter issue ID:
Propchange: maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/
------------------------------------------------------------------------------
bugtraq:message = Issue id: %BUGID%
Propchange: maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/
------------------------------------------------------------------------------
bugtraq:number = false
Propchange: maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/
------------------------------------------------------------------------------
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%
Added: maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/DummyArtifactMetadataSource.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/DummyArtifactMetadataSource.java?rev=787818&view=auto
==============================================================================
--- maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/DummyArtifactMetadataSource.java (added)
+++ maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/DummyArtifactMetadataSource.java Tue Jun 23 20:09:11 2009
@@ -0,0 +1,64 @@
+package org.apache.maven.repository.legacy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.List;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
+import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
+import org.apache.maven.artifact.metadata.ResolutionGroup;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.versioning.ArtifactVersion;
+import org.codehaus.plexus.component.annotations.Component;
+
+/**
+ * A dummy component to satisfy the requirements of {@link LegacyRepositorySystem}.
+ *
+ * @author Benjamin Bentmann
+ */
+@Component( role = ArtifactMetadataSource.class )
+public class DummyArtifactMetadataSource
+ implements ArtifactMetadataSource
+{
+
+ public ResolutionGroup retrieve( Artifact artifact, ArtifactRepository localRepository,
+ List<ArtifactRepository> remoteRepositories )
+ throws ArtifactMetadataRetrievalException
+ {
+ return null;
+ }
+
+ public List<ArtifactVersion> retrieveAvailableVersions( Artifact artifact, ArtifactRepository localRepository,
+ List<ArtifactRepository> remoteRepositories )
+ throws ArtifactMetadataRetrievalException
+ {
+ return null;
+ }
+
+ public List<ArtifactVersion> retrieveAvailableVersionsFromDeploymentRepository( Artifact artifact,
+ ArtifactRepository localRepository,
+ ArtifactRepository remoteRepository )
+ throws ArtifactMetadataRetrievalException
+ {
+ return null;
+ }
+
+}
Propchange: maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/DummyArtifactMetadataSource.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/DummyArtifactMetadataSource.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java?rev=787818&view=auto
==============================================================================
--- maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java (added)
+++ maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java Tue Jun 23 20:09:11 2009
@@ -0,0 +1,66 @@
+package org.apache.maven.repository.legacy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.repository.RepositorySystem;
+import org.codehaus.plexus.PlexusTestCase;
+
+/**
+ * Tests {@link LegacyRepositorySystem}.
+ *
+ * @author Benjamin Bentmann
+ */
+public class LegacyRepositorySystemTest
+ extends PlexusTestCase
+{
+
+ private RepositorySystem repoSystem;
+
+ @Override
+ protected void setUp()
+ throws Exception
+ {
+ super.setUp();
+
+ repoSystem = lookup( RepositorySystem.class, "default" );
+ }
+
+ @Override
+ protected void tearDown()
+ throws Exception
+ {
+ repoSystem = null;
+
+ super.tearDown();
+ }
+
+ public void testThatLocalRepositoryWithSpacesIsProperlyHandled()
+ throws Exception
+ {
+ File basedir = new File( "target/spacy path" ).getAbsoluteFile();
+ ArtifactRepository repo = repoSystem.createLocalRepository( basedir );
+
+ assertEquals( basedir, new File( repo.getBasedir() ) );
+ }
+
+}
Propchange: maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision