Ryan Hoegg wrote:
http://jakarta.apache.org/commons/codec
The Jakarta Commons Codec project has a Base64 implementation that is being used in Apache XML-RPC and the Jakarta Commons HttpClient.
Please try (and apply ;) the attached patch for making Maven's CVS head build on a free runtime (i.e Kaffe[1]) with Maven 1.0-rc1.
2004-01-22 Dalibor Topic <[EMAIL PROTECTED]>
* project.xml:
Added dependency on commons-codec * src/java/org/apache/maven/util/HttpUtils.java:
Use Base64 encoder from Jakarta Commons-Codec.with the attached patch, maven's CVS builds fine with kaffe. You need to set the build compiler to kaffe's kjc compiler, though.
MAVEN_OPTS=-Dbuild.compiler=kjc maven jar
I eventually end up having other problems, the regression tests for touchstone fail with:
BUILD FAILED
File...... file:/tmp/topic/maven/
Element... maven:maven
Line...... 41
Column.... 9
Unable to obtain goal [touchstone-tests] -- file:/tmp/topic/maven/src/test/touchstone-build/:72:24: <fail> Goal should be used from the touchstone plugin. We have an internal
error processing goals.
Total time: 12 minutes 31 seconds
Finished at: Thu Jan 22 18:37:09 GMT+01:00 2004
which may or not may be a maven/kaffe problem.
cheers, dalibor topic
[1] http://www.kaffe.org , current CVS head ;)
Index: project.xml
===================================================================
RCS file: /home/cvspublic/maven/project.xml,v
retrieving revision 1.327
diff -u -r1.327 project.xml
--- project.xml 28 Dec 2003 23:04:13 -0000 1.327
+++ project.xml 22 Jan 2004 17:48:12 -0000
@@ -431,6 +431,11 @@
<version>1.4.1</version>
<url>http://jakarta.apache.org/commons/digester.html</url>
</dependency>
+ <dependency>
+ <id>commons-codec</id>
+ <version>1.1</version>
+ <url>http://jakarta.apache.org/commons/codec/</url>
+ </dependency>
<dependency>
<id>commons-jelly</id>
Index: src/java/org/apache/maven/util/HttpUtils.java
===================================================================
RCS file: /home/cvspublic/maven/src/java/org/apache/maven/util/HttpUtils.java,v
retrieving revision 1.28
diff -u -r1.28 HttpUtils.java
--- src/java/org/apache/maven/util/HttpUtils.java 27 Oct 2003 16:33:11 -0000
1.28
+++ src/java/org/apache/maven/util/HttpUtils.java 22 Jan 2004 17:48:12 -0000
@@ -67,6 +67,9 @@
import java.net.URL;
import java.net.URLConnection;
+import org.apache.commons.codec.BinaryEncoder;
+import org.apache.commons.codec.binary.Base64;
+
/**
* Http utils for retrieving files.
*
@@ -238,14 +241,9 @@
{
String up = username + ":" + password;
String encoding = null;
- // check to see if sun's Base64 encoder is available.
- try
- {
- sun.misc.BASE64Encoder encoder =
- (sun.misc.BASE64Encoder) Class.forName(
- "sun.misc.BASE64Encoder" ).newInstance();
-
- encoding = encoder.encode( up.getBytes() );
+ try {
+ BinaryEncoder encoder = new Base64();
+ encoding = new String( encoder.encode( up.getBytes() ) );
}
catch ( Exception ex )
{
@@ -405,4 +403,4 @@
file.setLastModified( modifiedTime );
return true;
}
-}
\ No newline at end of file
+}--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
