Scalasytle Plugin not working with recent Eclipse

161 views
Skip to first unread message

Matthias Langer

unread,
Oct 22, 2014, 9:24:44 AM10/22/14
to scala-...@googlegroups.com
I'm wondering how you guys installed the Scalastyle Plugin into Eclipse Luna? When I try to do so via the official update site I get

Cannot complete the install because one or more required items could not be found.
  Software being installed: Scalastyle Plugin 0.6.0 (org.scalastyle.scalastyleplugin.feature.feature.group 0.6.0)
  Missing requirement: Scalastyle Plugin 0.6.0 (org.scalastyle.scalastyleplugin.core 0.6.0) requires 'bundle org.eclipse.core.runtime [3.7.0,3.10.0)' but it could not be found
  Cannot satisfy dependency:
    From: Scalastyle Plugin 0.6.0 (org.scalastyle.scalastyleplugin.feature.feature.group 0.6.0)
    To: org.scalastyle.scalastyleplugin.core [0.6.0]

Matthias Langer

unread,
Oct 26, 2014, 11:36:29 AM10/26/14
to scala-...@googlegroups.com
Hmm, is nobody of you using the Scalastyle Plugin?

Simon Schäfer

unread,
Oct 26, 2014, 6:20:14 PM10/26/14
to scala-...@googlegroups.com

On 10/26/2014 04:36 PM, Matthias Langer wrote:
Hmm, is nobody of you using the Scalastyle Plugin?
Not anymore, at least I don't. 'mvn scalastyle:check' works fine...
--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-ide-dev/f7d395ce-473d-458a-a4ea-149aa9800e03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matthew Farwell

unread,
Oct 27, 2014, 2:44:13 AM10/27/14
to scala-...@googlegroups.com
Luna isn't officially supported yet. I haven't installed it myself - I use kepler for the minute. When I get a few minutes I'll try with Luna and see. I suspect that it is just a matter of the version restriction, but I can't be sure.

If you want to try yourself, you can change the version restriction in META-INF/MANIFEST.MF - just remove it altogether and see if that works for you. I can't guarantee anything because some of the interfaces have changed.

Cordialement,

Matthew Farwell.

--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.

Matthias Langer

unread,
Oct 27, 2014, 4:40:54 AM10/27/14
to scala-...@googlegroups.com
Hmm, how am I supposed to build https://github.com/scalastyle/scalastyle-plugin? I've just cloned the repository, but running "mvn package -Pkepler" results in

$ mvn package -Pkepler
[INFO] Scanning for projects...
[ERROR] The build could not read 3 projects -> [Help 1]
[ERROR]
[ERROR]   The project org.scalastyle:org.scalastyle.scalastyleplugin.core:0.6.0 (C:\Users\mla\development\public-sources\scalastyle-plugin\org.scalastyle.scalastyleplugin.core\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Failure to find org.scalastyle:org.scalastyle.scalastyleplugin:pom:0.6.0 in http://repository.excilys.com/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of excilys has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 6, column 11 -> [Help 2]
[ERROR]
[ERROR]   The project org.scalastyle:org.scalastyle.scalastyleplugin.feature:0.6.0 (C:\Users\mla\development\public-sources\scalastyle-plugin\org.scalastyle.scalastyleplugin.feature\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Failure to find org.scalastyle:org.scalastyle.scalastyleplugin:pom:0.6.0 in http://repository.excilys.com/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of excilys has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 5, column 11 -> [Help 2]
[ERROR]
[ERROR]   The project org.scalastyle:org.scalastyle.scalastyleplugin.update-site:0.6.0 (C:\Users\mla\development\public-sources\scalastyle-plugin\org.scalastyle.scalastyleplugin.update-site\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Failure to find org.scalastyle:org.scalastyle.scalastyleplugin:pom:0.6.0 in http://repository.excilys.com/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of excilys has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 5, column 11 -> [Help 2]

francois...@typesafe.com

unread,
Oct 27, 2014, 5:29:18 AM10/27/14
to scala-...@googlegroups.com
Hi Matthias,

You seem to be using a maven proxy which is either not up to date or not configured as a passthrough for the archives it doesn’t have (or both). You need to either update that proxy or bypass it.


FG


--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.

francois...@typesafe.com

unread,
Oct 27, 2014, 5:33:56 AM10/27/14
to scala-...@googlegroups.com
Strike that, I can reproduce your trouble even bypassing all proxies. There seems to indeed be an incorrect POM link in the build.


FG

Matthew Farwell

unread,
Oct 27, 2014, 7:21:21 AM10/27/14
to scala-...@googlegroups.com
Hi,

yep - sorry. There is an error in the pom in the github repo- Change the version in your top level pom to be 0.6.0 (just for building purposes):

  <modelVersion>4.0.0</modelVersion>
   <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>
  <groupId>org.scalastyle</groupId>
  <artifactId>org.scalastyle.scalastyleplugin</artifactId>
  <version>0.6.0</version>
  <packaging>pom</packaging>
  <description>Scalastyle Eclipse plugin</description>


That should fix the problem.

Matthew Farwell.

--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.

Matthias Langer

unread,
Oct 27, 2014, 8:33:04 AM10/27/14
to scala-...@googlegroups.com
Thanks, that resolved the build errors for me. However, simply removing or changing the version restriction did not do the trick. For some reason, I still get


Cannot complete the install because one or more required items could not be found.
  Software being installed: Scalastyle Plugin 0.6.0 (org.scalastyle.scalastyleplugin.feature.feature.group 0.6.0)
  Missing requirement: Scalastyle Plugin 0.6.0 (org.scalastyle.scalastyleplugin.core 0.6.0) requires 'bundle org.eclipse.core.runtime [3.7.0,3.10.0)' but it could not be found

although my MANIFEST.MF (see attachment) contains no version restrictions altogether. I've run "mvn clean" and restarted eclipse several times, but the behaviour remains the same. Any ideas?

MANIFEST.MF

Simon Schäfer

unread,
Oct 27, 2014, 9:24:42 AM10/27/14
to scala-...@googlegroups.com
Do you have the correct update site configured in the plugin installer? Does the jar file in <update-site>/target/site/plugins contain the correct MANIFST.MF?

--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.

Matthias Langer

unread,
Oct 27, 2014, 4:03:13 PM10/27/14
to scala-...@googlegroups.com
Hmm, I don't know, yet what went wrong on my Windows laptop, but at my Linux box at home adapting the version restriction worked out of the box. Unfortunately it seems that more work is required to make this work with Luna, as this is what I got when attempting to open the preference page:

!ENTRY org.eclipse.equinox.registry 4 1 2014-10-27 20:54:26.455
!MESSAGE Unable to create the selected preference page.
!STACK 0
java.lang.ExceptionInInitializerError
    at com.typesafe.config.impl.ConfigImpl.systemPropertiesAsConfigObject(ConfigImpl.java:315)
    at com.typesafe.config.impl.ConfigImpl.systemPropertiesAsConfig(ConfigImpl.java:323)
    at com.typesafe.config.impl.ConfigImpl$LoaderCache.getOrElseUpdate(ConfigImpl.java:49)
    at com.typesafe.config.impl.ConfigImpl.computeCachedConfig(ConfigImpl.java:86)
    at com.typesafe.config.ConfigFactory.load(ConfigFactory.java:299)
    at com.typesafe.config.ConfigFactory.load(ConfigFactory.java:276)
    at org.scalastyle.scalastyleplugin.preferences.ScalastylePreferencePage.<init>(ScalastylePreferencePage.scala:73)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at java.lang.Class.newInstance(Class.java:374)
    at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184)
    at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
    at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
    at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
    at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:294)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:289)
    at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceNode.createPage(WorkbenchPreferenceNode.java:48)
    at org.eclipse.jface.preference.PreferenceDialog.createPage(PreferenceDialog.java:1372)
    at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.createPage(FilteredPreferenceDialog.java:385)
    at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1259)
    at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:699)
    at org.eclipse.jface.preference.PreferenceDialog$9$1.run(PreferenceDialog.java:730)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:725)
    at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:876)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:178)
    at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:873)
    at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1217)
    at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1243)
    at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:265)
    at org.eclipse.jface.util.OpenStrategy.access$5(OpenStrategy.java:259)
    at org.eclipse.jface.util.OpenStrategy$1$2.run(OpenStrategy.java:440)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3774)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3412)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
    at org.eclipse.jface.window.Window.open(Window.java:808)
    at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:221)
    at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:66)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:519)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Caused by: java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
    at com.typesafe.config.impl.PropertiesParser.fromPathMap(PropertiesParser.java:145)
    at com.typesafe.config.impl.PropertiesParser.fromProperties(PropertiesParser.java:67)
    at com.typesafe.config.impl.Parseable$ParseableProperties.rawParseValue(Parseable.java:717)
    at com.typesafe.config.impl.Parseable$ParseableProperties.rawParseValue(Parseable.java:699)
    at com.typesafe.config.impl.Parseable.parseValue(Parseable.java:176)
    at com.typesafe.config.impl.Parseable.parseValue(Parseable.java:170)
    at com.typesafe.config.impl.Parseable.parse(Parseable.java:227)
    at com.typesafe.config.impl.ConfigImpl.loadSystemProperties(ConfigImpl.java:304)
    at com.typesafe.config.impl.ConfigImpl.access$000(ConfigImpl.java:27)
    at com.typesafe.config.impl.ConfigImpl$SystemPropertiesHolder.<clinit>(ConfigImpl.java:310)
    ... 76 more

Matthew, I could look into this myself in the next few days if you are busy right now.

Jerzy Müller

unread,
Nov 29, 2014, 10:09:11 AM11/29/14
to scala-...@googlegroups.com
Hi Matthias,

do you have working version of ScalaStyle on Luna? We would like to switch to Luna in our company and it'll be great to have working version of it.

--
Jerzy

Matthew Farwell

unread,
Dec 4, 2014, 6:34:36 AM12/4/14
to scala-...@googlegroups.com
Hi,

I've just commited a change to the github repo which should add luna support. I'll continue to use it over the next couple of days to see if there are any problems with it. I'll then put it on the update site.


If anyone is willing, they can build it and see if it works for them.

For info, it seems the classpath handling has changed slightly between kepler and luna.

Have fun,

Matthew Farwell.


--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.

Jerzy Muller

unread,
Dec 4, 2014, 7:35:25 AM12/4/14
to scala-...@googlegroups.com
Thanks, I'll check this one out!

--
You received this message because you are subscribed to a topic in the Google Groups "Scala IDE Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-ide-dev/kURAmktPu5A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-ide-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-ide-dev/CAOBkoFUAc1%2BJhVtwumQQ-S67%3DWexkksetXGGe-o83Ps_m75W-w%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages