You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Henning P. Schmiedehausen" <hp...@intermeta.de> on 2002/12/27 19:54:46 UTC
[PATCH] Fix up maven.mode.online property
I need this patch to make the maven.mode.online property
in build.properties to actually work (without it, I got a ClassCast exception).
diff -urb test/jakarta-turbine-maven/src/java/org/apache/maven/jelly/MavenJellyContext.java jakarta-turbine-maven/src/java/org/apache/maven/jelly/MavenJellyContext.java
--- test/jakarta-turbine-maven/src/java/org/apache/maven/jelly/MavenJellyContext.java Fri Dec 27 18:42:13 2002
+++ jakarta-turbine-maven/src/java/org/apache/maven/jelly/MavenJellyContext.java Fri Dec 27 19:45:04 2002
@@ -457,7 +457,20 @@
*/
public Boolean getOnline()
{
- return (Boolean) getVariable( MavenConstants.ONLINE );
+ Object online = getVariable( MavenConstants.ONLINE );
+
+ if ( online == null )
+ {
+ return Boolean.FALSE;
+ }
+ else if (online instanceof Boolean)
+ {
+ return (Boolean) online;
+ }
+ else
+ {
+ return new Boolean ( online.toString() );
+ }
}
/**
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH hps@intermeta.de
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 info@intermeta.de
D-91054 Buckenhof Fax.: 09131 / 50654-20
Re: [PATCH] Fix up maven.mode.online property
Posted by Jason van Zyl <ja...@zenplex.com>.
On Fri, 2002-12-27 at 13:54, Henning P. Schmiedehausen wrote:
> I need this patch to make the maven.mode.online property
> in build.properties to actually work (without it, I got a ClassCast exception).
This is one is fixed already is what I will check in tomorrow.
--
jvz.
Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org
In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
-- Jacques Ellul, The Technological Society