I think that is ideal, yes. Make a note against this defect and I'll leave it open until I make that change as well.
Kris Bravo Corridor Software, Inc. http://www.corridor-software.us > While class loading magic is user friendly I think it would be nice to > be able to set a field naming the class that you want to load and use as > the compiler. Having a default value of "auto" could activate todays > method. > > WDYT? > > -- > Trygve > > [EMAIL PROTECTED] wrote: >> Revision >> 2641 <http://fisheye.codehaus.org/changelog/mojo/?cs=2641> >> Author >> kbravo >> Date >> 2006-11-13 12:21:07 -0600 (Mon, 13 Nov 2006) >> >> >> Log Message >> >> MOJO-554 <http://jira.codehaus.org/secure/ViewIssue.jspa?key=MOJO-554> - >> support for ibm sdk. Patch provided by Jens Anderson. >> >> >> Modified Paths >> >> * >> trunk/mojo/idlj-maven-plugin/src/main/java/org/codehaus/mojo/idlj/IdljTranslator.java >> >> <#trunkmojoidljmavenpluginsrcmainjavaorgcodehausmojoidljIdljTranslatorjava> >> >> >> Diff >> >> >> Modified: >> >> trunk/mojo/idlj-maven-plugin/src/main/java/org/codehaus/mojo/idlj/IdljTranslator.java >> (2640 => 2641) >> >> --- >> trunk/mojo/idlj-maven-plugin/src/main/java/org/codehaus/mojo/idlj/IdljTranslator.java >> 2006-11-12 >> 23:20:04 UTC (rev 2640) >> +++ >> trunk/mojo/idlj-maven-plugin/src/main/java/org/codehaus/mojo/idlj/IdljTranslator.java >> 2006-11-13 >> 18:21:07 UTC (rev 2641) >> @@ -84,7 +84,7 @@ >> ClassLoader cl = this.getClass().getClassLoader(); >> Class idljCompiler; >> try { >> - idljCompiler = >> Class.forName("com.sun.tools.corba.se.idl.toJavaPortable.Compile"); >> + idljCompiler = Class.forName(getIDLCompilerClass()); >> } >> catch (ClassNotFoundException e) { >> try { >> @@ -98,16 +98,25 @@ >> System.setProperty("java.class.path", >> System.getProperty("java.class.path") >> + >> System.getProperty("path.separator") >> + >> toolsJar.getAbsolutePath()); >> - >> urlLoader.loadClass("com.sun.tools.corba.se.idl.som.cff.FileLocator"); >> - idljCompiler = >> urlLoader.loadClass("com.sun.tools.corba.se.idl.toJavaPortable.Compile"); >> + >> if(System.getProperty("java.vm.name").indexOf("HotSpot") != -1) >> + >> urlLoader.loadClass("com.sun.tools.corba.se.idl.som.cff.FileLocator"); >> + idljCompiler = >> urlLoader.loadClass(getIDLCompilerClass()); >> } >> catch (Exception notUsed) { >> - throw new MojoExecutionException(" Sun IDL compiler not >> available", e); >> + throw new MojoExecutionException(" IDL compiler not >> available", e); >> } >> } >> return idljCompiler; >> } >> - >> + >> + private String getIDLCompilerClass(){ >> + String vendor = System.getProperty("java.vm.name"); >> + >> + if(vendor.indexOf("IBM") != -1) >> + return "com.ibm.idl.toJavaPortable.Compile"; >> + return "com.sun.tools.corba.se.idl.toJavaPortable.Compile"; >> + } >> + >> private void invokeCompiler(Class compilerClass, List args) throws >> MojoExecutionException { >> Method compilerMainMethod; >> String arguments[] = (String[]) args.toArray(new >> String[args.size()]); >> >> ------------------------------------------------------------------------ >> >> To unsubscribe from this list please visit: >> >> http://xircles.codehaus.org/manage_email >> > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email