My goal is to create a command line code formatter. On the basis that i should get the latest version to format recent code i've upped the version in my POM:
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.13.0.v20170516-1929</version>
<!--<version>3.8.2.v20120814-155456</version>-->
</dependency>
It's probably more of an issue that i don't really understand how Maven works (always seemed a bit of a 'black box' to me) but i'm now getting unmet runtime dependencies:
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/core/runtime/jobs/ISchedulingRule
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.jdt.core.dom.ASTParser.<init>(ASTParser.java:181)
at org.eclipse.jdt.core.dom.ASTParser.newParser(ASTParser.java:130)
at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.parseSourceCode(DefaultCodeFormatter.java:293)
at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.prepareFormattedCode(DefaultCodeFormatter.java:196)
at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.format(DefaultCodeFormatter.java:160)
at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.format(DefaultCodeFormatter.java:143)
at com.github.jrialland.javaformatter.java.JavaFormatter.format(JavaFormatter.java:163)
at com.github.jrialland.javaformatter.java.JavaFormatter.apply(JavaFormatter.java:205)
at com.github.jrialland.javaformatter.FormatterVisitor.applyAllFormattersOnFile(FormatterVisitor.java:106)
at com.github.jrialland.javaformatter.FormatterCli.main(FormatterCli.java:215)
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.jobs.ISchedulingRule
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 22 more
Any ideas? I suppose it amounts to discovering the new dependencies of the new version, but i don't know how to. I've attached the whole pom fyi
EDIT: I'VE MOVED ON - don't know how to delete a posting
[Updated on: Wed, 27 September 2017 11:28]
Report message to a moderator