This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Building a MEEP project fails with the following error Platform UEI-1.0.1 does not support "CLDC-8.0" configuration, setting back to CLDC-1.1. C:\Users\shgovin.ORADEV\Documents\NetBeansProjects\MEEmbeddedProfileApplication2\nbproject\build-impl.xml:431: java.io.IOException: Cannot run program "D:\ws\me8\trunk\sdk\release\JavaME8_SDK\bin\preverify" Starting from ME8, there will not be a need for preverification and hence the preverification tool (preverify) will not be part of the SDK. The ideal solution would be to skip the nb-preverify task from the build-impl.xml if the project uses CLDC 8.0 configuration. The temporary workaround is to simply copy the sources classes to the preverified output folder, so that the rest of the tool chain will function correctly. mobility.antext/src/org/netbeans/mobility/antext/PreverifyTask.java @@ -57,6 +57,7 @@ import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; +import org.apache.tools.ant.taskdefs.Copy; import org.apache.tools.ant.taskdefs.Execute; import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.types.FileSet; @@ -136,6 +137,7 @@ String[] files; long srcLastModified = Long.MIN_VALUE; long destLastModified = Long.MAX_VALUE; + Task preverifyTask = null; fileset = new FileSet(); fileset.setDir(srcDir); @@ -198,8 +200,15 @@ } catch (MissingResourceException mre) { + if ( "CLDC-8.0".equals(configuration)) { + System.out.println("Configuration "+configuration+" does not support preverify. Copying source classes to preverified output dir"); + // For 8.0, create a copy task that serves as a substitute for preverification. + preverifyTask = createCopyTask(true); + } + else { log(Bundle.getMessage("WARN_UnsupportedConfig", platformType, configuration, defCfg), Project.MSG_WARN); // No I18N commandLine = Bundle.getMessage("CMD_Preverify_" + platformType + "_" + defCfg); //NOI18N + } } else { @@ -207,6 +216,10 @@ commandLine = Bundle.getMessage("CMD_Preverify_" + platformType + "_" + defCfg); // No I18N } } + if (this.commandLine == null && preverifyTask != null ) { + preverifyTask.execute(); + return; + } final HashMap<String,Object> args = new HashMap<String,Object>(); args.put("platformhome", platformHome.getAbsolutePath()); // No I18N if (classPath != null) @@ -319,4 +332,14 @@ this.commandLine = commandLine; } + private Task createCopyTask(boolean overwrite) { + FileSet fileSetToCopy = new FileSet(); + fileSetToCopy.setDir(this.srcDir); + Copy copyTask = new Copy(); + copyTask.setProject(getProject()); + copyTask.setTodir(this.destDir); + copyTask.setOverwrite(overwrite); + copyTask.addFileset(fileSetToCopy); + return copyTask; + } }
Preverification step is skipped in case of ME8. Implemented in build script template for "preverify" step in javame8_232770 branch.