Eclipse: Virgo tooling plugin installation using P2 directory - eclipse-plugin

I am trying to install Virgo tooling Eclipse plugin using the P2 installation directory, since I want to install directly from command line and not from GUI. I am getting the below error and seems like some dependencies issues are there. I tried resolving the dependencies but I am still facing the same issue. I also searched on the web and was not able to find a good solution for the issue.
Cannot complete the install because one or more required items could not be found.
Software being installed: Eclipse Virgo Tools 1.5.0.R01-RELEASE (org.eclipse.virgo.ide.feature.feature.group 1.5.0.R01-RELEASE)
Missing requirement: Eclipse Virgo IDE (Server Core) 1.5.0.R01-RELEASE (org.eclipse.virgo.ide.runtime.core 1.5.0.R01-RELEASE) requires 'bundle org.json 0.0.0' but it could not be found
Cannot satisfy dependency:
From: Eclipse Virgo Tools 1.5.0.R01-RELEASE (org.eclipse.virgo.ide.feature.feature.group 1.5.0.R01-RELEASE)
To: org.eclipse.virgo.ide.runtime.core [1.5.0.R01-RELEASE]
Please note that the plugin installation works from the Eclipse GUI. I also installed other plugins from command line and that worked, only facing issue with Virgo tooling plugin.

The Virgo Tools depend on the Virgo server and several other Eclipse projects. When installing from the command line using p2 director you have to specify the comma separated list of features to install and the list of p2 repositories containing such features (and dependencies).
The following is an example for creating an Eclipse + Virgo Tools starting from the Neon RCP runtime distribution and adding JDT, egit, Web Tools etc. etc.
I created it from a working script I have, removing some very specific plug-ins I use. You may want to have a look at it as an example, I do not guarantee it works after the modification.
If instead of starting from Neon RCP you start from Neon for JavaEE developers you can remove most of the features and repositories.
#!/bin/sh
./eclipse -nosplash -debug -consolelog -application org.eclipse.equinox.p2.director\
-i \
org.eclipse.recommenders.rcp.feature.feature.group,\
org.eclipse.recommenders.mylyn.rcp.feature.feature.group,\
org.eclipse.egit.feature.group,\
org.eclipse.egit.gitflow.feature.feature.group,\
org.eclipse.egit.mylyn.feature.group,\
org.eclipse.mylyn.github.feature.feature.group,\
org.eclipse.jdt.feature.group,\
org.eclipse.jst.enterprise_ui.feature.feature.group,\
org.eclipse.jst.web_ui.feature.feature.group,\
org.eclipse.virgo.ide.feature.feature.group,\
org.eclipse.wst.web_ui.feature.feature.group,\
org.eclipse.wst.xml_ui.feature.feature.group,\
org.eclipse.wst.xsl.feature.feature.group,\
org.eclipse.emf.sdk.feature.group,\
org.eclipse.wst.jsdt.feature.feature.group,\
org.eclipse.m2e.feature.feature.group,\
org.eclipse.epp.mpc.feature.group,\
org.eclipse.mylyn.hudson.feature.group,\
org.eclipse.mylyn.ide_feature.feature.group,\
org.eclipse.mylyn.java_feature.feature.group,\
org.eclipse.mylyn.pde_feature.feature.group,\
org.eclipse.mylyn.team_feature.feature.group,\
org.eclipse.mylyn.gerrit.feature.feature.group,\
org.eclipse.mylyn.gerrit.dashboard.feature.feature.group,\
org.eclipse.mylyn_feature.feature.group,\
org.eclipse.mylyn.context_feature.feature.group,\
org.eclipse.mylyn.bugzilla_feature.feature.group,\
org.eclipse.mylyn.git.feature.group,\
org.eclipse.mylyn.wikitext_feature.feature.group,\
org.eclipse.tm.terminal.feature.feature.group,\
org.sonatype.tycho.m2e.feature.feature.group,\
org.sonatype.m2e.egit.feature.feature.group,\
org.jboss.tools.m2e.jdt.feature.feature.group,\
org.sonatype.m2e.sisu.feature.feature.group,\
-r \
http://download.eclipse.org/releases/neon,\
http://download.eclipse.org/virgo/release/tooling,\
http://download.eclipse.org/recommenders/updates/stable/,\
http://download.eclipse.org/technology/m2e/releases/,\
http://download.eclipse.org/tools/orbit/downloads/drops/R20160520211859/repository/,\
http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-egit/0.14.0/N/LATEST/,\
http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-tycho/0.8.0/N/LATEST/,\
http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-sisu/0.15.0/N/LATEST/,\
http://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-jdt-compiler/1.0.1-2012-09-20_05-03-18-H2/,\
http://download.eclipse.org/eclipse/updates/4.2/
Comments:
the above is a *unix shell script (runs fine on MacOs).
the \ character at the end of each line is required because this is a shell command that continues for multiple lines
-i is the p2 parameter for specifying a comma separated list of features to be installed
-r is the p2 parameter for specifying a comma separated list of repositories to be used for locating features and dependencies
Disclaimer: I am an Eclipse Virgo committer.

Related

Sigasi in Eclipse

I have just installed the Sigasi Studio pluginin Eclipse (version: Eclipse IDE 2018-12). When I try to launch it,to make a new VHDL file, I get the following:
The selected wizard could not be started. org/eclipse/lsp4j/Range
(occurred in com.sigasi.hdt.vhdl.ui.VhdlExecutableExtensionFactory)
org/eclipse/lsp4j/Range
How I could solve it, please?
Thank you in advance.
Thanks to the Sigasi support, I was able to solve the problem. They wrote me:
The lsp4j plugin version is to recent for the xtext version that ships
with Sigasi Studio 4.2. This issue has been resolved in the preview
channel of release 4.3. Therefore - if you wish to use the plugin
version of Sigasi Studio - I recommend to install the 4.3 preview
following the steps explained on
http://insights.sigasi.com/tech/preview.html.
That's all. Now, I would like to configure Sigasi with GHDL (as a compiler, when I run the project) and GTKWAVE (ad a waves viewer). How can I do that?
Thanks in advance.
SIGASI + GHDL + GTKWAVE (all in one)
It is very powerful combo that you can set up. ATTENTION i use macOS 10.13.6:
Step 1
Make sure you have both installed GHDL and GTKWAVE typing
$ which gtkwave
/usr/local/bin/gtkwave
$ which ghdl
/usr/local/bin/ghdl
Step 2
Open Sigasi an make new Project and create an additional compile.sh file with:
#!/bin/sh
PROJECT_NAME="PWM_Generator"
PROJECT_NAME_TB="PWM_Generator_tb"
WORKING_DIR="/Users/imeksbank/Dropbox/UMHDL"
/usr/local/bin/ghdl -a --workdir=$WORKING_DIR/work.ghdl $WORKING_DIR/$PROJECT_NAME/$PROJECT_NAME.vhd;
/usr/local/bin/ghdl -a --workdir=$WORKING_DIR/work.ghdl $WORKING_DIR/$PROJECT_NAME/$PROJECT_NAME_TB.vhd;
/usr/local/bin/ghdl -e --workdir=$WORKING_DIR/work.ghdl $PROJECT_NAME_TB;
/usr/local/bin/ghdl -r --workdir=$WORKING_DIR/work.ghdl $PROJECT_NAME_TB --vcd=$WORKING_DIR/$PROJECT_NAME/simulation.vcd;
now, be aware, for each project you create your own variables like
PROJECT_NAME
PROJECT_NAME_TB
WORKING_DIR
I use always Dropbox for such approach because then i can access via Windows as well.
And of course, there is a possibility to create custom variables in Sigasi -> External Tool Configurator -> Program -> compile_sh -> environment to pass them to make compile.sh independent. Here you have to deal with it by yourself =)
Step 3 .
Set up you External Tools Configurations to let shell script be executed by Sigasi Studio and create the .vcd file for gtkwave:
Click on currently created Project (in my case it is the PWM_Generator).
After that click on Run -> External Tools -> External Tools Configurations ....
Then go to the left sidebar and under Program create your own anchor like compile_sh.
Finally you have your route :
Program
--compile_sh
And now extend this anchor by a custom created shell script :
Main->Location gets ${workspace_loc:/PWM_Generator/compile.sh}
Main->Working Directory gets ${workspace_loc:/PWM_Generator}
Click Apply and Run and that's it !!! After this you can program VHDL / Verilog and compile via Run -> External Tools -> compile_sh having created .vcd. In your project appears the gtkwave file and there just double click and it starts. =)

dlux and apidocs not found in OpenDayLight startup archetype

Based on the doc, I downloaded & installed OpenDaylight opendaylight-startup-archetype 1.1.0, then I wanted to install dlux-core, dluxapps and mdsal-apidocs to help navigating ODL interface via a browser. However, the karaf CLI said that those features weren't present in the repository.
How can I install DLUX and apidocs? Here's a list of available features.
Step to reproduce:
wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml
mvn archetype:generate -DarchetypeGroupId=org.opendaylight.archetypes -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeCatalog=remote -DarchetypeVersion=1.1.0-SNAPSHOT
mvn clean install
./karaf/target/assembly/bin/karaf
feature:list | grep dlux => Not found
The API doc explorer feature is called odl-mdsal-apidocs, not mdsal-apidocs.
The dlux and dluxapps feature repos aren't included by the archetype - it's just a starting point - you can add whatever other feature you want. That said, the dlux and dluxapps projects are no longer actively maintained and thus were archived a few months ago. However you can still download and get them to build yourself. If you're interested in rebooting them upstream, contributions are always welcome.

PMD Apex Can't find resource for rule on Windows

I'm trying to configure PMD for code analysis.
I'm using VS Code, already installed Java 10, downloaded several versions of PMD
I've installed the Apex PMD extension for VS Code and configured it as per it's instructions.
But keep getting the can't find resource error no matter which version I choose.
This is part of the output from VS Code
PMD Command: java -cp "C:\Code\pmd-bin-5.7.0\lib*" net.sourceforge.pmd.PMD -d "c:\Code\Lightning\src\classes\AccountController.cls" -f csv -R "C:\Code\ruleset\apex_default.xml"
error:Error: Command failed: java -cp "C:\Code\pmd-bin-5.7.0\lib*" net.sourceforge.pmd.PMD -d "c:\Code\Lightning\src\classes\AccountController.cls" -f csv -R "C:\Code\ruleset\apex_default.xml"
Sep 12, 2018 2:35:20 PM net.sourceforge.pmd.RulesetsFactoryUtils getRuleSets
SEVERE: Ruleset not found
net.sourceforge.pmd.RuleSetNotFoundException: Can't find resource 'category/apex/design.xml' for rule 'ExcessiveParameterList'. Make sure the resource is a valid file or URL and is on the CLASSPATH. Here's the current classpath: C:\Code\pmd-bin-5.7.0\lib\antlr-runtime-3.5.2.jar;C:\Code\pmd-bin-5.7.0\lib\antlr4-runtime-4.5.2-1.jar;C:\Code\pmd-bin-5.7.0\lib\asm-5.0.4.jar;C:\Code\pmd-bin-5.7.0\lib\commons-io-2.4.jar;C:\Code\pmd-bin-5.7.0\lib\commons-lang3-3.4.jar;C:\Code\pmd-bin-5.7.0\lib\groovy-2.4.7.jar;C:\Code\pmd-bin-5.7.0\lib\gson-2.5.jar;C:\Code\pmd-bin-5.7.0\lib\javacc-5.0.jar;C:\Code\pmd-bin-5.7.0\lib\jaxen-1.1.6.jar;C:\Code\pmd-bin-5.7.0\lib\jcommander-1.48.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-apex-5.7.0-apex-jorje-shaded.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-apex-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-core-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-cpp-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-cs-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-fortran-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-go-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-groovy-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-java-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-javascript-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-jsp-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-matlab-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-objectivec-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-perl-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-php-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-plsql-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-python-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-ruby-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-scala-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-swift-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-ui-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-visualforce-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-vm-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\pmd-xml-5.7.0.jar;C:\Code\pmd-bin-5.7.0\lib\rhino-1.7.7.jar;C:\Code\pmd-bin-5.7.0\lib\saxon-9.1.0.8-dom.jar;C:\Code\pmd-bin-5.7.0\lib\saxon-9.1.0.8.jar;C:\Code\pmd-bin-5.7.0\lib\scala-compiler-2.10.4.jar;C:\Code\pmd-bin-5.7.0\lib\scala-library-2.10.4.jar;C:\Code\pmd-bin-5.7.0\lib\scala-reflect-2.10.4.jar
If i run the command from command line I get a similar output.
This error is for every rule I have on my ruleset which is nothing out of the ordinary, it's the default ruleset that comes with the extension.
It works for me with PMD 6.7.0 and fails with 5.7.0:
The rule, you reference "category/apex/design.xml/ExcessiveParameterList" is available under this path only since PMD 6. With that version, we put the rules into categories.
When using PMD 5.7.0, you'll need to use the old ruleset: "rulesets/apex/complexity.xml/ExcessiveParameterList".
It's probably better to use the latest PMD version. Is there a way, to configure the Apex PMD extension?
See also https://github.com/pmd/pmd/issues/1344

How do you compile a Pharo VM without an image?

I have already cloned the VM and installed all dependencies for my platform. Now I am a bit confused because a couple of guides suggests that Pharo image should be started to generate the C sources translated from Slang.
"Unix"
PharoVMBuilder buildUnix32.
"OSX"
PharoVMBuilder buildMacOSX32.
"Windows"
PharoVMBuilder buildWin32.
But how you generate a VM when you cannot start a VM in your platform? This sounds like chicken and egg problem.
This means is not possible to build a VM if you cannot start an image in that platform?
If you download pre-generated sources from the CI server as suggested by Esteban, you don't need the pharo-vm sources cloned from any repository. Just uncompress in a new folder and build from there.
Assuming you have your new sources in c:\phs, open directories.cmake and rename the hardcoded path as follows:
set(topDir "c:/phs/")
set(buildDir "c:/phs/build")
set(thirdpartyDir "${buildDir}/thirdparty")
set(platformsDir "c:/phs/platforms")
set(srcDir "c:/phs/src")
set(srcPluginsDir "${srcDir}/plugins")
set(srcVMDir "${srcDir}/vm")
set(platformName "win32")
set(targetPlatform ${platformsDir}/${platformName})
set(crossDir "${platformsDir}/Cross")
set(platformVMDir "${targetPlatform}/vm")
set(outputDir "c:/phs/results")
As you could not start a VM, I suppose you need to change at least the compilation flags used to generate the sources in the CI server. They are in c:\phs\build\CMakeLists.txt specially the following flags:
-march=... (your processor architecture, search for Safe Cflags)
Removing -g0 which suppress debug options
Remove -O2 (optimizations)
Remove -DNDEBUG
Modify -DDEBUGVM=0 to -DDEBUGVM=1
and finally start the build script
cd /c/phs/build
bash build.sh
You need to pre-generate the sources outside or take pre-generated sources from other place.
Let's assume you want to compile a kind of unix, you can download pre-generated sources from here:
https://ci.inria.fr/pharo/view/3.0-VM/job/PharoSVM/Architecture=32,Slave=vm-builder-linux/lastSuccessfulBuild/artifact/sources.tar.gz (for a stack vm)
https://ci.inria.fr/pharo/view/3.0-VM/job/PharoVM/Architecture=32,Slave=vm-builder-linux/lastSuccessfulBuild/artifact/sources.tar.gz (for a cog vm)

An internal error occurred during: "Start Ruble bundle manager"

I've install the Aptana3 Eclipse plugin, I am using eclipse Version: Juno Service Release 1
Build id: 20121004-1855.
Each time I launch eclipse I see an error dialog that says:
An internal error occurred during: "Start Ruble bundle manager".
java.lang.NullPointerException
How can I fix this error?
I was having the same problem after a fresh install of Eclipse and Aptana.
What fixed it for me was very close to what Jason mentioned in his Answer. I checked the available software sites in Eclipse --> Preferences --> Install/Update --> Available Software Sites.
In this window there was an option for Aptana that was checked. I had given it a name of "Aptana" previously and the location was "http://download.aptana.com/studio3/plugin/install".
There was a second location listed for Aptana at "http://download.aptana.com/studio3/plugin/update/" but this option was not checked nor did it have a name. I gave it the name "Aptana Update" and I put a check in the box. I then restarted Eclipse and the error went away.
Let me note that I am using:
Eclipse Standard/SDK
Version: Kepler Service Release 1
Build id: 20130919-0819
AND
Aptana Studio 3
Version: 3.4.2.201308081736-7W7I57boG98RAi489ctbvKi7VXbq
Try checking the available software sites in Eclipse --> preferences. Use the search field in preferences to get there quickly. I noticed there was an entry for:
www.apanta.com
The above address isn't the location of the package. Once I unchecked that box and selected the one for:
Apanta http://download.aptana.com/studio3/plugin/install
it started without the error. Not sure if this is the full solution, but it seems to work.
Look at your .log to find which bundle has an issue.
Then uncheck, remove or change wrong url in the install/update available software sites : Eclipse -> Preferences -> Install/update -> Available Sofware Sites
(to check this url, just copy/paste and look in browser..)
Aptana update site (at current time...) : http://update.aptana.com/update/studio/3.2
Install the support file for Windows
http://gnuwin32.sourceforge.net/downlinks/zlib.php
this solved my problem in Windows. As by Linux it comes as default.
I solved this by using rvm to install zlib. I looked through my log file (Eclipse: Help > Aptana > View Log File) and saw a zlib error message right before the NullPointerException. If zlib isn't in your log, this probably won't fix your problem ;-)
My system (Ubuntu) already had zlib1g and zlib1g-dev installed.
rvm pkg install zlib
rvm reinstall 1.9.3
Find the Folder bundles in your installation.
<apptanaFolder>/configuration/org.eclipse.osgi/bundles
do a chmod to allow the user read and write to this folder:
chmod 775 <apptanaFolder>/configuration/org.eclipse.osgi/bundles -R
Be Happy, cause you solve your problem!
Here in German Language:
http://wiki.xstable.de/doku.php/entwicklungsumgebung:eclipse:troubleshooting#ruble_manager
There is a patch for this:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=445122#c51
I confirm it solves the problem.
I tried the solution of Jonathan to no avail, although one of the adresses for Aptana was indeed unchecked and unmarked.
What worked for me was simply updating the plugins though Help --> Check for Updates.