How Eclipse check available plugin in some environment? - eclipse

I made some Eclipse plugin and update site on Indigo(Eclipse v3.7).
I can debug my plugin with new Eclipse instance, but I can't install my plugin via update site.
When I try to test install my plugin with Indigo (same environment as dev environment), the install wizard says:
Cannot complete the install because some dependencies are not satisfiable
com.mytest.helloworld.feature.group [1.0.0.201203071543] cannot be installed in this environment because its filter is not applicable.
(I tried to install my plugin with the same version of eclipse - Indigo.
And, My plugin works fine after manual install.)
Is there any check point to solve this?
How eclipse check available plugin? (based on what information?)
Here is my features.xml.
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.mytest.helloworld"
label="mytest Feature"
version="1.0.0.qualifier"
provider-name="mytest.com"
plugin="com.mytest.helloworld"
os="aix,hpux,linux,macosx,qnx,solaris,win32"
ws="carbon,cocoa,gtk,motif,photon,win32,wpf"
nl="en,ko"
arch="ia64,ia64_32,PA_RISC,ppc,sparc,x86,x86_64">
<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>
<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>
<license url="http://www.example.com/license">
[Enter License Description here.]
</license>
<url>
<update label="mytest update" url="http://localhost:8088/plugin"/>
</url>
<requires>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.expressions" version="3.4.101" match="greaterOrEqual"/>
<import plugin="com.android.ide.eclipse.adt" version="0.9.5" match="greaterOrEqual"/>
<import plugin="org.jdom" version="1.1.1" match="greaterOrEqual"/>
<import plugin="org.apache.commons.httpclient" version="3.1.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.core" version="3.5.2" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.resources" version="3.5.2" match="greaterOrEqual"/>
</requires>
<plugin
id="com.mytest.helloworld"
os="aix,hpux,linux,macosx,qnx,solaris,win32"
ws="carbon,cocoa,gtk,motif,photon,win32,wpf"
nl="en,ko"
arch="ia64,ia64_32,PA_RISC,ppc,sparc,x86,x86_64"
download-size="1000"
install-size="1000"
version="0.0.0"
unpack="false"/>
<plugin
id="com.mytest.helloworld.nl1"
os="aix,hpux,linux,macosx,qnx,solaris,win32"
ws="carbon,cocoa,gtk,motif,photon,win32,wpf"
nl="en,ko"
arch="ia64,ia64_32,PA_RISC,ppc,sparc,x86,x86_64"
download-size="1"
install-size="1"
version="0.0.0"
fragment="true"
unpack="false"/>
</feature>

Have you been able to run the plugin in a new Eclipse instance from your development environment? I.e press the run button and start a new Eclipse application with your plugin active.
It seems like there is some issue with filters, either you have defined a version requirement that doesnt work, or perhaps defined an OS that doesnt work. Posting your feature.xml might help.
Edit based on comment:
Try to remove the OS specific parts from the XML, i.e the properties "os", "ws", "arch" and perhaps "nl".
You would get
<feature
id="com.mytest.helloworld"
label="mytest Feature"
version="1.0.0.qualifier"
provider-name="mytest.com"
plugin="com.mytest.helloworld">
You only need to enter those properties if you are restricting the choice in some way, that is, your plugin contains OS specific code that will only work on some operating systems/architectures.

Related

Unable to find version '4.2.1.188' of package 'Glass.Mapper'

I am new to Sitecore and Glass.Mapper tools. I am working with Visual Studio 2013 and Sitecore 8.1 for a solution I have begun working on (not the author).
Due to other questions I have observed, I will try to demonstrate what my solution now has in it to remove build errors.
My packages.config includes the following:
<package id="Glass.Mapper" version="4.2.1.188" targetFramework="net45" />
<package id="Glass.Mapper.Sc" version="4.2.1.188" targetFramework="net45" />
My nuget.config includes the following:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
<packageSources>
<add key="nuget v2" value="https://www.nuget.org/api/v2" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
I have added these as project references to each of these Dlls from our Packages directory, which also includes the following in a few of the projects:
<package id="Glass.Mapper.Sc.CastleWindsor" version="3.3.0.25" targetFramework="net45" />
<package id="Glass.Mapper.Sc.Core" version="4.2.1.188" targetFramework="net45" />
<package id="Glass.Mapper.Sc.Mvc-5" version="3.3.0.45" targetFramework="net45" />
Solution errors have been reduced from several hundred to ~20, mostly due to this issue, and the Metadata file "..." could not be found errors which appear since dependent projects fail to generate their project Dlls.
We cannot upgrade Nuget in place, and we cannot perform upgrades using Manage Nuget Packages for Solution due to code in place which references deprecated methods in key packages.
If you browse packages on nuget.org with your web browser, you can guess the pattern for viewing a specific version of a package. So, version 4.2.1.188 of GlassMapper will use the URL https://www.nuget.org/packages/Glass.Mapper/4.2.1.188
There, I see a message saying
The owner has unlisted this package. This could mean that the package is deprecated or shouldn't be used anymore.
So the package exists, so existing packages should be able to restore it, but the owner has delisted it to reduce the probability that new projects will start using it. Interestingly the package owner has delisted all versions of the package, suggesting the package is deprecated.
Anyway, as I mentioned, normally the package can still be restored (that's the point of unlisting vs deleting). So my best guess is that the version of NuGet that works with Visual Studio 2013 doesn't support unlisted packages as it's really, really old.
You could download nuget.exe from nuget.org/downloads, restore from the command line and then use Visual Studio. Otherwise you'll probably need to upgrade to a newer version of Visual Studio.

E4 Application - importing plugins without Bundle-SymbolicName

I am working on an project which is a POM and manifest driven E4 application containing a plugin platform project which builds a local p2 as my target for the larger RCP app. A necessary dependency is older and has within its jar a manifest which contains no Bundle-SymbolicName. As such, I am unable to import the plugin to my local p2 repo and subsequent target definition, since the feature.xml of my platform project cannot resolve the plugin.
Is there any way in which to import this plugin to my local p2 without a Bundle-SymbolicName attributed to it?
Thanks
feature.xml
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="example.p2.feature"
label="Example Maven Dependencies"
version="1.0.0.qualifier"
provider-name="">
<description url="http://www.example.com/description">
Base feature for example project to be built on
</description>
<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>
<license url="http://www.example.com/license">
[Enter License Description here.]
</license>
<plugin
id="org.apache.commons.collections"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.apache.thrift"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.apache.commons.pool"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>
MANIFEST.MF
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Built-By: ecagent
Build-Jdk: 1.5.0_22
Created-By: Apache Maven 3.1.1
A jar which does not contain a Bundle-SymbolicName entry (and does not contain a plugin.xml in the old Eclipse 2.0 style) is not a plug-in and you can't reference it as though it was one.
You can either include the jar as part of one of your existing plug-ins (make sure it is listed in the `build.properties if you do this) or you can create a new plug-in just the contain the jar.

WiX 3.7 and MATLAB 2012a MCR

Is there tutorial for creating a WiX installer, that can check if MCR is already installed and if not can install it?
I'm working with Visual Studio 2012.
Here's my solution for MCR 2012a and .NET 4.5 please comment if there is a better way to do it:
this is for documentation
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:netfx='http://schemas.microsoft.com/wix/NetFxExtension'>
<Bundle Name="MYAPP"
Version="0.6"
Manufacturer="MY Corporation"
UpgradeCode="f380ae43-5df1-4cfe-9297-526e3e638e57">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<!-- TODO: Define the list of chained packages. -->
<PackageGroupRef
Id="Netfx45FullPackage"/>
</Chain>
</Bundle>
<Fragment>
<util:RegistrySearch
Id="MatlabPath"
Variable="UniqueId"
Root="HKLM"
Key="SOFTWARE\Matworks\MATLAB\4.17\"
Result="exists"/>
<PackageGroup Id="Netfx45FullPackage">
<ExePackage
Id="Netfx45Xxx"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="no"
InstallCommand="/q"
SourceFile="..\SetupProject\dotnetfx45_full_x86_x64.exe"
DetectCondition="(Netfx4FullVersion="4.5.50709") AND (NOT VersionNT64 OR (Netfx4x64FullVersion="4.5.50709"))"
InstallCondition="(VersionNT >= v6.0 OR VersionNT64 >= v6.0) AND (NOT (Netfx4FullVersion="4.5.50709" OR Netfx4x64FullVersion="4.5.50709"))"/>
<ExePackage
Id="MatlabMCR2012a64"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="no"
InstallCommand="/q"
SourceFile="..\SetupProject\MCR_R2012a_win64_installer.exe"
InstallCondition="(NOT MatlabPath)"/>
<MsiPackage
Id="MYAPP"
Cache="no"
Compressed="no"
Vital="yes"
SourceFile="..\SetupProject\bin\Release\MYAPPSetup.msi"/>
</PackageGroup>
</Fragment>
</Wix>

Have added Ivy management to Eclipse project, then what?

Have added Ivy management to one of my eclipse projects. Nothing happened after that.
I have a guide to add something to ivy.xml and ivysettings.xml, so what? How to create empty versions of these files? Where to put them?
I have created some by intuition, in the project root, then added to files what was told.
Nothing happened. Where are new libraries? How to force Ivy to do something?
Versions:
Apache IvyDE 2.2.0.beta1-201203282058-RELEASE
Eclipse Helios Service Release 2
Guides for ivy are for xuggler: http://www.xuggle.com/downloads
I have created ivy.xml by File New and added what was said without ellipsis. icysettings.xml are just the sample w/o ellipsis.
Yes ivy.xml should be in the root (for default configuration).
try this:
<ivy-module
version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
xmlns:e="http://ant.apache.org/ivy/extra">
<info organisation="com.organisation" module="stackoverflow" revision="1.0.0" status="integration" >
</info>
<configurations>
<conf name="default" />
</configurations>
<dependencies>
<dependency org="xuggle" name="xuggle-xuggler" rev="5.2" />
</dependencies>
</ivy-module>
Create ivysettings.xml file in the root as well. This one is adapted to your need
<ivysettings> <
settings defaultResolver="default" />
<include url="${ivy.default.settings.dir}/ivysettings.xml" />
<resolvers>
<url m2compatible="true" name="xugglecode">
<ivy
pattern="http://xuggle.googlecode.com/svn/trunk/repo/share/java/[organization]/[artifact]/[revision]/ivy-[revision].xml" />
<ivy
pattern="http://xuggle.googlecode.com/svn/trunk/repo/share/java/[organization]/[artifact]/ivy-[revision].xml" />
<artifact
pattern="http://xuggle.googlecode.com/svn/trunk/repo/share/java/[organisation]/[artifact]/[revision]/[artifact](-[revision]).[ext]" />
<artifact
pattern="http://xuggle.googlecode.com/svn/trunk/repo/share/java/[organisation]/[artifact]/[artifact](-[revision]).[ext]" />
<artifact
pattern="http://xuggle.googlecode.com/svn/trunk/repo/share/java/[organisation]/[artifact](-[revision]).[ext]" />
<artifact
pattern="http://xuggle.googlecode.com/svn/trunk/repo/share/java/[artifact](-[revision]).[ext]" />
<artifact
pattern="http://build.xuggle.com/view/Stable/job/red5_jdk6_stable/lastSuccessfulBuild/artifact/workingcopy/dist/[artifact].[ext]" />
</url>
<chain name="default" changingPattern=".*SNAPSHOT">
<resolver ref="xugglecode" />
</chain>
</resolvers>
</ivysettings>
Now when you add ivy management, in Main tab you should see Ivy File: ivy.xml as default.
now go to settings tab. Check the box of 'Enable project specific settings'.
in Ivy settings path, easier to choose the one you just created in your root project using 'Workspace button'. Navigate and choose.
Press ok. It will start resolving immediately.
I should tell you, that even though the file exists, I couldn't retrieve it. The ivy- console seems stuck. I'm receiving Status Code 403. I'm doing from work.
Maybe you have better luck resolving it. If not, consider this as a mini example of how to set up IvyDE.

A working example of custom p2 provisioning action

I’m trying to write a custom p2 provisioning action to execute my own code when installing feature. Doing so with installHandler for Update Manager was easy, but as for p2, there’s absolutely no docs on this topic in the web, most of the time eclispe just silently ignores me (even in a log), and the only example I’ve found is not working.
So, if somebody can point me at a working example of custom provisioning action, that would help me understand the whole thing.
Thanks.
Finally, I’ve got it working somehow:
example_plugin:
plugin.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.5"?>
<plugin>
<extension point="org.eclipse.equinox.p2.engine.touchpoints" id="example" name="Eclipse Touchpoint">
<touchpoint type="com.company.example.plugin" class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint" version="1.0"/>
</extension>
<extension point="org.eclipse.equinox.p2.engine.actions">
<action
class="com.company.example.plugin.CustomAction"
name="do_custom_action"
touchpointType="com.company.example.plugin"
touchpointVersion="1.0"
version="1.0">
</action>
</extension>
</plugin>
META-INF\p2.xml:
provides.0.namespace=com.company.example.plugin
provides.0.name=do_custom_action
provides.0.version=1.0
example_feature:
feature.xml:
<?xml version="1.0" encoding="UTF-8"?>
<feature id="com.company.example.feature" label="Maven installer feature" version="2.2.1.qualifier">
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license url="http://www.example.com/license">[Enter License Description here.]</license>
<requires>
<import plugin="com.company.example.plugin"/>
</requires>
<plugin
id="com.company.example.plugin"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>
p2.inf:
metaRequirements.0.namespace=com.company.example.plugin
metaRequirements.0.name=do_custom_action
metaRequirements.0.range=1.0
instructions.configure = com.company.example.plugin.do_custom_action();
General comments:
Custom touchpoint action is stored in a plugin as a regular class.
Update site must contain proper artifacts.jar/content.jar (don’t know why, took a lot of time to debug this).
If you want to let your touch point action working, there are two approaches,
install your plug-in firstly that provides the new touchpoint action. Then install the contents from the repository using the new touchpoint action.
the iu depending on the new touchpoint action need require the bundle provides the new touchpoint action, it exactly likes what you found. See the example code attached by Simon Kaegi