I'm packaging an application for deployment into Karaf via .kar files. I've noticed that a number of dependent features (from activemq and camel in my example) remain installed even after I have removed the .kar file from the deploy folder.
Is this expected behaviour? I had anticipated the deployment being entirely reversible.
My feature file looks like this:-
<?xml version="1.0" encoding="UTF-8"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
<repository>mvn:org.apache.camel.karaf/apache-camel/2.10.2/xml/features</repository>
<repository>mvn:org.apache.activemq/activemq-karaf/5.7.0/xml/features</repository>
<repository>mvn:io.hawt/hawtio-karaf/1.0/xml/features</repository>
<feature name="jellyfish-messaging" version="0.0.2-SNAPSHOT">
<!-- core components -->
<feature version="2.2.8">war</feature>
<feature version="2.6.3">cxf</feature>
<feature version="2.10.2">camel-cxf</feature>
<feature version="2.10.2">camel-blueprint</feature>
<feature version="2.10.2">camel-jetty</feature>
<feature version="2.10.2">camel-twitter</feature>
<feature version="2.10.2">camel-mail</feature>
<feature version="5.7.0">activemq-blueprint</feature>
<feature version="5.7.0">activemq-spring</feature>
<feature version="5.7.0">activemq-web-console</feature>
<feature version="5.7.0">activemq-camel</feature>
<!-- jellyfish messaging-specific -->
<bundle dependency="true">mvn:org.jellyfish/jellyfish-messaging-broker/0.0.2-SNAPSHOT</bundle>
...etc etc etc
After I've removed the .kar file, I'm left with this:-
karaf#root>features:list | grep activemq
[uninstalled] [5.4.2 ] activemq cxf-2.6.3
[installed ] [5.7.0 ] activemq activemq-5.7.0
[installed ] [5.7.0 ] activemq-spring activemq-5.7.0
[installed ] [5.7.0 ] activemq-blueprint activemq-5.7.0
[uninstalled] [5.7.0 ] activemq-optional activemq-5.7.0
[installed ] [5.7.0 ] activemq-camel activemq-5.7.0
[installed ] [5.7.0 ] activemq-web-console activemq-5.7.0
[uninstalled] [5.7.0 ] activemq-extra activemq-5.7.0
Thanks,
J.
yes it's an expected behavior. The kar file deployment is an easy way of providing features and bundles in one artifact, though the feature descriptors stay even after the uninstalled kar bundle. Same thing is for installing features an uninstalling of transitive features isn't really supported right now. Work on this is done in the latest version 3.0.0
Related
In WIX I'd like a feature to be installed and uninstalled normally but not to be touched during repair.
I was not able to find a condition which would allow me to do this.
My attempts has failed: the feature is reinstalled on repair (what I do not need) or is not uninstalled.
This is a sample that I tried last:
<Feature Id="aFeature" Title="A Features" Level="1">
<ComponentRef Id="aComponent" />
<Condition Level="0">
<![CDATA[WixUI_InstallMode="Repair"]]>
</Condition>
</Feature>
What is the right condition to uninstall but not re-install during repair?
Or what did I do wrong?
This works for me:
<Feature Id="aFeature" Title="A Features" Level="1">
<ComponentRef Id="aComponent" />
<Condition Level="0">
<![CDATA[REINSTALL<>""]]>
</Condition>
</Feature>
This way during Repair the feature is ignored and not touched, but normally uninstalled
The only way I can think of is to give all the components in that feature an empty guid, that's the signal to Windows Installer not to do anything with them, such as repair them, patch them, uninstall them. If the product is already shipped it's too late for that. However that's a drastic step that is normally necessary only when you want to install some things for temporary use and then delete them. So you are fighting the framework here. It's look like you have a problem that disabling feature repair might solve, so why not describe the problem to see if there is another solution?
I created an Installer using WiX to install a VSIX along with two dependent components. These two components were available to me in the form of Merge Modules. Below is the code where I used the merge modules in my code:
<DirectoryRef Id="TARGETDIR">
<Merge Id="MergeModuleID1" SourceFile="MergeModule1.msm" DiskId="1" Language="0"/>
<Merge Id="MergeModuleID2" SourceFile="MergeModule2.msm" DiskId="1" Language="0" />
</DirectoryRef>
and I've referred these merge modules as:
<Feature Id="ProductFeature" Title="Title" Level="1">
<ComponentRef Id="VSPackage"/>
<ComponentRef Id="ApplicationShortcut"/>
<ComponentRef Id="DesktopShortcut"/>
<ComponentRef Id="LicenseComp"/>
<MergeRef Id="MergeModuleID1"/>
<MergeRef Id="MergeModuleID2"/>
</Feature>
The problem I'm facing is, that my VSIX is installed to all the user accounts on the machine, but these merge modules are not, they're installed only on the user account where the product is installed. On other user accounts, an installation dialog appears, which I believe is installing these merge modules, after which everything works fine.
How do I make these merge modules to be installed to all users?
P.S: ALLUSERS property in both the MSI and merge modules are set to '1'.
You may need to clarify that question somewhat. Merge modules are not installed, just the files, so you mean the files in merge modules are going somewhere incorrect, yes? Also, files are not installed on a user account they got to a location on disk.
Guessing my way through this, you're probably saying that the files get installed to somewhere like the User's Application Data location for the installing user. If that's what the merge modules specify in their internals, that's normal. You can obviously install files to the current user's application data folder even if you're doing a per machine install. I can't say if those merge modules are correctly designed or not, but if they are then:
The initial install will put those files in the installing users file location.
If another logs on and uses a shortcut and your MSI is correctly designed, the install-on-demand feature will install those files for that user in that user's folder, maybe asking for the original install media. That's the way this is designed to work because:
a) There is no mechanism that that allows a file to be installed simultaneously to all user file locations on the system, and it makes no sense anyway if they never use the app.
b) What happens if you create a new user account AFTER the product has been installed? The file will not be in that user's location, however the install on demand scheme guarantees that this new user will get the file in their location if they log on and use the app.
The short answer is that this is probably all working as intended.
Setting ALLUSERS is fine.
What you've described looks like "advertising".
To remove advertising for the Merge Modules, add AllowAdvertise="no" to the Attributes of the Feature containing the MergeRef element :
<Feature Id="ProductFeature" Title="Title" AllowAdvertise="no" Level="1">
<ComponentRef Id="VSPackage"/>
<ComponentRef Id="ApplicationShortcut"/>
<ComponentRef Id="DesktopShortcut"/>
<ComponentRef Id="LicenseComp"/>
<MergeRef Id="MergeModuleID1"/>
<MergeRef Id="MergeModuleID2"/>
</Feature>
I just updated wix to 3.6 and after the upgrade my wix project failed to build.
The following line in the xml triggers the error:
<ComponentGroupRef Id="Product.Generated"/>
The error explanation is the following:
error LGHT0094: Unresolved reference to symbol 'WixComponentGroup:Product.Generated' in section 'Product:*'.
If I comment out the ComponetGroupRef element, the msi is created without any errors and it seems to work just as before the upgrade to 3.6.
Fails:
<Feature Id="ProductFeature" Title="My.net Server" Level="1">
<ComponentRef Id="My.Server" />
<ComponentRef Id="My.Server.exe.config"/>
<!-- Note: The following ComponentGroupRef is required to pull in generated authoring from project references. -->
<ComponentGroupRef Id="Product.Generated" />
</Feature>
Works:
<Feature Id="ProductFeature" Title="My.net Server" Level="1">
<ComponentRef Id="My.Server" />
<ComponentRef Id="My.Server.exe.config"/>
</Feature>
Could anyone shed some light on this error? Am I breaking something that I should be aware of or fix? How important is that entry and what exactly does it do?
Exact same question posted today, LGHT0094: Unresolved reference to symbol 'WixComponentGroup:Product.Generated' in section 'Product:*' You should search before asking a question, apologies came across a little rude there, was in a rush. Always good just to do a quick search before posting, it will prevent downvoting..:)
I have to install a product which has several configurations. Say Professional, Standard, etc.
Is it possible that the Professional and the Standard Feature contain the same common Components? If yes would there be drawbacks to such an solution?
Assume that it is ensured that only one of these features will be installed.
Example in WiX source:
<Feature Id="F__P_Classic" Level="2" ConfigurableDirectory="INSTALLFOLDER" Title="Program Professional" TypicalDefault="install" Display="expand" InstallDefault="local">
<ComponentGroupRef Id="CG__ProgramBase" />
</Feature>
<Feature Id="F__P_Professional" Level="2" ConfigurableDirectory="INSTALLFOLDER" Title="Program Professional" TypicalDefault="install" Display="expand" InstallDefault="local">
<ComponentGroupRef Id="CG__ProgramBase" />
<ComponentGroupRef Id="CG__Other" />
</Feature>
It is possible and it is used a lot that several features contain the same common components. I'm not aware about any drawbacks of this approach.
From MSDN:
Components can be shared by two or more features, that is, the same
component can be referred to by more than one feature.
I want to install a product with some dll with Wix 3.5.
These dll are determined during the msi installation through a radio buttons group.
I have :
a (fragment) wxs for myDllv1
a (fragment) wxs for myDllv2
a (UI fragment) wxs with the RadioButtonGroup to choose between myDll v1 and myDll v2 with a property INSTALLTYPE
a main wxs file which installs the correct version of myDll.
Problem : I have another set of dll to add and I want to modify as less files as possible.
I don't want to introduce bugs and I want to keep things decoupled.
I would like to modify only the UI fragment with the radio buttons and add a myDllv3 fragment (without doing any changes to my main wxs file, so no condition in that file..).
Is it possible?
Why don't you use pre-processors to select the correct fragments when building the msi?
<?if $(env.SomeBuildParameter) = SetA ?>
<?include myDllSetAv1.wxs ?>
<?include myDllSetAv2.wxs ?>
<?else ?>
<?include myDllSetBv1.wxs ?>
<?include myDllSetBv2.wxs ?>
<?endif ?>
I may be misunderstanding the question, but it sounds like your different set of Dlls should be grouped by features within WIX. I'd suggest creating independent WIX fragments that represents a feature for each of your set of Dlls and then you can tie your UI to install a specific feature as appropriate.
You represent a feature at the product level like so:
<Feature Id="Feature.One" Title="Feature One">
<ComponentGroupRef Id="FeatureOneDlls.Group" />
</Feature>
<Feature Id="Feature.Two" Title="Feature Two">
<ComponentGroupRef Id="FeatureTwoDlls.Group" />
</Feature>
And within each of the features I'd recommend using a separate wxs file to supply the fragment information that contains the files for that feature.