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