i'm building netbeans plugin new language, using the maven plugin. i've followed (roughly) this tutorial, end not being able compile (stack trace below).
using same code , module dependencies standard (ant-based) netbeans module project, compiles properly. class can't find seems available in module (org-netbeans-modules-editor-codetemplates), don't need module when use ant-based project. also, if add module, similar error different class can't find in module, makes me thing i'm doing wrong. missing something?
the stack trace:
[info] ------------------------------------------------------------- [error] compilation error : [info] ------------------------------------------------------------- [error] failure executing javac, not parse error: annotation processor threw uncaught exception. consult following stack trace details. java.lang.noclassdeffounderror: org/netbeans/lib/editor/codetemplates/codetemplatecompletionprovider @ org.netbeans.modules.csl.core.languageregistrationprocessor.registercodecompletion(languageregistrationprocessor.java:270) @ org.netbeans.modules.csl.core.languageregistrationprocessor.handleprocess(languageregistrationprocessor.java:160) @ org.openide.filesystems.annotations.layergeneratingprocessor.process(layergeneratingprocessor.java:121) @ com.sun.tools.javac.processing.javacprocessingenvironment.callprocessor(javacprocessingenvironment.java:793) @ com.sun.tools.javac.processing.javacprocessingenvironment.discoverandrunprocs(javacprocessingenvironment.java:722) @ com.sun.tools.javac.processing.javacprocessingenvironment.access$1700(javacprocessingenvironment.java:97) @ com.sun.tools.javac.processing.javacprocessingenvironment$round.run(javacprocessingenvironment.java:1029) @ com.sun.tools.javac.processing.javacprocessingenvironment.doprocessing(javacprocessingenvironment.java:1163) @ com.sun.tools.javac.main.javacompiler.processannotations(javacompiler.java:1108) @ com.sun.tools.javac.main.javacompiler.compile(javacompiler.java:824) @ com.sun.tools.javac.main.main.compile(main.java:439) @ com.sun.tools.javac.main.main.compile(main.java:353) @ com.sun.tools.javac.main.main.compile(main.java:342) @ com.sun.tools.javac.main.main.compile(main.java:333) @ com.sun.tools.javac.main.compile(main.java:94) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.codehaus.plexus.compiler.javac.javaccompiler.compileinprocess0(javaccompiler.java:551) @ org.codehaus.plexus.compiler.javac.javaccompiler.compileinprocess(javaccompiler.java:526) @ org.codehaus.plexus.compiler.javac.javaccompiler.compile(javaccompiler.java:167) @ org.apache.maven.plugin.abstractcompilermojo.execute(abstractcompilermojo.java:678) @ org.apache.maven.plugin.compilermojo.execute(compilermojo.java:128) @ org.apache.maven.plugin.defaultbuildpluginmanager.executemojo(defaultbuildpluginmanager.java:101) @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:209) @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:153) @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:145) @ org.apache.maven.lifecycle.internal.lifecyclemodulebuilder.buildproject(lifecyclemodulebuilder.java:84) @ org.apache.maven.lifecycle.internal.lifecyclemodulebuilder.buildproject(lifecyclemodulebuilder.java:59) @ org.apache.maven.lifecycle.internal.lifecyclestarter.singlethreadedbuild(lifecyclestarter.java:183) @ org.apache.maven.lifecycle.internal.lifecyclestarter.execute(lifecyclestarter.java:161) @ org.apache.maven.defaultmaven.doexecute(defaultmaven.java:320) @ org.apache.maven.defaultmaven.execute(defaultmaven.java:156) @ org.apache.maven.cli.mavencli.execute(mavencli.java:537) @ org.apache.maven.cli.mavencli.domain(mavencli.java:196) @ org.apache.maven.cli.mavencli.main(mavencli.java:141) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.codehaus.plexus.classworlds.launcher.launcher.launchenhanced(launcher.java:290) @ org.codehaus.plexus.classworlds.launcher.launcher.launch(launcher.java:230) @ org.codehaus.plexus.classworlds.launcher.launcher.mainwithexitcode(launcher.java:409) @ org.codehaus.plexus.classworlds.launcher.launcher.main(launcher.java:352) caused by: java.lang.classnotfoundexception: org.netbeans.lib.editor.codetemplates.codetemplatecompletionprovider @ java.net.urlclassloader$1.run(urlclassloader.java:366) @ java.net.urlclassloader$1.run(urlclassloader.java:355) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:354) @ java.lang.classloader.loadclass(classloader.java:424) @ java.lang.classloader.loadclass(classloader.java:357) ... 45 more
my dependencies
<!-- common scripting language api (new) --> <dependency> <groupid>org.netbeans.api</groupid> <artifactid>org-netbeans-modules-csl-api</artifactid> <version>${netbeans.version}</version> </dependency> <!-- datasystems api --> <dependency> <groupid>org.netbeans.api</groupid> <artifactid>org-openide-loaders</artifactid> <version>${netbeans.version}</version> </dependency> <!-- dialogs api --> <dependency> <groupid>org.netbeans.api</groupid> <artifactid>org-openide-dialogs</artifactid> <version>${netbeans.version}</version> </dependency> <!-- file system api --> <dependency> <groupid>org.netbeans.api</groupid> <artifactid>org-openide-filesystems</artifactid> <version>${netbeans.version}</version> </dependency> <!-- lexer api --> <dependency> <groupid>org.netbeans.api</groupid> <artifactid>org-netbeans-modules-lexer</artifactid> <version>${netbeans.version}</version> </dependency> <!-- lookup api --> <dependency> <groupid>org.netbeans.api</groupid> <artifactid>org-openide-util-lookup</artifactid> <version>${netbeans.version}</version> </dependency> <!-- nodes api --> <dependency> <groupid>org.netbeans.api</groupid> <artifactid>org-openide-nodes</artifactid> <version>${netbeans.version}</version> </dependency> <!-- text api --> <dependency> <groupid>org.netbeans.api</groupid> <artifactid>org-openide-text</artifactid> <version>${netbeans.version}</version> </dependency> <!-- ui utilities api --> <dependency> <groupid>org.netbeans.api</groupid> <artifactid>org-openide-awt</artifactid> <version>${netbeans.version}</version> </dependency> <!-- utilities api --> <dependency> <groupid>org.netbeans.api</groupid> <artifactid>org-openide-util</artifactid> <version>${netbeans.version}</version> </dependency> <!-- window system api --> <dependency> <groupid>org.netbeans.api</groupid> <artifactid>org-openide-windows</artifactid> <version>${netbeans.version}</version> </dependency>
you have found , error in generation of maven's pom.xml file platform's artifacts. while org-netbeans-modules-csl-api jar contains module dependency on codetemplates module (org.netbeans.modules.editor.codetemplates/1 = 1), it's not present in list of resolved dependencies. please file issue against https://netbeans.org/bugzilla component:apisupport subcomponent: maven.
thanks.
ps: workaround indeed path have tried didn't finish. keep on adding missing dependencies until annotation processor's runtime dependencies satisfied.
the dependencies required (for netbeans 7.3.1) are:
<dependency> <groupid>org.netbeans.api</groupid> <artifactid>org-netbeans-modules-editor-codetemplates</artifactid> <version>${netbeans.version}</version> </dependency> <dependency> <groupid>org.netbeans.modules</groupid> <artifactid>org-netbeans-modules-editor-errorstripe</artifactid> <version>${netbeans.version}</version> </dependency>
Comments
Post a Comment