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=628492&r1=628491&r2=628492&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 Sun Feb 17 07:12:38 2008 @@ -1,173 +1,173 @@ -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 - * 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 org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.metadata.ArtifactMetadata; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy; -import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; - -/** - * @author <a href="mailto:[EMAIL PROTECTED]">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 ) - { - 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() - { - 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() - { - return null; - } - - /** - * @return <code>null</code>. - * @see org.apache.maven.artifact.repository.ArtifactRepository#getId() - */ - public String getId() - { - return null; - } - - /** - * @return <code>null</code>. - * @see org.apache.maven.artifact.repository.ArtifactRepository#getSnapshots() - */ - public ArtifactRepositoryPolicy getSnapshots() - { - return null; - } - - /** - * @return <code>null</code>. - * @see org.apache.maven.artifact.repository.ArtifactRepository#getReleases() - */ - public ArtifactRepositoryPolicy getReleases() - { - return null; - } - - /** - * @return <code>null</code>. - * @see org.apache.maven.artifact.repository.ArtifactRepository#getLayout() - */ - public ArtifactRepositoryLayout getLayout() - { - return null; - } - - /** - * @return <code>null</code>. - * @see org.apache.maven.artifact.repository.ArtifactRepository#getKey() - */ - public String getKey() - { - return null; - } - - /** - * @return <code>false</code>. - * @see org.apache.maven.artifact.repository.ArtifactRepository#isUniqueVersion() - */ - public boolean isUniqueVersion() - { - return false; - } - - /** - * By default, do nothing. - * - * @see org.apache.maven.artifact.repository.ArtifactRepository#setBlacklisted(boolean) - */ - public void setBlacklisted( boolean blackListed ) - { - // nop - } - - /** - * @return <code>false</code>. - * @see org.apache.maven.artifact.repository.ArtifactRepository#isBlacklisted() - */ - public boolean isBlacklisted() - { - return false; - } -} +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 + * 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 org.apache.maven.artifact.Artifact; +import org.apache.maven.artifact.metadata.ArtifactMetadata; +import org.apache.maven.artifact.repository.ArtifactRepository; +import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy; +import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; + +/** + * @author <a href="mailto:[EMAIL PROTECTED]">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 ) + { + 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() + { + 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() + { + return null; + } + + /** + * @return <code>null</code>. + * @see org.apache.maven.artifact.repository.ArtifactRepository#getId() + */ + public String getId() + { + return null; + } + + /** + * @return <code>null</code>. + * @see org.apache.maven.artifact.repository.ArtifactRepository#getSnapshots() + */ + public ArtifactRepositoryPolicy getSnapshots() + { + return null; + } + + /** + * @return <code>null</code>. + * @see org.apache.maven.artifact.repository.ArtifactRepository#getReleases() + */ + public ArtifactRepositoryPolicy getReleases() + { + return null; + } + + /** + * @return <code>null</code>. + * @see org.apache.maven.artifact.repository.ArtifactRepository#getLayout() + */ + public ArtifactRepositoryLayout getLayout() + { + return null; + } + + /** + * @return <code>null</code>. + * @see org.apache.maven.artifact.repository.ArtifactRepository#getKey() + */ + public String getKey() + { + return null; + } + + /** + * @return <code>false</code>. + * @see org.apache.maven.artifact.repository.ArtifactRepository#isUniqueVersion() + */ + public boolean isUniqueVersion() + { + return false; + } + + /** + * By default, do nothing. + * + * @see org.apache.maven.artifact.repository.ArtifactRepository#setBlacklisted(boolean) + */ + public void setBlacklisted( boolean blackListed ) + { + // nop + } + + /** + * @return <code>false</code>. + * @see org.apache.maven.artifact.repository.ArtifactRepository#isBlacklisted() + */ + public boolean isBlacklisted() + { + return false; + } +}
Propchange: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" 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=628492&r1=628491&r2=628492&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 Sun Feb 17 07:12:38 2008 @@ -1,188 +1,188 @@ -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 - * 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.IOException; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.metadata.ArtifactMetadataSource; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactNotFoundException; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.ArtifactResolutionResult; -import org.apache.maven.artifact.resolver.ArtifactResolver; -import org.apache.maven.artifact.resolver.filter.ArtifactFilter; -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. - * - * @author <a href="mailto:[EMAIL PROTECTED]">Brian Fox</a> - * @version $Id: $ - */ -public class StubArtifactResolver - implements ArtifactResolver -{ - - boolean throwArtifactResolutionException; - - boolean throwArtifactNotFoundException; - - ArtifactStubFactory factory; - - /** - * Default constructor - * - * @param factory - * @param throwArtifactResolutionException - * @param throwArtifactNotFoundException - */ - public StubArtifactResolver( ArtifactStubFactory factory, boolean throwArtifactResolutionException, - boolean throwArtifactNotFoundException ) - { - this.throwArtifactNotFoundException = throwArtifactNotFoundException; - this.throwArtifactResolutionException = throwArtifactResolutionException; - this.factory = factory; - } - - /* - * 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) - */ - public void resolve( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository ) - throws ArtifactResolutionException, ArtifactNotFoundException - { - if ( !this.throwArtifactNotFoundException && !this.throwArtifactResolutionException ) - { - try - { - if ( factory != null ) - { - factory.setArtifactFile( artifact, factory.getWorkingDir() ); - } - } - catch ( IOException e ) - { - throw new ArtifactResolutionException( "IOException: " + e.getMessage(), artifact, e ); - } - } - else - { - if ( throwArtifactResolutionException ) - { - throw new ArtifactResolutionException( "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 - { - 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 - { - 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 - { - 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 - { - 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 - { - 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 - { - 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 - { - // nop - } -} +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 + * 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.IOException; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.maven.artifact.Artifact; +import org.apache.maven.artifact.metadata.ArtifactMetadataSource; +import org.apache.maven.artifact.repository.ArtifactRepository; +import org.apache.maven.artifact.resolver.ArtifactNotFoundException; +import org.apache.maven.artifact.resolver.ArtifactResolutionException; +import org.apache.maven.artifact.resolver.ArtifactResolutionResult; +import org.apache.maven.artifact.resolver.ArtifactResolver; +import org.apache.maven.artifact.resolver.filter.ArtifactFilter; +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. + * + * @author <a href="mailto:[EMAIL PROTECTED]">Brian Fox</a> + * @version $Id$ + */ +public class StubArtifactResolver + implements ArtifactResolver +{ + + boolean throwArtifactResolutionException; + + boolean throwArtifactNotFoundException; + + ArtifactStubFactory factory; + + /** + * Default constructor + * + * @param factory + * @param throwArtifactResolutionException + * @param throwArtifactNotFoundException + */ + public StubArtifactResolver( ArtifactStubFactory factory, boolean throwArtifactResolutionException, + boolean throwArtifactNotFoundException ) + { + this.throwArtifactNotFoundException = throwArtifactNotFoundException; + this.throwArtifactResolutionException = throwArtifactResolutionException; + this.factory = factory; + } + + /* + * 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) + */ + public void resolve( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository ) + throws ArtifactResolutionException, ArtifactNotFoundException + { + if ( !this.throwArtifactNotFoundException && !this.throwArtifactResolutionException ) + { + try + { + if ( factory != null ) + { + factory.setArtifactFile( artifact, factory.getWorkingDir() ); + } + } + catch ( IOException e ) + { + throw new ArtifactResolutionException( "IOException: " + e.getMessage(), artifact, e ); + } + } + else + { + if ( throwArtifactResolutionException ) + { + throw new ArtifactResolutionException( "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 + { + 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 + { + 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 + { + 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 + { + 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 + { + 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 + { + 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 + { + // nop + } +} Propchange: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Modified: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ArtifactStubFactoryTest.java URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ArtifactStubFactoryTest.java?rev=628492&r1=628491&r2=628492&view=diff ============================================================================== --- maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ArtifactStubFactoryTest.java (original) +++ maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ArtifactStubFactoryTest.java Sun Feb 17 07:12:38 2008 @@ -1,25 +1,25 @@ -package org.apache.maven.plugin.testing; - -import java.io.IOException; - -import junit.framework.TestCase; - -public class ArtifactStubFactoryTest - extends TestCase -{ - public void testVersionChecks() throws IOException - { - ArtifactStubFactory factory = new ArtifactStubFactory(); - assertTrue(factory.getReleaseArtifact().isRelease()); - assertFalse(factory.getReleaseArtifact().isSnapshot()); - assertTrue(factory.getSnapshotArtifact().isSnapshot()); - assertFalse(factory.getSnapshotArtifact().isRelease()); - - } - - public void testCreateFiles() throws IOException - { - ArtifactStubFactory factory = new ArtifactStubFactory(); - assertFalse(factory.isCreateFiles()); - } -} +package org.apache.maven.plugin.testing; + +import java.io.IOException; + +import junit.framework.TestCase; + +public class ArtifactStubFactoryTest + extends TestCase +{ + public void testVersionChecks() throws IOException + { + ArtifactStubFactory factory = new ArtifactStubFactory(); + assertTrue(factory.getReleaseArtifact().isRelease()); + assertFalse(factory.getReleaseArtifact().isSnapshot()); + assertTrue(factory.getSnapshotArtifact().isSnapshot()); + assertFalse(factory.getSnapshotArtifact().isRelease()); + + } + + public void testCreateFiles() throws IOException + { + ArtifactStubFactory factory = new ArtifactStubFactory(); + assertFalse(factory.isCreateFiles()); + } +} Propchange: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ArtifactStubFactoryTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ArtifactStubFactoryTest.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorMojo.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorMojo.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorTest.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Modified: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/TestSilentLog.java URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/TestSilentLog.java?rev=628492&r1=628491&r2=628492&view=diff ============================================================================== --- maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/TestSilentLog.java (original) +++ maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/TestSilentLog.java Sun Feb 17 07:12:38 2008 @@ -1,81 +1,81 @@ -package org.apache.maven.plugin.testing; - -/* - * 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 junit.framework.TestCase; - -import org.apache.maven.plugin.logging.Log; -import org.codehaus.plexus.logging.Logger; - -public class TestSilentLog - extends TestCase -{ - - public void testLog() - { - Log log = new SilentLog(); - String text = new String( "Text" ); - Throwable e = new RuntimeException(); - log.debug( text ); - log.debug( text, e ); - log.debug( e ); - log.info( text ); - log.info( text, e ); - log.info( e ); - log.warn( text ); - log.warn( text, e ); - log.warn( e ); - log.error( text ); - log.error( text, e ); - log.error( e ); - log.isDebugEnabled(); - log.isErrorEnabled(); - log.isWarnEnabled(); - log.isInfoEnabled(); - } - - public void testLogger() - { - Logger log = new SilentLog(); - String text = new String( "Text" ); - Throwable e = new RuntimeException(); - - log.debug( text ); - log.debug( text, e ); - log.error( text ); - log.error( text, e ); - log.warn( text ); - log.warn( text, e ); - log.info( text ); - log.info( text, e ); - - log.fatalError( text ); - log.fatalError( text, e ); - log.getChildLogger( text ); - log.getName(); - log.getThreshold(); - log.isDebugEnabled(); - log.isErrorEnabled(); - log.isFatalErrorEnabled(); - log.isInfoEnabled(); - log.isWarnEnabled(); - } - -} +package org.apache.maven.plugin.testing; + +/* + * 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 junit.framework.TestCase; + +import org.apache.maven.plugin.logging.Log; +import org.codehaus.plexus.logging.Logger; + +public class TestSilentLog + extends TestCase +{ + + public void testLog() + { + Log log = new SilentLog(); + String text = new String( "Text" ); + Throwable e = new RuntimeException(); + log.debug( text ); + log.debug( text, e ); + log.debug( e ); + log.info( text ); + log.info( text, e ); + log.info( e ); + log.warn( text ); + log.warn( text, e ); + log.warn( e ); + log.error( text ); + log.error( text, e ); + log.error( e ); + log.isDebugEnabled(); + log.isErrorEnabled(); + log.isWarnEnabled(); + log.isInfoEnabled(); + } + + public void testLogger() + { + Logger log = new SilentLog(); + String text = new String( "Text" ); + Throwable e = new RuntimeException(); + + log.debug( text ); + log.debug( text, e ); + log.error( text ); + log.error( text, e ); + log.warn( text ); + log.warn( text, e ); + log.info( text ); + log.info( text, e ); + + log.fatalError( text ); + log.fatalError( text, e ); + log.getChildLogger( text ); + log.getName(); + log.getThreshold(); + log.isDebugEnabled(); + log.isErrorEnabled(); + log.isFatalErrorEnabled(); + log.isInfoEnabled(); + log.isWarnEnabled(); + } + +} Propchange: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/TestSilentLog.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugin-tools/trunk/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/TestSilentLog.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/pom.xml ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/AbstractScriptedMojoDescriptorExtractor.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/MojoDescriptorExtractor.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/Generator.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/MojoScanner.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/util/PluginUtils.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/resources/META-INF/plexus/components.xml ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/AbstractGeneratorTestCase.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGeneratorTest.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/PluginXdocGeneratorTest.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScannerTest.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/scanner/ScannerTestExtractor.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/scanner/TestExtractor.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/util/PluginUtilsTest.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/util/TestUtils.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/resources/META-INF/plexus/scannerTestComponents.xml ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/resources/test.txt ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/resources/testExcludes.txt ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-beanshell/src/main/resources/extractor.bsh ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugin-tools/trunk/maven-plugin-tools-beanshell/src/main/resources/extractor.bsh ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-java/pom.xml ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractor.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-java/src/main/resources/META-INF/plexus/components.xml ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-java/src/test/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractorTest.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-java/src/test/resources/dir-flag.txt ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-java/src/test/resources/source/JavaExtractorTestOne.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/maven-plugin-tools-java/src/test/resources/source/JavaExtractorTestTwo.java ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Sun Feb 17 07:12:38 2008 @@ -1 +1 @@ -Author Date Id Revision +"Author Date Id Revision" Propchange: maven/plugin-tools/trunk/pom.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision"