You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by vs...@apache.org on 2008/01/11 00:25:04 UTC
svn commit: r610987 - in
/maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing:
./ stubs/
Author: vsiveton
Date: Thu Jan 10 15:25:01 2008
New Revision: 610987
URL: http://svn.apache.org/viewvc?rev=610987&view=rev
Log:
o fixed javadoc
o removed some "TODO Auto-generated method stub"
o handled some "TODO Auto-generated catch block"
Modified:
maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ResolverExpressionEvaluatorStub.java
maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java
maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java
maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/DefaultArtifactHandlerStub.java
maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactCollector.java
maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java
maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java
Modified: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ResolverExpressionEvaluatorStub.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ResolverExpressionEvaluatorStub.java?rev=610987&r1=610986&r2=610987&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ResolverExpressionEvaluatorStub.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ResolverExpressionEvaluatorStub.java Thu Jan 10 15:25:01 2008
@@ -36,9 +36,7 @@
public class ResolverExpressionEvaluatorStub
implements ExpressionEvaluator
{
- /**
- * @see org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator#evaluate(java.lang.String)
- */
+ /** {@inheritDoc} */
public Object evaluate( String expr )
throws ExpressionEvaluationException
{
@@ -123,18 +121,14 @@
return expr;
}
- /**
- * @see org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator#alignToBaseDirectory(java.io.File)
- */
+ /** {@inheritDoc} */
public File alignToBaseDirectory( File file )
{
if ( file.getAbsolutePath().startsWith( PlexusTestCase.getBasedir() ) )
{
return file;
}
- else
- {
- return new File( PlexusTestCase.getBasedir() + File.pathSeparator + file.getPath() );
- }
+
+ return new File( PlexusTestCase.getBasedir() + File.pathSeparator + file.getPath() );
}
}
Modified: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java?rev=610987&r1=610986&r2=610987&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java Thu Jan 10 15:25:01 2008
@@ -16,7 +16,7 @@
* "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.
+ * under the License.
*/
import org.apache.maven.plugin.logging.Log;
@@ -25,171 +25,304 @@
/**
* This logger implements both types of logs currently in use. It can be injected where needed
* to turn off logs during testing where they aren't desired.
+ *
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
* @version $Id: SilentLog.java 546355 2007-06-12 02:00:02Z brianf $
*/
public class SilentLog
implements Log, Logger
{
-
+ /**
+ * @return <code>false</code>
+ * @see org.apache.maven.plugin.logging.Log#isDebugEnabled()
+ */
public boolean isDebugEnabled()
{
return false;
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.plugin.logging.Log#debug(java.lang.CharSequence)
+ */
public void debug( CharSequence content )
{
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.plugin.logging.Log#debug(java.lang.CharSequence, java.lang.Throwable)
+ */
public void debug( CharSequence content, Throwable error )
{
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.plugin.logging.Log#debug(java.lang.Throwable)
+ */
public void debug( Throwable error )
{
+ // nop
}
+ /**
+ * @return <code>false</code>
+ * @see org.apache.maven.plugin.logging.Log#isInfoEnabled()
+ */
public boolean isInfoEnabled()
{
return false;
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.plugin.logging.Log#info(java.lang.CharSequence)
+ */
public void info( CharSequence content )
{
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.plugin.logging.Log#info(java.lang.CharSequence, java.lang.Throwable)
+ */
public void info( CharSequence content, Throwable error )
{
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.plugin.logging.Log#info(java.lang.Throwable)
+ */
public void info( Throwable error )
{
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.plugin.logging.Log#isWarnEnabled()
+ */
public boolean isWarnEnabled()
{
+ // nop
return false;
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.plugin.logging.Log#warn(java.lang.CharSequence)
+ */
public void warn( CharSequence content )
{
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.plugin.logging.Log#warn(java.lang.CharSequence, java.lang.Throwable)
+ */
public void warn( CharSequence content, Throwable error )
{
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.plugin.logging.Log#warn(java.lang.Throwable)
+ */
public void warn( Throwable error )
{
+ // nop
}
+ /**
+ * @return <code>false</code>
+ * @see org.apache.maven.plugin.logging.Log#isErrorEnabled()
+ */
public boolean isErrorEnabled()
{
return false;
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.plugin.logging.Log#error(java.lang.CharSequence)
+ */
public void error( CharSequence content )
{
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.plugin.logging.Log#error(java.lang.CharSequence, java.lang.Throwable)
+ */
public void error( CharSequence content, Throwable error )
{
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.plugin.logging.Log#error(java.lang.Throwable)
+ */
public void error( Throwable error )
{
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.codehaus.plexus.logging.Logger#debug(java.lang.String)
+ */
public void debug( String message )
{
- // TODO Auto-generated method stub
-
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.codehaus.plexus.logging.Logger#debug(java.lang.String, java.lang.Throwable)
+ */
public void debug( String message, Throwable throwable )
{
- // TODO Auto-generated method stub
-
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.codehaus.plexus.logging.Logger#info(java.lang.String)
+ */
public void info( String message )
{
- // TODO Auto-generated method stub
-
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.codehaus.plexus.logging.Logger#info(java.lang.String, java.lang.Throwable)
+ */
public void info( String message, Throwable throwable )
{
- // TODO Auto-generated method stub
-
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.codehaus.plexus.logging.Logger#warn(java.lang.String)
+ */
public void warn( String message )
{
- // TODO Auto-generated method stub
-
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.codehaus.plexus.logging.Logger#warn(java.lang.String, java.lang.Throwable)
+ */
public void warn( String message, Throwable throwable )
{
- // TODO Auto-generated method stub
-
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.codehaus.plexus.logging.Logger#error(java.lang.String)
+ */
public void error( String message )
{
- // TODO Auto-generated method stub
-
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.codehaus.plexus.logging.Logger#error(java.lang.String, java.lang.Throwable)
+ */
public void error( String message, Throwable throwable )
{
- // TODO Auto-generated method stub
-
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.codehaus.plexus.logging.Logger#fatalError(java.lang.String)
+ */
public void fatalError( String message )
{
- // TODO Auto-generated method stub
-
+ // nop
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.codehaus.plexus.logging.Logger#fatalError(java.lang.String, java.lang.Throwable)
+ */
public void fatalError( String message, Throwable throwable )
{
- // TODO Auto-generated method stub
-
+ // nop
}
+ /**
+ * @return <code>false</code>
+ * @see org.codehaus.plexus.logging.Logger#isFatalErrorEnabled()
+ */
public boolean isFatalErrorEnabled()
{
- // TODO Auto-generated method stub
return false;
}
+ /**
+ * @return <code>null</code>
+ * @see org.codehaus.plexus.logging.Logger#getChildLogger(java.lang.String)
+ */
public Logger getChildLogger( String name )
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * @return <code>0</code>
+ * @see org.codehaus.plexus.logging.Logger#getThreshold()
+ */
public int getThreshold()
{
- // TODO Auto-generated method stub
return 0;
}
+ /**
+ * @return <code>null</code>
+ * @see org.codehaus.plexus.logging.Logger#getName()
+ */
public String getName()
{
- // TODO Auto-generated method stub
return null;
- }
-
- /* (non-Javadoc)
- * @see org.codehaus.plexus.logging.Logger#setThreshold(int)
- */
- public void setThreshold( int theThreshold )
- {
- // TODO Auto-generated method stub
-
}
}
Modified: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java?rev=610987&r1=610986&r2=610987&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java Thu Jan 10 15:25:01 2008
@@ -67,49 +67,37 @@
return 0;
}
- /**
- * @see org.apache.maven.artifact.Artifact#getGroupId()
- */
+ /** {@inheritDoc} */
public String getGroupId()
{
return groupId;
}
- /**
- * @see org.apache.maven.artifact.Artifact#getArtifactId()
- */
+ /** {@inheritDoc} */
public String getArtifactId()
{
return artifactId;
}
- /**
- * @see org.apache.maven.artifact.Artifact#getVersion()
- */
+ /** {@inheritDoc} */
public String getVersion()
{
return version;
}
- /**
- * @see org.apache.maven.artifact.Artifact#setVersion(java.lang.String)
- */
+ /** {@inheritDoc} */
public void setVersion( String version )
{
this.version = version;
}
- /**
- * @see org.apache.maven.artifact.Artifact#getScope()
- */
+ /** {@inheritDoc} */
public String getScope()
{
return scope;
}
- /**
- * @see org.apache.maven.artifact.Artifact#getType()
- */
+ /** {@inheritDoc} */
public String getType()
{
return type;
@@ -125,41 +113,32 @@
this.type = type;
}
- /**
- * @see org.apache.maven.artifact.Artifact#getClassifier()
- */
+ /** {@inheritDoc} */
public String getClassifier()
{
return classifier;
}
- /**
- * @see org.apache.maven.artifact.Artifact#hasClassifier()
- */
+ /** {@inheritDoc} */
public boolean hasClassifier()
{
return classifier != null;
}
- /**
- * @see org.apache.maven.artifact.Artifact#getFile()
- */
+ /** {@inheritDoc} */
public File getFile()
{
return file;
}
- /**
- * @see org.apache.maven.artifact.Artifact#setFile(java.io.File)
- */
+ /** {@inheritDoc} */
public void setFile( File file )
{
this.file = file;
}
/**
- * By default, return <code>null</code>.
- *
+ * @return <code>null</code>.
* @see org.apache.maven.artifact.Artifact#getBaseVersion()
*/
public String getBaseVersion()
@@ -178,8 +157,7 @@
}
/**
- * By default, return <code>null</code>.
- *
+ * @return <code>null</code>.
* @see org.apache.maven.artifact.Artifact#getId()
*/
public String getId()
@@ -188,19 +166,18 @@
}
/**
- * By default, return <code>groupId:artifactId:type:classifier</code>.
- *
+ * @return <code>groupId:artifactId:type:classifier</code>.
* @see org.apache.maven.artifact.Artifact#getDependencyConflictId()
*/
public String getDependencyConflictId()
{
StringBuffer buffer = new StringBuffer();
-
+
buffer.append( getGroupId() );
buffer.append( ":" ).append( getArtifactId() );
buffer.append( ":" ).append( getType() );
buffer.append( ":" ).append( getClassifier() );
-
+
return buffer.toString();
}
@@ -215,8 +192,7 @@
}
/**
- * By default, return <code>null</code>.
- *
+ * @return <code>null</code>.
* @see org.apache.maven.artifact.Artifact#getMetadataList()
*/
public Collection getMetadataList()
@@ -224,21 +200,13 @@
return null;
}
- /**
- * Set a new artifact repository
- *
- * @see org.apache.maven.artifact.Artifact#setRepository(org.apache.maven.artifact.repository.ArtifactRepository)
- */
+ /** {@inheritDoc} */
public void setRepository( ArtifactRepository artifactRepository )
{
this.artifactRepository = artifactRepository;
}
- /**
- * Returns repository for artifact
- *
- * @see org.apache.maven.artifact.Artifact#getRepository()
- */
+ /** {@inheritDoc} */
public ArtifactRepository getRepository()
{
return artifactRepository;
@@ -255,8 +223,7 @@
}
/**
- * By default, return <code>null</code>.
- *
+ * @return <code>null</code>.
* @see org.apache.maven.artifact.Artifact#getDownloadUrl()
*/
public String getDownloadUrl()
@@ -275,8 +242,7 @@
}
/**
- * By default, return <code>null</code>.
- *
+ * @return <code>null</code>.
* @see org.apache.maven.artifact.Artifact#getDependencyFilter()
*/
public ArtifactFilter getDependencyFilter()
@@ -295,8 +261,7 @@
}
/**
- * By default, return <code>null</code>.
- *
+ * @return <code>null</code>.
* @see org.apache.maven.artifact.Artifact#getArtifactHandler()
*/
public ArtifactHandler getArtifactHandler()
@@ -305,8 +270,7 @@
}
/**
- * By default, return <code>null</code>.
- *
+ * @return <code>null</code>.
* @see org.apache.maven.artifact.Artifact#getDependencyTrail()
*/
public List getDependencyTrail()
@@ -324,17 +288,14 @@
// nop
}
- /**
- * @see org.apache.maven.artifact.Artifact#setScope(java.lang.String)
- */
+ /** {@inheritDoc} */
public void setScope( String scope )
{
this.scope = scope;
}
/**
- * By default, return <code>null</code>.
- *
+ * @return <code>null</code>.
* @see org.apache.maven.artifact.Artifact#getVersionRange()
*/
public VersionRange getVersionRange()
@@ -362,25 +323,20 @@
// nop
}
- /**
- * @see org.apache.maven.artifact.Artifact#setGroupId(java.lang.String)
- */
+ /** {@inheritDoc} */
public void setGroupId( String groupId )
{
this.groupId = groupId;
}
- /**
- * @see org.apache.maven.artifact.Artifact#setArtifactId(java.lang.String)
- */
+ /** {@inheritDoc} */
public void setArtifactId( String artifactId )
{
this.artifactId = artifactId;
}
/**
- * By default, return <code>false</code>.
- *
+ * @return <code>false</code>.
* @see org.apache.maven.artifact.Artifact#isSnapshot()
*/
public boolean isSnapshot()
@@ -400,8 +356,7 @@
}
/**
- * By default, return <code>false</code>.
- *
+ * @return <code>false</code>.
* @see org.apache.maven.artifact.Artifact#isResolved()
*/
public boolean isResolved()
@@ -430,8 +385,7 @@
}
/**
- * By default, return <code>false</code>.
- *
+ * @return <code>false</code>.
* @see org.apache.maven.artifact.Artifact#isRelease()
*/
public boolean isRelease()
@@ -450,8 +404,7 @@
}
/**
- * By default, return <code>null</code>.
- *
+ * @return <code>null</code>.
* @see org.apache.maven.artifact.Artifact#getAvailableVersions()
*/
public List getAvailableVersions()
@@ -470,8 +423,7 @@
}
/**
- * By default, return <code>false</code>.
- *
+ * @return <code>false</code>.
* @see org.apache.maven.artifact.Artifact#isOptional()
*/
public boolean isOptional()
@@ -490,8 +442,7 @@
}
/**
- * By default, return <code>null</code>.
- *
+ * @return <code>null</code>.
* @see org.apache.maven.artifact.Artifact#getSelectedVersion()
*/
public ArtifactVersion getSelectedVersion()
@@ -501,8 +452,7 @@
}
/**
- * By default, return <code>false</code>.
- *
+ * @return <code>false</code>.
* @see org.apache.maven.artifact.Artifact#isSelectedVersionKnown()
*/
public boolean isSelectedVersionKnown()
@@ -547,5 +497,4 @@
sb.append( getClassifier() );
}
}
-
}
Modified: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/DefaultArtifactHandlerStub.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/DefaultArtifactHandlerStub.java?rev=610987&r1=610986&r2=610987&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/DefaultArtifactHandlerStub.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/DefaultArtifactHandlerStub.java Thu Jan 10 15:25:01 2008
@@ -1,6 +1,6 @@
package org.apache.maven.plugin.testing.stubs;
-/*
+/*
* 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
@@ -16,15 +16,16 @@
* "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.
+ * under the License.
*/
import org.apache.maven.artifact.handler.ArtifactHandler;
/**
- * minimal artifact handler used by the stub factory to create unpackable archives.
- * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
+ * Minimal artifact handler used by the stub factory to create unpackable archives.
*
+ * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
+ * @version $Id: $
*/
public class DefaultArtifactHandlerStub
implements ArtifactHandler
@@ -45,6 +46,10 @@
private boolean addedToClasspath;
+ /**
+ * @param t the artifact handler type
+ * @param c the artifact handler classifier
+ */
public DefaultArtifactHandlerStub( String t, String c )
{
type = t;
@@ -56,11 +61,15 @@
}
+ /**
+ * @param t the artifact handler type
+ */
public DefaultArtifactHandlerStub( String type )
{
this.type = type;
}
+ /** {@inheritDoc} */
public String getExtension()
{
if ( extension == null )
@@ -70,16 +79,21 @@
return extension;
}
+ /**
+ * @return the artifact handler type
+ */
public String getType()
{
return type;
}
+ /** {@inheritDoc} */
public String getClassifier()
{
return classifier;
}
+ /** {@inheritDoc} */
public String getDirectory()
{
if ( directory == null )
@@ -89,6 +103,7 @@
return directory;
}
+ /** {@inheritDoc} */
public String getPackaging()
{
if ( packaging == null )
@@ -98,11 +113,13 @@
return packaging;
}
+ /** {@inheritDoc} */
public boolean isIncludesDependencies()
{
return includesDependencies;
}
+ /** {@inheritDoc} */
public String getLanguage()
{
if ( language == null )
@@ -113,6 +130,7 @@
return language;
}
+ /** {@inheritDoc} */
public boolean isAddedToClasspath()
{
return addedToClasspath;
Modified: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactCollector.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactCollector.java?rev=610987&r1=610986&r2=610987&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactCollector.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactCollector.java Thu Jan 10 15:25:01 2008
@@ -1,6 +1,6 @@
package org.apache.maven.plugin.testing.stubs;
-/*
+/*
* 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
@@ -16,7 +16,7 @@
* "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.
+ * under the License.
*/
import java.util.HashSet;
@@ -35,34 +35,21 @@
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
/**
- *
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
- *
+ * @version $Id: $
*/
public class StubArtifactCollector
implements ArtifactCollector
{
-
/**
- *
+ * Default constructor
*/
public StubArtifactCollector()
{
super();
- // TODO Auto-generated constructor stub
}
- /*
- * (non-Javadoc)
- *
- * @see org.apache.maven.artifact.resolver.ArtifactCollector#collect(java.util.Set,
- * org.apache.maven.artifact.Artifact,
- * org.apache.maven.artifact.repository.ArtifactRepository,
- * java.util.List,
- * org.apache.maven.artifact.metadata.ArtifactMetadataSource,
- * org.apache.maven.artifact.resolver.filter.ArtifactFilter,
- * java.util.List)
- */
+ /** {@inheritDoc} */
public ArtifactResolutionResult collect( Set theArtifacts, Artifact theOriginatingArtifact,
ArtifactRepository theLocalRepository, List theRemoteRepositories,
ArtifactMetadataSource theSource, ArtifactFilter theFilter,
@@ -81,17 +68,7 @@
return arr;
}
- /*
- * (non-Javadoc)
- *
- * @see org.apache.maven.artifact.resolver.ArtifactCollector#collect(java.util.Set,
- * org.apache.maven.artifact.Artifact, java.util.Map,
- * org.apache.maven.artifact.repository.ArtifactRepository,
- * java.util.List,
- * org.apache.maven.artifact.metadata.ArtifactMetadataSource,
- * org.apache.maven.artifact.resolver.filter.ArtifactFilter,
- * java.util.List)
- */
+ /** {@inheritDoc} */
public ArtifactResolutionResult collect( Set theArtifacts, Artifact theOriginatingArtifact, Map theManagedVersions,
ArtifactRepository theLocalRepository, List theRemoteRepositories,
ArtifactMetadataSource theSource, ArtifactFilter theFilter,
@@ -109,5 +86,4 @@
arr.setArtifactResolutionNodes( nodes );
return arr;
}
-
}
Modified: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java?rev=610987&r1=610986&r2=610987&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java Thu Jan 10 15:25:01 2008
@@ -1,6 +1,6 @@
package org.apache.maven.plugin.testing.stubs;
-/*
+/*
* 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
@@ -16,7 +16,7 @@
* "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.
+ * under the License.
*/
import org.apache.maven.artifact.Artifact;
@@ -26,99 +26,148 @@
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
/**
- *
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
- *
+ * @version $Id: $
*/
public class StubArtifactRepository
implements ArtifactRepository
{
String baseDir = null;
+ /**
+ * Default constructor
+ *
+ * @param dir the basedir
+ */
public StubArtifactRepository( String dir )
{
baseDir = dir;
}
+ /**
+ * @return the <code>artifactId</code>.
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#pathOf(org.apache.maven.artifact.Artifact)
+ */
public String pathOf( Artifact artifact )
{
return artifact.getId();
}
+ /**
+ * @return <code>null</code>.
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#pathOfRemoteRepositoryMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata)
+ */
public String pathOfRemoteRepositoryMetadata( ArtifactMetadata artifactMetadata )
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * @return the filename of this metadata on the local repository.
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#pathOfLocalRepositoryMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata, org.apache.maven.artifact.repository.ArtifactRepository)
+ */
public String pathOfLocalRepositoryMetadata( ArtifactMetadata metadata, ArtifactRepository repository )
{
return metadata.getLocalFilename( repository );
}
+ /**
+ * @return <code>null</code>.
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#getUrl()
+ */
public String getUrl()
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * @return <code>basedir</code>.
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#getBasedir()
+ */
public String getBasedir()
{
return baseDir;
}
+ /**
+ * @return <code>null</code>.
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#getProtocol()
+ */
public String getProtocol()
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * @return <code>null</code>.
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#getId()
+ */
public String getId()
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * @return <code>null</code>.
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#getSnapshots()
+ */
public ArtifactRepositoryPolicy getSnapshots()
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * @return <code>null</code>.
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#getReleases()
+ */
public ArtifactRepositoryPolicy getReleases()
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * @return <code>null</code>.
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#getLayout()
+ */
public ArtifactRepositoryLayout getLayout()
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * @return <code>null</code>.
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#getKey()
+ */
public String getKey()
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * @return <code>false</code>.
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#isUniqueVersion()
+ */
public boolean isUniqueVersion()
{
- // TODO Auto-generated method stub
return false;
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#setBlacklisted(boolean)
+ */
public void setBlacklisted( boolean blackListed )
{
- // TODO Auto-generated method stub
-
+ // nop
}
+ /**
+ * @return <code>false</code>.
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#isBlacklisted()
+ */
public boolean isBlacklisted()
{
- // TODO Auto-generated method stub
return false;
}
-
}
Modified: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java?rev=610987&r1=610986&r2=610987&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java Thu Jan 10 15:25:01 2008
@@ -1,6 +1,6 @@
package org.apache.maven.plugin.testing.stubs;
-/*
+/*
* 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
@@ -16,7 +16,7 @@
* "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.
+ * under the License.
*/
import java.io.IOException;
@@ -36,8 +36,9 @@
/**
* Stub resolver. The constructor allows the specification of the exception to throw so that handling can be tested too.
- * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
*
+ * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
+ * @version $Id: $
*/
public class StubArtifactResolver
implements ArtifactResolver
@@ -49,6 +50,13 @@
ArtifactStubFactory factory;
+ /**
+ * Default constructor
+ *
+ * @param factory
+ * @param throwArtifactResolutionException
+ * @param throwArtifactNotFoundException
+ */
public StubArtifactResolver( ArtifactStubFactory factory, boolean throwArtifactResolutionException,
boolean throwArtifactNotFoundException )
{
@@ -60,7 +68,7 @@
/*
* Creates dummy file and sets it in the artifact to simulate resolution
* (non-Javadoc)
- *
+ *
* @see org.apache.maven.artifact.resolver.ArtifactResolver#resolve(org.apache.maven.artifact.Artifact,
* java.util.List,
* org.apache.maven.artifact.repository.ArtifactRepository)
@@ -79,8 +87,7 @@
}
catch ( IOException e )
{
- // TODO Auto-generated catch block
- e.printStackTrace();
+ throw new ArtifactResolutionException( "IOException: " + e.getMessage(), artifact, e );
}
}
else
@@ -89,74 +96,93 @@
{
throw new ArtifactResolutionException( "Catch!", artifact );
}
- else
- {
- throw new ArtifactNotFoundException( "Catch!", artifact );
- }
+
+ throw new ArtifactNotFoundException( "Catch!", artifact );
}
}
+ /**
+ * @return <code>null</code>.
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, java.util.List, org.apache.maven.artifact.repository.ArtifactRepository, org.apache.maven.artifact.metadata.ArtifactMetadataSource)
+ */
public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact,
List remoteRepositories, ArtifactRepository localRepository,
ArtifactMetadataSource source )
throws ArtifactResolutionException, ArtifactNotFoundException
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * @return <code>null</code>.
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, java.util.List, org.apache.maven.artifact.repository.ArtifactRepository, org.apache.maven.artifact.metadata.ArtifactMetadataSource, java.util.List)
+ */
public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact,
List remoteRepositories, ArtifactRepository localRepository,
ArtifactMetadataSource source, List listeners )
throws ArtifactResolutionException, ArtifactNotFoundException
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * @return <code>null</code>.
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, org.apache.maven.artifact.repository.ArtifactRepository, java.util.List, org.apache.maven.artifact.metadata.ArtifactMetadataSource, org.apache.maven.artifact.resolver.filter.ArtifactFilter)
+ */
public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact,
ArtifactRepository localRepository, List remoteRepositories,
ArtifactMetadataSource source, ArtifactFilter filter )
throws ArtifactResolutionException, ArtifactNotFoundException
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * @return <code>null</code>.
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, java.util.Map, org.apache.maven.artifact.repository.ArtifactRepository, java.util.List, org.apache.maven.artifact.metadata.ArtifactMetadataSource)
+ */
public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact,
Map managedVersions, ArtifactRepository localRepository,
List remoteRepositories, ArtifactMetadataSource source )
throws ArtifactResolutionException, ArtifactNotFoundException
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * @return <code>null</code>.
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, java.util.Map, org.apache.maven.artifact.repository.ArtifactRepository, java.util.List, org.apache.maven.artifact.metadata.ArtifactMetadataSource, org.apache.maven.artifact.resolver.filter.ArtifactFilter)
+ */
public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact,
Map managedVersions, ArtifactRepository localRepository,
List remoteRepositories, ArtifactMetadataSource source,
ArtifactFilter filter )
throws ArtifactResolutionException, ArtifactNotFoundException
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * @return <code>null</code>.
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, java.util.Map, org.apache.maven.artifact.repository.ArtifactRepository, java.util.List, org.apache.maven.artifact.metadata.ArtifactMetadataSource, org.apache.maven.artifact.resolver.filter.ArtifactFilter, java.util.List)
+ */
public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact,
Map managedVersions, ArtifactRepository localRepository,
List remoteRepositories, ArtifactMetadataSource source,
ArtifactFilter filter, List listeners )
throws ArtifactResolutionException, ArtifactNotFoundException
{
- // TODO Auto-generated method stub
return null;
}
+ /**
+ * By default, do nothing.
+ *
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveAlways(org.apache.maven.artifact.Artifact, java.util.List, org.apache.maven.artifact.repository.ArtifactRepository)
+ */
public void resolveAlways( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository )
throws ArtifactResolutionException, ArtifactNotFoundException
{
- // TODO Auto-generated method stub
-
+ // nop
}
-
}