You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2005/09/19 06:39:25 UTC
svn commit: r290064 - in /maven/components/trunk/sandbox/repoclean: ./
src/main/java/org/apache/maven/model/
src/main/java/org/apache/maven/tools/repoclean/
src/main/java/org/apache/maven/tools/repoclean/digest/
src/main/java/org/apache/maven/tools/rep...
Author: brett
Date: Sun Sep 18 21:39:00 2005
New Revision: 290064
URL: http://svn.apache.org/viewcvs?rev=290064&view=rev
Log:
update copyright, reformat and optimize imports.
Removed:
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/
Modified:
maven/components/trunk/sandbox/repoclean/pom.xml
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/Main.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleanerConfiguration.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestException.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestVerificationException.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestVerifier.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/Digestor.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/DefaultArtifactDiscoverer.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/index/ArtifactIndexer.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/phase/DiscoveryPhase.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/phase/RewritePhase.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/FileReporter.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/PathLister.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/ReportWriteException.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/Reporter.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/ArtifactPomRewriter.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/V4PomRewriter.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/transaction/RewriteTransaction.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/transaction/RollbackException.java
maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/translate/PomTranslationException.java
maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/TestSupport.java
maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/digest/ArtifactDigestorTest.java
maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/report/DummyReporter.java
maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/translate/PomV3ToV4TranslatorTest.java
Modified: maven/components/trunk/sandbox/repoclean/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/pom.xml?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/pom.xml (original)
+++ maven/components/trunk/sandbox/repoclean/pom.xml Sun Sep 18 21:39:00 2005
@@ -30,17 +30,17 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
- <version>2.0-beta-1-SNAPSHOT</version>
+ <version>2.0-beta-1</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
- <version>2.0-beta-1-SNAPSHOT</version>
+ <version>2.0-beta-1</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
- <version>2.0-beta-1-SNAPSHOT</version>
+ <version>2.0-beta-1</version>
<classifier>all</classifier>
</dependency>
<dependency>
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/Main.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/Main.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/Main.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/Main.java Sun Sep 18 21:39:00 2005
@@ -1,20 +1,19 @@
package org.apache.maven.tools.repoclean;
-/* ====================================================================
- * Copyright 2001-2004 The Apache Software Foundation.
+/*
+ * 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
+ * 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
+ * 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 org.codehaus.classworlds.ClassWorld;
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java Sun Sep 18 21:39:00 2005
@@ -1,18 +1,19 @@
package org.apache.maven.tools.repoclean;
/*
- * ====================================================================
- * Copyright 2001-2004 The Apache Software Foundation.
+ * 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
+ * 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
+ * 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 org.apache.maven.artifact.repository.ArtifactRepository;
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleanerConfiguration.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleanerConfiguration.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleanerConfiguration.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleanerConfiguration.java Sun Sep 18 21:39:00 2005
@@ -1,20 +1,17 @@
-package org.apache.maven.tools.repoclean;
-
-/* ====================================================================
- * Copyright 2001-2004 The Apache Software Foundation.
+package org.apache.maven.tools.repoclean;/*
+ * 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
+ * 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
+ * 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.
*/
/**
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestException.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestException.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestException.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestException.java Sun Sep 18 21:39:00 2005
@@ -1,20 +1,17 @@
-package org.apache.maven.tools.repoclean.digest;
-
-/* ====================================================================
- * Copyright 2001-2004 The Apache Software Foundation.
+package org.apache.maven.tools.repoclean.digest;/*
+ * 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
+ * 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
+ * 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.
*/
/**
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestVerificationException.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestVerificationException.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestVerificationException.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestVerificationException.java Sun Sep 18 21:39:00 2005
@@ -1,20 +1,17 @@
-package org.apache.maven.tools.repoclean.digest;
-
-/* ====================================================================
- * Copyright 2001-2004 The Apache Software Foundation.
+package org.apache.maven.tools.repoclean.digest;/*
+ * 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
+ * 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
+ * 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.
*/
/**
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestVerifier.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestVerifier.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestVerifier.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestVerifier.java Sun Sep 18 21:39:00 2005
@@ -1,20 +1,19 @@
package org.apache.maven.tools.repoclean.digest;
-/* ====================================================================
- * Copyright 2001-2004 The Apache Software Foundation.
+/*
+ * 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
+ * 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
+ * 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 org.apache.maven.tools.repoclean.report.ReportWriteException;
@@ -41,7 +40,7 @@
}
public void verifyDigest( File source, File target, RewriteTransaction transaction, Reporter reporter,
- boolean reportOnly )
+ boolean reportOnly )
throws DigestException, ReportWriteException, IOException
{
verifyDigestFile( source, target, transaction, reporter, reportOnly, ".md5", Digestor.MD5 );
@@ -50,7 +49,7 @@
}
private void verifyDigestFile( File artifactSource, File artifactTarget, RewriteTransaction transaction,
- Reporter reporter, boolean reportOnly, String digestExt, String digestAlgorithm )
+ Reporter reporter, boolean reportOnly, String digestExt, String digestAlgorithm )
throws DigestException, ReportWriteException, IOException
{
// create the digest source file from which to copy/verify.
@@ -67,7 +66,7 @@
if ( artifactTarget != null )
{
digestTargetFile = new File( artifactTarget + digestExt );
-
+
transaction.addFile( digestTargetFile );
}
@@ -88,8 +87,8 @@
}
catch ( IOException e )
{
- reporter.error( "Cannot copy digest file for path [" + artifactSource
- + "] from source to target for digest algorithm: \'" + digestAlgorithm + "\'.", e );
+ reporter.error( "Cannot copy digest file for path [" + artifactSource +
+ "] from source to target for digest algorithm: \'" + digestAlgorithm + "\'.", e );
throw e;
}
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/Digestor.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/Digestor.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/Digestor.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/Digestor.java Sun Sep 18 21:39:00 2005
@@ -1,6 +1,21 @@
-/* Created on Sep 20, 2004 */
package org.apache.maven.tools.repoclean.digest;
+/*
+ * 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.
+ */
+
import org.codehaus.plexus.util.IOUtil;
import java.io.BufferedInputStream;
@@ -76,8 +91,8 @@
}
catch ( IOException e )
{
- throw new DigestException( "Cannot verify digest for artifact file: \'" + artifactFile
- + "\' against digest file: \'" + digestFile + "\' using algorithm: \'" + algorithm + "\'", e );
+ throw new DigestException( "Cannot verify digest for artifact file: \'" + artifactFile +
+ "\' against digest file: \'" + digestFile + "\' using algorithm: \'" + algorithm + "\'", e );
}
finally
{
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/DefaultArtifactDiscoverer.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/DefaultArtifactDiscoverer.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/DefaultArtifactDiscoverer.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/DefaultArtifactDiscoverer.java Sun Sep 18 21:39:00 2005
@@ -1,5 +1,21 @@
package org.apache.maven.tools.repoclean.discover;
+/*
+ * 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.
+ */
+
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.factory.ArtifactFactory;
import org.apache.maven.tools.repoclean.report.PathLister;
@@ -11,20 +27,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;
-
-/*
- * 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.
- */
/**
* @author jdcasey
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java Sun Sep 18 21:39:00 2005
@@ -3,15 +3,17 @@
/*
* 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
+ * 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
+ * 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 org.apache.maven.artifact.Artifact;
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/index/ArtifactIndexer.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/index/ArtifactIndexer.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/index/ArtifactIndexer.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/index/ArtifactIndexer.java Sun Sep 18 21:39:00 2005
@@ -1,17 +1,5 @@
package org.apache.maven.tools.repoclean.index;
-import org.apache.maven.artifact.Artifact;
-import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.util.IOUtil;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
@@ -27,6 +15,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+import org.apache.maven.artifact.Artifact;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.util.IOUtil;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
/**
* @author jdcasey
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/phase/DiscoveryPhase.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/phase/DiscoveryPhase.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/phase/DiscoveryPhase.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/phase/DiscoveryPhase.java Sun Sep 18 21:39:00 2005
@@ -1,21 +1,5 @@
package org.apache.maven.tools.repoclean.phase;
-import org.apache.maven.tools.repoclean.RepositoryCleanerConfiguration;
-import org.apache.maven.tools.repoclean.discover.ArtifactDiscoverer;
-import org.apache.maven.tools.repoclean.report.PathLister;
-import org.apache.maven.tools.repoclean.report.Reporter;
-import org.codehaus.plexus.PlexusConstants;
-import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.context.Context;
-import org.codehaus.plexus.context.ContextException;
-import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
@@ -31,6 +15,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+import org.apache.maven.tools.repoclean.RepositoryCleanerConfiguration;
+import org.apache.maven.tools.repoclean.discover.ArtifactDiscoverer;
+import org.apache.maven.tools.repoclean.report.PathLister;
+import org.apache.maven.tools.repoclean.report.Reporter;
+import org.codehaus.plexus.PlexusConstants;
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.context.Context;
+import org.codehaus.plexus.context.ContextException;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
public class DiscoveryPhase
extends AbstractLogEnabled
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/phase/RewritePhase.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/phase/RewritePhase.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/phase/RewritePhase.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/phase/RewritePhase.java Sun Sep 18 21:39:00 2005
@@ -267,7 +267,8 @@
transaction.addFile( targetPom );
- bridgedTargetPom = new File( targetBase, bridgingLayout.pathOfArtifactMetadata( pom ).replace( '+', '-' ) );
+ bridgedTargetPom = new File( targetBase,
+ bridgingLayout.pathOfArtifactMetadata( pom ).replace( '+', '-' ) );
transaction.addFile( bridgedTargetPom );
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/FileReporter.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/FileReporter.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/FileReporter.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/FileReporter.java Sun Sep 18 21:39:00 2005
@@ -1,20 +1,19 @@
package org.apache.maven.tools.repoclean.report;
-/* ====================================================================
- * Copyright 2001-2004 The Apache Software Foundation.
+/*
+ * 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
+ * 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
+ * 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 org.codehaus.plexus.util.IOUtil;
@@ -55,7 +54,7 @@
public FileReporter( File reportsBase, String reportPath, boolean warningsEnabled )
{
this.warningsEnabled = warningsEnabled;
-
+
this.reportsFile = new File( reportsBase, reportPath );
File parentDir = reportsFile.getParentFile();
@@ -66,9 +65,9 @@
if ( !parentDir.isDirectory() )
{
- throw new IllegalArgumentException( "path: \'" + parentDir.getAbsolutePath()
- + "\' refers to a file, not a directory.\n" + "Cannot write report file: \'"
- + reportsFile.getAbsolutePath() + "\'." );
+ throw new IllegalArgumentException( "path: \'" + parentDir.getAbsolutePath() +
+ "\' refers to a file, not a directory.\n" + "Cannot write report file: \'" +
+ reportsFile.getAbsolutePath() + "\'." );
}
}
@@ -130,7 +129,7 @@
public void warn( String message )
throws ReportWriteException
{
- if( warningsEnabled )
+ if ( warningsEnabled )
{
hasWarning = true;
String source = getSourceLine();
@@ -157,10 +156,11 @@
private String getSourceLine()
{
NullPointerException npe = new NullPointerException();
-
+
StackTraceElement element = npe.getStackTrace()[2];
-
- return " Reported from: (" + element.getClassName() + "." + element.getMethodName() + "(..):" + element.getLineNumber() + ")\n";
+
+ return " Reported from: (" + element.getClassName() + "." + element.getMethodName() + "(..):" +
+ element.getLineNumber() + ")\n";
}
private CharSequence format( List messageParts )
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/PathLister.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/PathLister.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/PathLister.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/PathLister.java Sun Sep 18 21:39:00 2005
@@ -1,12 +1,5 @@
package org.apache.maven.tools.repoclean.report;
-import org.codehaus.plexus.util.IOUtil;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Writer;
-
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
@@ -22,6 +15,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+import org.codehaus.plexus.util.IOUtil;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
public class PathLister
{
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/ReportWriteException.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/ReportWriteException.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/ReportWriteException.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/ReportWriteException.java Sun Sep 18 21:39:00 2005
@@ -1,6 +1,4 @@
-package org.apache.maven.tools.repoclean.report;
-
-/*
+package org.apache.maven.tools.repoclean.report;/*
* Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/Reporter.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/Reporter.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/Reporter.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/Reporter.java Sun Sep 18 21:39:00 2005
@@ -1,6 +1,4 @@
-package org.apache.maven.tools.repoclean.report;
-
-/*
+package org.apache.maven.tools.repoclean.report;/*
* Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/ArtifactPomRewriter.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/ArtifactPomRewriter.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/ArtifactPomRewriter.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/ArtifactPomRewriter.java Sun Sep 18 21:39:00 2005
@@ -1,27 +1,26 @@
package org.apache.maven.tools.repoclean.rewrite;
+/*
+ * 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.
+ */
+
import org.apache.maven.artifact.Artifact;
import org.apache.maven.tools.repoclean.report.Reporter;
import java.io.Reader;
import java.io.Writer;
-
-/* ====================================================================
- * Copyright 2001-2004 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.
- * ====================================================================
- */
/**
* @author jdcasey
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/V4PomRewriter.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/V4PomRewriter.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/V4PomRewriter.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/V4PomRewriter.java Sun Sep 18 21:39:00 2005
@@ -1,20 +1,19 @@
package org.apache.maven.tools.repoclean.rewrite;
-/* ====================================================================
- * Copyright 2001-2004 The Apache Software Foundation.
+/*
+ * 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
+ * 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
+ * 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 org.apache.maven.artifact.Artifact;
@@ -38,7 +37,7 @@
{
Model model = null;
- if( from != null )
+ if ( from != null )
{
MavenXpp3Reader reader = new MavenXpp3Reader();
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/transaction/RewriteTransaction.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/transaction/RewriteTransaction.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/transaction/RewriteTransaction.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/transaction/RewriteTransaction.java Sun Sep 18 21:39:00 2005
@@ -1,12 +1,5 @@
package org.apache.maven.tools.repoclean.transaction;
-import org.apache.maven.artifact.Artifact;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
@@ -23,6 +16,13 @@
* limitations under the License.
*/
+import org.apache.maven.artifact.Artifact;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
public class RewriteTransaction
{
@@ -48,8 +48,8 @@
File file = (File) it.next();
if ( file.exists() && !file.delete() )
{
- throw new RollbackException( "[rollback] Cannot delete file: " + file
- + "\nPart of transaction for artifact: {" + artifact.getId() + "}." );
+ throw new RollbackException( "[rollback] Cannot delete file: " + file +
+ "\nPart of transaction for artifact: {" + artifact.getId() + "}." );
}
}
}
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/transaction/RollbackException.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/transaction/RollbackException.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/transaction/RollbackException.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/transaction/RollbackException.java Sun Sep 18 21:39:00 2005
@@ -1,6 +1,4 @@
-package org.apache.maven.tools.repoclean.transaction;
-
-/*
+package org.apache.maven.tools.repoclean.transaction;/*
* Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/translate/PomTranslationException.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/translate/PomTranslationException.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/translate/PomTranslationException.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/translate/PomTranslationException.java Sun Sep 18 21:39:00 2005
@@ -1,20 +1,17 @@
-package org.apache.maven.tools.repoclean.translate;
-
-/* ====================================================================
- * Copyright 2001-2004 The Apache Software Foundation.
+package org.apache.maven.tools.repoclean.translate;/*
+ * 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
+ * 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
+ * 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.
*/
/**
Modified: maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/TestSupport.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/TestSupport.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/TestSupport.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/TestSupport.java Sun Sep 18 21:39:00 2005
@@ -1,8 +1,5 @@
package org.apache.maven.tools.repoclean;
-import java.io.File;
-import java.net.URL;
-
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
@@ -19,6 +16,9 @@
* limitations under the License.
*/
+import java.io.File;
+import java.net.URL;
+
public final class TestSupport
{
@@ -74,9 +74,9 @@
public static File getResource( String relativePath )
{
ClassLoader cloader = TestSupport.class.getClassLoader();
-
+
URL resource = cloader.getResource( relativePath );
-
+
return new File( resource.getPath() ).getAbsoluteFile();
}
Modified: maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/digest/ArtifactDigestorTest.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/digest/ArtifactDigestorTest.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/digest/ArtifactDigestorTest.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/digest/ArtifactDigestorTest.java Sun Sep 18 21:39:00 2005
@@ -1,13 +1,5 @@
package org.apache.maven.tools.repoclean.digest;
-import org.apache.maven.tools.repoclean.TestSupport;
-
-import java.io.File;
-import java.io.FileReader;
-import java.util.Arrays;
-
-import junit.framework.TestCase;
-
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
@@ -24,58 +16,66 @@
* limitations under the License.
*/
+import junit.framework.TestCase;
+import org.apache.maven.tools.repoclean.TestSupport;
+
+import java.io.File;
+import java.io.FileReader;
+import java.util.Arrays;
+
public class ArtifactDigestorTest
extends TestCase
{
-
+
private static final String DIGEST_FORMAT_VERIFY_ARTIFACT = "digestFormatVerifyArtifact.jar";
-
- public void testShouldWriteDigestFileInHexNotBinary() throws Exception
+
+ public void testShouldWriteDigestFileInHexNotBinary()
+ throws Exception
{
Digestor digestor = new Digestor();
-
- File artifact = TestSupport.getMyResource(this, DIGEST_FORMAT_VERIFY_ARTIFACT);
-
+
+ File artifact = TestSupport.getMyResource( this, DIGEST_FORMAT_VERIFY_ARTIFACT );
+
byte[] rawDigest = digestor.generateArtifactDigest( artifact, Digestor.MD5 );
-
- StringBuffer rawConverted = new StringBuffer(rawDigest.length * 2);
+
+ StringBuffer rawConverted = new StringBuffer( rawDigest.length * 2 );
for ( int i = 0; i < rawDigest.length; i++ )
{
- String encoded = Integer.toHexString(rawDigest[i] & 0xff);
- if(encoded.length() < 2)
+ String encoded = Integer.toHexString( rawDigest[i] & 0xff );
+ if ( encoded.length() < 2 )
{
encoded = "0" + encoded;
}
-
- rawConverted.append(encoded);
+
+ rawConverted.append( encoded );
}
-
- File digestFile = File.createTempFile("repoclean-artifactDigest-formatTest", ".md5");
-
+
+ File digestFile = File.createTempFile( "repoclean-artifactDigest-formatTest", ".md5" );
+
digestor.createArtifactDigest( artifact, digestFile, Digestor.MD5 );
-
- FileReader reader = new FileReader(digestFile);
- StringBuffer written = new StringBuffer(rawDigest.length * 2);
-
+
+ FileReader reader = new FileReader( digestFile );
+ StringBuffer written = new StringBuffer( rawDigest.length * 2 );
+
char[] cbuf = new char[rawDigest.length * 2];
int read = -1;
-
- while((read = reader.read(cbuf)) > -1)
+
+ while ( ( read = reader.read( cbuf ) ) > -1 )
{
- written.append(cbuf, 0, read);
+ written.append( cbuf, 0, read );
}
-
+
reader.close();
-
- assertEquals(rawConverted.length(), written.length());
-
+
+ assertEquals( rawConverted.length(), written.length() );
+
cbuf = new char[written.length()];
char[] cbuf2 = new char[cbuf.length];
-
- written.getChars(0, cbuf.length, cbuf, 0);
- rawConverted.getChars(0, cbuf2.length, cbuf2, 0);
-
- assertTrue(Arrays.equals(cbuf, cbuf2));
+
+ written.getChars( 0, cbuf.length, cbuf, 0 );
+ rawConverted.getChars( 0, cbuf2.length, cbuf2, 0 );
+
+ assertTrue( Arrays.equals( cbuf, cbuf2 ) );
}
}
Modified: maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/report/DummyReporter.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/report/DummyReporter.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/report/DummyReporter.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/report/DummyReporter.java Sun Sep 18 21:39:00 2005
@@ -1,6 +1,4 @@
-package org.apache.maven.tools.repoclean.report;
-
-/*
+package org.apache.maven.tools.repoclean.report;/*
* Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Modified: maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/translate/PomV3ToV4TranslatorTest.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/translate/PomV3ToV4TranslatorTest.java?rev=290064&r1=290063&r2=290064&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/translate/PomV3ToV4TranslatorTest.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/test/java/org/apache/maven/tools/repoclean/translate/PomV3ToV4TranslatorTest.java Sun Sep 18 21:39:00 2005
@@ -1,13 +1,5 @@
package org.apache.maven.tools.repoclean.translate;
-import org.apache.maven.model.Build;
-import org.apache.maven.model.Dependency;
-import org.apache.maven.model.Model;
-import org.apache.maven.model.Plugin;
-import org.apache.maven.tools.repoclean.report.DummyReporter;
-import org.apache.maven.tools.repoclean.report.Reporter;
-import org.codehaus.plexus.PlexusTestCase;
-
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
@@ -23,6 +15,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Plugin;
+import org.apache.maven.tools.repoclean.report.DummyReporter;
+import org.apache.maven.tools.repoclean.report.Reporter;
+import org.codehaus.plexus.PlexusTestCase;
public class PomV3ToV4TranslatorTest
extends PlexusTestCase
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org