Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/CacheTest.java URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/CacheTest.java?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/CacheTest.java (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/CacheTest.java Thu Dec 29 20:37:28 2005 @@ -1,14 +1,13 @@ package org.apache.maven.repository.reporting; /* - * Copyright 2001-2005 The Apache Software Foundation. + * Copyright 2005-2006 The Apache Software Foundation. * * Licensed 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, @@ -31,19 +30,19 @@ { cache = new Cache( 0.5 ); newCacheObjectTests(); - + String key = "key"; String value = "value"; - for( int ctr=1; ctr<10; ctr++ ) + for ( int ctr = 1; ctr < 10; ctr++ ) { cache.put( key + ctr, value + ctr ); } - + while ( cache.getHitRate() < 0.75 ) { cache.get( "key2" ); } - cache.put( "key10", "value10"); + cache.put( "key10", "value10" ); assertNull( "first key must be expired", cache.get( "key1" ) ); } @@ -51,15 +50,15 @@ { cache = new Cache( 9 ); newCacheObjectTests(); - + String key = "key"; String value = "value"; - for( int ctr=1; ctr<10; ctr++ ) + for ( int ctr = 1; ctr < 10; ctr++ ) { cache.put( key + ctr, value + ctr ); } - - cache.put( "key10", "value10"); + + cache.put( "key10", "value10" ); assertNull( "first key must be expired", cache.get( "key1" ) ); assertEquals( "check cache size to be max size", 9, cache.size() ); } @@ -68,10 +67,10 @@ { cache = new Cache( 0.5, 9 ); newCacheObjectTests(); - + String key = "key"; String value = "value"; - for( int ctr=1; ctr<5; ctr++ ) + for ( int ctr = 1; ctr < 5; ctr++ ) { cache.put( key + ctr, value + ctr ); } @@ -80,21 +79,21 @@ { cache.get( "key3" ); } - - cache.put( "key10", "value10"); + + cache.put( "key10", "value10" ); assertNull( "first key must be expired", cache.get( "key1" ) ); while ( cache.getHitRate() >= 0.5 ) { cache.get( "key11" ); } - - for( int ctr=5; ctr<10; ctr++ ) + + for ( int ctr = 5; ctr < 10; ctr++ ) { cache.put( key + ctr, value + ctr ); } - - cache.put( "key11", "value11"); + + cache.put( "key11", "value11" ); assertNull( "second key must be expired", cache.get( "key2" ) ); assertEquals( "check cache size to be max size", 9, cache.size() ); } @@ -103,16 +102,16 @@ { cache = new Cache( 0.5, 9 ); newCacheObjectTests(); - + String key = "key"; String value = "value"; - for( int ctr=1; ctr<10; ctr++ ) + for ( int ctr = 1; ctr < 10; ctr++ ) { cache.put( key + ctr, value + ctr ); } - - cache.put( "key1", "value1"); - cache.put( "key10", "value10"); + + cache.put( "key1", "value1" ); + cache.put( "key10", "value10" ); assertNull( "second key must be gone", cache.get( "key2" ) ); assertEquals( "check cache size to be max size", 9, cache.size() ); }
Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/CachedRepositoryQueryLayerTest.java URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/CachedRepositoryQueryLayerTest.java?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/CachedRepositoryQueryLayerTest.java (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/CachedRepositoryQueryLayerTest.java Thu Dec 29 20:37:28 2005 @@ -1,14 +1,13 @@ package org.apache.maven.repository.reporting; /* - * Copyright 2001-2005 The Apache Software Foundation. + * Copyright 2005-2006 The Apache Software Foundation. * * Licensed 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, @@ -23,13 +22,14 @@ public class CachedRepositoryQueryLayerTest extends AbstractRepositoryQueryLayerTest { - protected void setUp() throws Exception + protected void setUp() + throws Exception { super.setUp(); - + queryLayer = new CachedRepositoryQueryLayer( repository ); } - + public void testUseFileCache() { testContainsArtifactTrue(); @@ -37,7 +37,7 @@ testContainsArtifactTrue(); assertEquals( 0.50, queryLayer.getCacheHitRate(), 0 ); } - + public void testUseMetadataCache() throws Exception { @@ -46,7 +46,7 @@ testArtifactVersionsTrue(); assertEquals( 0.50, queryLayer.getCacheHitRate(), 0 ); } - + public void testUseFileCacheOnSnapshot() { testContainsSnapshotArtifactTrue(); Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/ChecksumArtifactReporterTest.java URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/ChecksumArtifactReporterTest.java?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/ChecksumArtifactReporterTest.java (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/ChecksumArtifactReporterTest.java Thu Dec 29 20:37:28 2005 @@ -1,39 +1,36 @@ package org.apache.maven.repository.reporting; -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed 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 - * +/* + * Copyright 2005-2006 The Apache Software Foundation. + * + * Licensed 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. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -import java.io.File; -import java.util.Iterator; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.repository.DefaultArtifactRepository; -import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout; import org.apache.maven.artifact.repository.metadata.ArtifactRepositoryMetadata; import org.apache.maven.artifact.repository.metadata.GroupRepositoryMetadata; import org.apache.maven.artifact.repository.metadata.RepositoryMetadata; import org.apache.maven.artifact.repository.metadata.SnapshotArtifactRepositoryMetadata; import org.apache.maven.artifact.versioning.VersionRange; -/** - * This class tests the ChecksumArtifactReporter. +import java.io.File; +import java.util.Iterator; + +/** + * This class tests the ChecksumArtifactReporter. * It extends the AbstractChecksumArtifactReporterTest class. */ public class ChecksumArtifactReporterTest @@ -91,8 +88,8 @@ { ArtifactHandler handler = new DefaultArtifactHandler( "jar" ); VersionRange version = VersionRange.createFromVersion( "1.0" ); - Artifact artifact = new DefaultArtifact( "checksumTest", "validArtifact", version, "compile", "jar", "", - handler ); + Artifact artifact = + new DefaultArtifact( "checksumTest", "validArtifact", version, "compile", "jar", "", handler ); artifactReportProcessor.processArtifact( null, artifact, reporter, repository ); assertTrue( reporter.getSuccesses() == 2 ); @@ -115,8 +112,8 @@ { ArtifactHandler handler = new DefaultArtifactHandler( "jar" ); VersionRange version = VersionRange.createFromVersion( "1.0" ); - Artifact artifact = new DefaultArtifact( "checksumTest", "invalidArtifact", version, "compile", "jar", "", - handler ); + Artifact artifact = + new DefaultArtifact( "checksumTest", "invalidArtifact", version, "compile", "jar", "", handler ); artifactReportProcessor.processArtifact( null, artifact, reporter, repository ); assertTrue( reporter.getFailures() == 2 ); @@ -129,7 +126,7 @@ } /** - * Test the valid checksum of a metadata file. + * Test the valid checksum of a metadata file. * The reporter should report 2 success validation. */ public void testChecksumMetadataReporterSuccess() @@ -139,8 +136,8 @@ { ArtifactHandler handler = new DefaultArtifactHandler( "jar" ); VersionRange version = VersionRange.createFromVersion( "1.0" ); - Artifact artifact = new DefaultArtifact( "checksumTest", "validArtifact", version, "compile", "jar", "", - handler ); + Artifact artifact = + new DefaultArtifact( "checksumTest", "validArtifact", version, "compile", "jar", "", handler ); //Version level metadata RepositoryMetadata metadata = new SnapshotArtifactRepositoryMetadata( artifact ); @@ -166,7 +163,7 @@ } /** - * Test the corrupted checksum of a metadata file. + * Test the corrupted checksum of a metadata file. * The reporter must report 2 failures. */ public void testChecksumMetadataReporterFailure() @@ -176,8 +173,8 @@ { ArtifactHandler handler = new DefaultArtifactHandler( "jar" ); VersionRange version = VersionRange.createFromVersion( "1.0" ); - Artifact artifact = new DefaultArtifact( "checksumTest", "invalidArtifact", version, "compile", "jar", "", - handler ); + Artifact artifact = + new DefaultArtifact( "checksumTest", "invalidArtifact", version, "compile", "jar", "", handler ); RepositoryMetadata metadata = new SnapshotArtifactRepositoryMetadata( artifact ); metadataReportProcessor.processMetadata( metadata, repository, reporter ); @@ -198,7 +195,7 @@ /** * Test the checksum of an artifact located in a remote location. */ - /* public void testChecksumArtifactRemote() + /* public void testChecksumArtifactRemote() { ArtifactHandler handler = new DefaultArtifactHandler( remoteArtifactType ); VersionRange version = VersionRange.createFromVersion( remoteArtifactVersion ); @@ -220,7 +217,7 @@ /** * Test the checksum of a metadata file located in a remote location. */ - /* public void testChecksumMetadataRemote() + /* public void testChecksumMetadataRemote() { try @@ -280,8 +277,8 @@ { ArtifactHandler handler = new DefaultArtifactHandler( "jar" ); VersionRange version = VersionRange.createFromVersion( "1.0" ); - Artifact artifact = new DefaultArtifact( "checksumTest", "validArtifact", version, "compile", "jar", "", - handler ); + Artifact artifact = + new DefaultArtifact( "checksumTest", "validArtifact", version, "compile", "jar", "", handler ); artifactReportProcessor.processArtifact( null, artifact, reporter, repository ); //System.out.println( "5 - ART FAILURE ---> " + reporter.getFailures() ); Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/DefaultArtifactReporterTest.java URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/DefaultArtifactReporterTest.java?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/DefaultArtifactReporterTest.java (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/DefaultArtifactReporterTest.java Thu Dec 29 20:37:28 2005 @@ -1,7 +1,7 @@ package org.apache.maven.repository.reporting; /* - * Copyright 2001-2005 The Apache Software Foundation. + * Copyright 2005-2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,14 +28,14 @@ * */ public class DefaultArtifactReporterTest - extends AbstractRepositoryReportsTestCase + extends AbstractRepositoryReportsTestCase { private ArtifactReporter reporter; - + private Artifact artifact; - + private RepositoryMetadata metadata; - + public void testEmptyArtifactReporter() { assertEquals( "No failures", 0, reporter.getFailures() ); @@ -48,7 +48,7 @@ assertFalse( "No metadata warnings", reporter.getRepositoryMetadataWarningIterator().hasNext() ); assertFalse( "No metadata successes", reporter.getRepositoryMetadataSuccessIterator().hasNext() ); } - + public void testMetadataSingleFailure() { reporter.addFailure( metadata, "Single Failure Reason" ); @@ -63,7 +63,7 @@ assertEquals( "check failure reason", "Single Failure Reason", result.getReason() ); assertFalse( "no more failures", results.hasNext() ); } - + public void testMetadataMultipleFailures() { reporter.addFailure( metadata, "First Failure Reason" ); @@ -98,7 +98,7 @@ assertEquals( "check failure reason", "Single Warning Message", result.getReason() ); assertFalse( "no more failures", results.hasNext() ); } - + public void testMetadataMultipleWarnings() { reporter.addWarning( metadata, "First Warning" ); @@ -133,14 +133,14 @@ assertNull( "check no reason", result.getReason() ); assertFalse( "no more failures", results.hasNext() ); } - + public void testMetadataMultipleSuccesses() { Versioning versioning = new Versioning(); versioning.addVersion( "1.0-beta-1" ); - versioning.addVersion( "1.0-beta-2" ); + versioning.addVersion( "1.0-beta-2" ); RepositoryMetadata metadata2 = new ArtifactRepositoryMetadata( artifact, versioning ); - + reporter.addSuccess( metadata ); reporter.addSuccess( metadata2 ); assertEquals( "failures count", 0, reporter.getFailures() ); @@ -159,24 +159,26 @@ assertFalse( "no more successes", results.hasNext() ); } - protected void setUp() throws Exception + protected void setUp() + throws Exception { super.setUp(); - + reporter = new DefaultArtifactReporter(); ArtifactFactory artifactFactory = (ArtifactFactory) lookup( ArtifactFactory.ROLE ); artifact = artifactFactory.createBuildArtifact( "groupId", "artifactId", "1.0-alpha-1", "type" ); Versioning versioning = new Versioning(); versioning.addVersion( "1.0-alpha-1" ); - versioning.addVersion( "1.0-alpha-2" ); + versioning.addVersion( "1.0-alpha-2" ); RepositoryMetadata metadata = new ArtifactRepositoryMetadata( artifact, versioning ); } - protected void tearDown() throws Exception + protected void tearDown() + throws Exception { super.tearDown(); - + reporter = null; metadata = null; } Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/GenericMockObject.java URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/GenericMockObject.java?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/GenericMockObject.java (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/GenericMockObject.java Thu Dec 29 20:37:28 2005 @@ -1,14 +1,13 @@ package org.apache.maven.repository.reporting; /* - * Copyright 2001-2005 The Apache Software Foundation. + * Copyright 2005-2006 The Apache Software Foundation. * * Licensed 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, @@ -19,42 +18,46 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; -import java.lang.reflect.Proxy; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** - * * @author Edwin Punzalan */ -public class GenericMockObject implements InvocationHandler +public class GenericMockObject + implements InvocationHandler { Map invocations = new HashMap(); - + public GenericMockObject() { //default constructor } - + public GenericMockObject( Map returnMap ) { invocations = returnMap; } - + public void setExpectedReturns( Method method, List returnList ) { invocations.put( method, returnList ); } - public Object invoke(Object proxy, Method method, Object[] args) throws Throwable + public Object invoke( Object proxy, Method method, Object[] args ) + throws Throwable { - if ( !invocations.containsKey( method ) ) + if ( !invocations.containsKey( method ) ) + { throw new UnsupportedOperationException( "No expected return values defined." ); - + } + List returnList = (List) invocations.get( method ); - if ( returnList.size() < 1 ) throw new UnsupportedOperationException( "Too few expected return values defined." ); + if ( returnList.size() < 1 ) + { + throw new UnsupportedOperationException( "Too few expected return values defined." ); + } return returnList.remove( 0 ); } } Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/InvalidPomArtifactReportProcessorTest.java URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/InvalidPomArtifactReportProcessorTest.java?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/InvalidPomArtifactReportProcessorTest.java (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/InvalidPomArtifactReportProcessorTest.java Thu Dec 29 20:37:28 2005 @@ -1,117 +1,127 @@ package org.apache.maven.repository.reporting; +/* + * Copyright 2005-2006 The Apache Software Foundation. + * + * Licensed 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.DefaultArtifact; import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.repository.DefaultArtifactRepository; -import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout; import org.apache.maven.artifact.versioning.VersionRange; -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed 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. - */ - /** * This class tests the InvalidPomArtifactReportProcessor class. */ -public class InvalidPomArtifactReportProcessorTest +public class InvalidPomArtifactReportProcessorTest extends AbstractRepositoryReportsTestCase { private ArtifactReportProcessor artifactReportProcessor; private ArtifactReporter reporter = new MockArtifactReporter(); - - public void setUp() throws Exception{ + + public void setUp() + throws Exception + { super.setUp(); artifactReportProcessor = (ArtifactReportProcessor) lookup( ArtifactReportProcessor.ROLE, "invalid-pom" ); } - - public void tearDown() throws Exception{ + + public void tearDown() + throws Exception + { super.tearDown(); } - + /** * Test the InvalidPomArtifactReportProcessor when the artifact is an invalid pom. */ - public void testInvalidPomArtifactReportProcessorFailure(){ - - try{ + public void testInvalidPomArtifactReportProcessorFailure() + { + + try + { ArtifactHandler handler = new DefaultArtifactHandler( "pom" ); VersionRange version = VersionRange.createFromVersion( "1.0-alpha-3" ); - Artifact artifact = new DefaultArtifact( "org.apache.maven", "artifactId", version, "compile", "pom", "", - handler ); - - artifactReportProcessor.processArtifact(null, artifact, reporter, repository); - assertTrue(reporter.getFailures() == 1); + Artifact artifact = + new DefaultArtifact( "org.apache.maven", "artifactId", version, "compile", "pom", "", handler ); + + artifactReportProcessor.processArtifact( null, artifact, reporter, repository ); + assertTrue( reporter.getFailures() == 1 ); //System.out.println("INVALID POM ARTIFACT FAILURES --->> " + reporter.getFailures()); - - }catch(Exception e){ - + + } + catch ( Exception e ) + { + } } - - + + /** * Test the InvalidPomArtifactReportProcessor when the artifact is a valid pom. */ - public void testInvalidPomArtifactReportProcessorSuccess(){ - - try{ + public void testInvalidPomArtifactReportProcessorSuccess() + { + + try + { ArtifactHandler handler = new DefaultArtifactHandler( "pom" ); VersionRange version = VersionRange.createFromVersion( "1.0-alpha-2" ); - Artifact artifact = new DefaultArtifact( "groupId", "artifactId", version, "compile", "pom", "", - handler ); - - artifactReportProcessor.processArtifact(null, artifact, reporter, repository); - assertTrue(reporter.getSuccesses() == 1); + Artifact artifact = new DefaultArtifact( "groupId", "artifactId", version, "compile", "pom", "", handler ); + + artifactReportProcessor.processArtifact( null, artifact, reporter, repository ); + assertTrue( reporter.getSuccesses() == 1 ); //System.out.println("VALID POM ARTIFACT SUCCESS --->> " + reporter.getSuccesses()); - - }catch(Exception e){ - + + } + catch ( Exception e ) + { + } } - - + + /** * Test the InvalidPomArtifactReportProcessor when the artifact is not a pom. */ - public void testNotAPomArtifactReportProcessorSuccess(){ - - try{ + public void testNotAPomArtifactReportProcessorSuccess() + { + + try + { ArtifactHandler handler = new DefaultArtifactHandler( "jar" ); VersionRange version = VersionRange.createFromVersion( "1.0-alpha-1" ); - Artifact artifact = new DefaultArtifact( "groupId", "artifactId", version, "compile", "jar", "", - handler ); - - artifactReportProcessor.processArtifact(null, artifact, reporter, repository); - assertTrue(reporter.getWarnings() == 1); + Artifact artifact = new DefaultArtifact( "groupId", "artifactId", version, "compile", "jar", "", handler ); + + artifactReportProcessor.processArtifact( null, artifact, reporter, repository ); + assertTrue( reporter.getWarnings() == 1 ); //System.out.println("NOT A POM ARTIFACT WARNINGS --->> " + reporter.getWarnings()); - - }catch(Exception e){ - + + } + catch ( Exception e ) + { + } } - + /** * Test the InvalidPomArtifactReportProcessor when the pom is located in * a remote repository. */ - /* public void testRemotePomArtifactReportProcessorSuccess(){ + /* public void testRemotePomArtifactReportProcessorSuccess(){ try{ ArtifactHandler handler = new DefaultArtifactHandler( "pom" ); VersionRange version = VersionRange.createFromVersion( remoteArtifactVersion ); Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/LocationArtifactReportProcessorTest.java URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/LocationArtifactReportProcessorTest.java?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/LocationArtifactReportProcessorTest.java (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/LocationArtifactReportProcessorTest.java Thu Dec 29 20:37:28 2005 @@ -1,41 +1,36 @@ package org.apache.maven.repository.reporting; -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed 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 - * +/* + * Copyright 2005-2006 The Apache Software Foundation. + * + * Licensed 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. + * + * 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.FileInputStream; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.net.URL; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.repository.DefaultArtifactRepository; -import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout; import org.apache.maven.artifact.versioning.VersionRange; import org.apache.maven.model.Model; import org.apache.maven.model.io.xpp3.MavenXpp3Reader; +import java.io.FileInputStream; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; + /** * This class tests the LocationArtifactReportProcessor. - * */ public class LocationArtifactReportProcessorTest extends AbstractRepositoryReportsTestCase @@ -74,11 +69,11 @@ { ArtifactHandler handler = new DefaultArtifactHandler( "jar" ); VersionRange version = VersionRange.createFromVersion( "2.0" ); - Artifact artifact = new DefaultArtifact( "org.apache.maven", "maven-model", version, "compile", "jar", "", - handler ); + Artifact artifact = + new DefaultArtifact( "org.apache.maven", "maven-model", version, "compile", "jar", "", handler ); - InputStream is = new FileInputStream( repository.getBasedir() - + "org.apache.maven/maven-model/2.0/maven-model-2.0.pom" ); + InputStream is = + new FileInputStream( repository.getBasedir() + "org.apache.maven/maven-model/2.0/maven-model-2.0.pom" ); Reader reader = new InputStreamReader( is ); Model model = pomReader.read( reader ); @@ -107,8 +102,8 @@ VersionRange version = VersionRange.createFromVersion( "1.0-alpha-1" ); Artifact artifact = new DefaultArtifact( "groupId", "artifactId", version, "compile", "jar", "", handler ); - InputStream is = new FileInputStream( repository.getBasedir() - + "groupId/artifactId/1.0-alpha-1/artifactId-1.0-alpha-1.pom" ); + InputStream is = new FileInputStream( + repository.getBasedir() + "groupId/artifactId/1.0-alpha-1/artifactId-1.0-alpha-1.pom" ); Reader reader = new InputStreamReader( is ); Model model = pomReader.read( reader ); @@ -124,7 +119,7 @@ /** * Test the LocationArtifactReporter when the artifact is not in the location specified - * in the file system pom. + * in the file system pom. */ public void testLocationArtifactReporterFailure() { @@ -137,8 +132,8 @@ VersionRange version = VersionRange.createFromVersion( "1.0-alpha-2" ); Artifact artifact = new DefaultArtifact( "groupId", "artifactId", version, "compile", "jar", "", handler ); - InputStream is = new FileInputStream( repository.getBasedir() - + "groupId/artifactId/1.0-alpha-2/artifactId-1.0-alpha-2.pom" ); + InputStream is = new FileInputStream( + repository.getBasedir() + "groupId/artifactId/1.0-alpha-2/artifactId-1.0-alpha-2.pom" ); Reader reader = new InputStreamReader( is ); Model model = pomReader.read( reader ); @@ -165,11 +160,11 @@ { ArtifactHandler handler = new DefaultArtifactHandler( "jar" ); VersionRange version = VersionRange.createFromVersion( "2.0" ); - Artifact artifact = new DefaultArtifact( "org.apache.maven", "maven-archiver", version, "compile", "jar", - "", handler ); + Artifact artifact = + new DefaultArtifact( "org.apache.maven", "maven-archiver", version, "compile", "jar", "", handler ); - InputStream is = new FileInputStream( repository.getBasedir() - + "org.apache.maven/maven-archiver/2.0/maven-archiver-2.0.pom" ); + InputStream is = new FileInputStream( + repository.getBasedir() + "org.apache.maven/maven-archiver/2.0/maven-archiver-2.0.pom" ); Reader reader = new InputStreamReader( is ); Model model = pomReader.read( reader ); @@ -197,11 +192,11 @@ { ArtifactHandler handler = new DefaultArtifactHandler( "jar" ); VersionRange version = VersionRange.createFromVersion( "2.1" ); - Artifact artifact = new DefaultArtifact( "org.apache.maven", "maven-monitor", version, "compile", "jar", - "", handler ); + Artifact artifact = + new DefaultArtifact( "org.apache.maven", "maven-monitor", version, "compile", "jar", "", handler ); - InputStream is = new FileInputStream( repository.getBasedir() - + "org.apache.maven/maven-monitor/2.1/maven-monitor-2.1.pom" ); + InputStream is = new FileInputStream( + repository.getBasedir() + "org.apache.maven/maven-monitor/2.1/maven-monitor-2.1.pom" ); Reader reader = new InputStreamReader( is ); Model model = pomReader.read( reader ); @@ -228,11 +223,11 @@ { ArtifactHandler handler = new DefaultArtifactHandler( "jar" ); VersionRange version = VersionRange.createFromVersion( "2.1" ); - Artifact artifact = new DefaultArtifact( "org.apache.maven", "maven-project", version, "compile", "jar", - "", handler ); + Artifact artifact = + new DefaultArtifact( "org.apache.maven", "maven-project", version, "compile", "jar", "", handler ); - InputStream is = new FileInputStream( repository.getBasedir() - + "org.apache.maven/maven-project/2.1/maven-project-2.1.pom" ); + InputStream is = new FileInputStream( + repository.getBasedir() + "org.apache.maven/maven-project/2.1/maven-project-2.1.pom" ); Reader reader = new InputStreamReader( is ); Model model = pomReader.read( reader ); @@ -249,7 +244,7 @@ /** * Test the LocationArtifactReportProcessor when the artifact is located in the remote repository. */ - /* public void testRemoteArtifactReportProcessorFailure() + /* public void testRemoteArtifactReportProcessorFailure() { ArtifactHandler handler = new DefaultArtifactHandler( remoteArtifactType ); Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifact.java URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifact.java?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifact.java (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifact.java Thu Dec 29 20:37:28 2005 @@ -1,7 +1,7 @@ package org.apache.maven.repository.reporting; /* - * Copyright 2001-2005 The Apache Software Foundation. + * Copyright 2005-2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,13 +17,13 @@ */ import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.versioning.VersionRange; -import org.apache.maven.artifact.versioning.ArtifactVersion; -import org.apache.maven.artifact.versioning.OverConstrainedVersionException; import org.apache.maven.artifact.handler.ArtifactHandler; -import org.apache.maven.artifact.resolver.filter.ArtifactFilter; -import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.metadata.ArtifactMetadata; +import org.apache.maven.artifact.repository.ArtifactRepository; +import org.apache.maven.artifact.resolver.filter.ArtifactFilter; +import org.apache.maven.artifact.versioning.ArtifactVersion; +import org.apache.maven.artifact.versioning.OverConstrainedVersionException; +import org.apache.maven.artifact.versioning.VersionRange; import java.io.File; import java.util.Collection; @@ -36,7 +36,9 @@ implements Artifact { private String groupId; + private String artifactId; + private String version; public String getGroupId() Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactFactory.java URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactFactory.java?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactFactory.java (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactFactory.java Thu Dec 29 20:37:28 2005 @@ -1,7 +1,7 @@ package org.apache.maven.repository.reporting; /* - * Copyright 2001-2005 The Apache Software Foundation. + * Copyright 2005-2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ * limitations under the License. */ -import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.Artifact; +import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.versioning.VersionRange; /** Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReportProcessor.java URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReportProcessor.java?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReportProcessor.java (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReportProcessor.java Thu Dec 29 20:37:28 2005 @@ -1,7 +1,7 @@ package org.apache.maven.repository.reporting; /* - * Copyright 2001-2005 The Apache Software Foundation. + * Copyright 2005-2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,9 +20,9 @@ import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.model.Model; -import java.util.List; -import java.util.Iterator; import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; /** * @@ -39,7 +39,8 @@ reportConditions = new ArrayList(); } - public void processArtifact( Model model, Artifact artifact, ArtifactReporter reporter, ArtifactRepository artifactRepository ) + public void processArtifact( Model model, Artifact artifact, ArtifactReporter reporter, + ArtifactRepository artifactRepository ) { if ( iterator == null || !iterator.hasNext() ) // not initialized or reached end of the list. start again { @@ -47,26 +48,26 @@ } if ( !reportConditions.isEmpty() ) { - while(iterator.hasNext()) + while ( iterator.hasNext() ) { ReportCondition reportCondition = (ReportCondition) iterator.next(); switch ( reportCondition.getResult() ) { case ReportCondition.SUCCESS: - { - reporter.addSuccess( reportCondition.getArtifact() ); - break; - } + { + reporter.addSuccess( reportCondition.getArtifact() ); + break; + } case ReportCondition.WARNING: - { - reporter.addWarning( reportCondition.getArtifact(), reportCondition.getReason() ); - break; - } + { + reporter.addWarning( reportCondition.getArtifact(), reportCondition.getReason() ); + break; + } case ReportCondition.FAILURE: - { - reporter.addFailure( reportCondition.getArtifact(), reportCondition.getReason() ); - break; - } + { + reporter.addFailure( reportCondition.getArtifact(), reportCondition.getReason() ); + break; + } } } } Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReporter.java URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReporter.java?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReporter.java (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReporter.java Thu Dec 29 20:37:28 2005 @@ -1,7 +1,7 @@ package org.apache.maven.repository.reporting; /* - * Copyright 2001-2005 The Apache Software Foundation. + * Copyright 2005-2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockRepositoryQueryLayer.java URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockRepositoryQueryLayer.java?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockRepositoryQueryLayer.java (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockRepositoryQueryLayer.java Thu Dec 29 20:37:28 2005 @@ -1,7 +1,7 @@ package org.apache.maven.repository.reporting; /* - * Copyright 2001-2005 The Apache Software Foundation. + * Copyright 2005-2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -71,11 +71,11 @@ return containsArtifact( artifact ); } - public boolean containsArtifactVersion(Artifact artifact, String version) + public boolean containsArtifactVersion( Artifact artifact, String version ) { return false; } - + public List getVersions( Artifact artifact ) { return null; Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/ReportCondition.java URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/ReportCondition.java?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/ReportCondition.java (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/ReportCondition.java Thu Dec 29 20:37:28 2005 @@ -1,7 +1,7 @@ package org.apache.maven.repository.reporting; /* - * Copyright 2001-2005 The Apache Software Foundation. + * Copyright 2005-2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,11 +24,15 @@ public class ReportCondition { public final static int SUCCESS = 0; + public final static int FAILURE = -1; + public final static int WARNING = 1; private int result; + private Artifact artifact; + private String reason; public ReportCondition( int result, Artifact artifact, String reason ) Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/artifactId/maven-metadata.xml URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/artifactId/maven-metadata.xml?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/artifactId/maven-metadata.xml (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/artifactId/maven-metadata.xml Thu Dec 29 20:37:28 2005 @@ -1,11 +1,27 @@ +<!-- + ~ Copyright 2005-2006 The Apache Software Foundation. + ~ + ~ Licensed 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. + --> + <metadata> - <groupId>groupId</groupId> - <artifactId>artifactId</artifactId> - <version>1.0-alpha-1</version> + <groupId>groupId</groupId> + <artifactId>artifactId</artifactId> + <version>1.0-alpha-1</version> <versioning> <versions> - <version>1.0-alpha-1</version> - <version>1.0-alpha-2</version> + <version>1.0-alpha-1</version> + <version>1.0-alpha-2</version> </versions> </versioning> </metadata> Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/unexpectedfile.xml URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/unexpectedfile.xml?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/unexpectedfile.xml (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/unexpectedfile.xml Thu Dec 29 20:37:28 2005 @@ -1 +1,17 @@ -This file is here to make sure that it will not be processed during unit test. \ No newline at end of file +This file is here to make sure that it will not be processed during unit <!-- + ~ Copyright 2005-2006 The Apache Software Foundation. + ~ + ~ Licensed 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. + --> + + test. \ No newline at end of file Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/maven-metadata-repository.xml URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/maven-metadata-repository.xml?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/maven-metadata-repository.xml (original) +++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/maven-metadata-repository.xml Thu Dec 29 20:37:28 2005 @@ -1,5 +1,21 @@ +<!-- + ~ Copyright 2005-2006 The Apache Software Foundation. + ~ + ~ Licensed 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. + --> + <metadata> -<groupId>checksumTest</groupId> -<artifactId>invalidArtifact</artifactId> -<version>1.0</version> + <groupId>checksumTest</groupId> + <artifactId>invalidArtifact</artifactId> + <version>1.0</version> </metadata> Modified: maven/repository-manager/trunk/pom.xml URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/pom.xml?rev=359986&r1=359985&r2=359986&view=diff ============================================================================== --- maven/repository-manager/trunk/pom.xml (original) +++ maven/repository-manager/trunk/pom.xml Thu Dec 29 20:37:28 2005 @@ -1,3 +1,19 @@ +<!-- + ~ Copyright 2005-2006 The Apache Software Foundation. + ~ + ~ Licensed 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. + --> + <project> <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.repository</groupId> @@ -6,7 +22,8 @@ <name>Maven Repository Manager</name> <version>1.0-SNAPSHOT</version> <description> - The Maven Repository Manager is an application for managing one or more remote repositories, including administration, artifact handling, + The Maven Repository Manager is an application for managing one or more remote repositories, including + administration, artifact handling, browsing and searching. </description> <url>http://maven.apache.org/repository-manager</url> @@ -105,11 +122,11 @@ </modules> <repositories> <repository> -<!-- - <releases> - <enabled>false</enabled> - </releases> ---> + <!-- + <releases> + <enabled>false</enabled> + </releases> + --> <id>apache.snapshots</id> <name>Apache Development Repository</name> <url>http://cvs.apache.org/maven-snapshot-repository</url> @@ -193,13 +210,13 @@ </dependencies> </dependencyManagement> <distributionManagement> -<!-- - <repository> - <id>repo1</id> - <name>Maven Central Repository</name> - <url>scp://repo1.maven.org/home/projects/maven/repository-staging/to-ibiblio/maven2</url> - </repository> ---> + <!-- + <repository> + <id>repo1</id> + <name>Maven Central Repository</name> + <url>scp://repo1.maven.org/home/projects/maven/repository-staging/to-ibiblio/maven2</url> + </repository> + --> <snapshotRepository> <id>apache.snapshots</id> <name>Apache Development Repository</name> @@ -217,11 +234,11 @@ <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> </plugin> -<!-- - <plugin> - <artifactId>maven-checkstyle-plugin</artifactId> - </plugin> ---> + <!-- + <plugin> + <artifactId>maven-checkstyle-plugin</artifactId> + </plugin> + --> <!-- TODO: should work, even if there are no sources --> <plugin> <groupId>org.codehaus.mojo</groupId>