Include an external update site in my update site in Eclipse - eclipse

I have an update site in which I'm including my features, like this:
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/my_feature1_1.0.0.qualifier.jar" id="my_feature1" version="1.0.0.qualifier">
<category name="My Category"/>
</feature>
<feature url="features/my_feature2_1.0.0.qualifier.jar" id="my_feature2" version="1.0.0.qualifier">
<category name="My Category"/>
</feature>
...
</site>
Some of the plugins included by those features have dependencies on plugins that I download from other updates sites, right now I have to manually install those update sites before installing mine, to automate this, I can download and include those dependencies to my site.xml but at the end the .zip will contain them and the size will be too big, is there a way to link an external update site to mine so it is automatically downloaded during the installation of my update site?

It seems that there is a associateSitesURL tag that provides this behavior for site.xml. That being said, it looks like site.xml has been replaced in favor of category.xml (see for instance this answer on SO) and I don't know whether this tag is still supported.
Vogella has a section about how to create one. Using a category.xml file, you can specify an additional update site by adding a repository-reference tag. For instance, add the following code to the category.xml file to reference an Orbit update site:
<repository-reference location="https://download.eclipse.org/tools/orbit/downloads/drops/R20170818183741/repository" enabled="true" />
The URL can also be specified directly from the category.xml file editor:
I failed to find any documentation on this but I used it in a side project and it seemed to work as expected.

This is possible using an element like this <repository-reference location="http://download.eclipse.org/releases/2020-12" enabled="true" /> in category.xml. See the article Eclipse p2 site references for details.

Related

Nuget packages bundled in teamcity not installing documentation files

So basically I am building nuget packages in TeamCity via a .proj file that runs a "pack" target:
<MSBuild
Projects="$(MSBuildProjectDirectory)\PROJNAME.csproj"
Targets="Rebuild;pack"
Properties="Configuration=$(Configuration);Version=$(BUILD_NUMBER)" />
With an artifact output of:
PROJNAME\bin\Release\PROJNAME.%build.number%.nupkg
This works nicely for basic consuming of the nuget package, however I am having trouble getting the documentation xml files to work.
I have looked inside the output nupkg and I see that the documentation xml is actually bundled and included in the package, however the problem is that when I finally restore nuget packages in my consuming project, the dll gets copied across as expected, however the documentation does not.
I wondered if this is because of the TC generated .nuspec file, and if I may need to abandon teamcities nuspec and create my own, however I was hoping to avoid this, given it works nicely the way it is, and handles versioning etc.
Is there a simple way to include documentation xml when the package is restored?
In the end i found it came down to 3 things, being:
Ensure projects configuration is set to generate documentation.
Either by adding code manually such as:
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"><DocumentationFile>bin\$(Configuration)\netstandard2.0\Project.documentation.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DocumentationFile>bin\$(Configuration)\netstandard2.0\Project.documentation.xml</DocumentationFile>
</PropertyGroup>
Or alternatively via the Visual Studio Project properties menu, if you are doing it through VS also make sure you do it for all configurations (as depicted as A in the picture below):
Add EnableDocumentationFile to your .csproj file, eg:
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>project</RootNamespace>
<Configurations>Debug;Release</Configurations>
<EnableDocumentationFile>true</EnableDocumentationFile>
</PropertyGroup>
and most importantly let your project know (again in your .csproj) that it should be copying over the documentation file, and use PackageFlatten if you want it to appear at the same level as your package dll:
<ItemGroup>
<None Remove="bin\$(Configuration)\netstandard2.0\Project.documentation.xml" />
</ItemGroup>
<ItemGroup>
<Content Include="bin\$(Configuration)\netstandard2.0\Project.documentation.xml">
<Pack>true</Pack>
<PackageCopyToOutput>true</PackageCopyToOutput>
<PackageFlatten>true</PackageFlatten>
</Content>
</ItemGroup>

How to properly remove PropertyChanged.Fody via NuGet

I intended to use Fody.PropertyChanged in one of my projects, and it was properly added via NuGet:
Install-Package PropertyChanged.Fody
I realized, it was in the wrong project, so I used the uninstall command:
Uninstall-Package PropertyChanged.Fody
After that I added it to the proper project.
Now, when I try to build my solution, I get the following error in the initial project that shouldn't have Fody installed:
Fody: You don't seem to have configured any weavers. Try adding a Fody
nuget package to your project. Have a look here
http://nuget.org/packages?q=fody for the list of available packages.
There is no reference to Fody in the project, I deleted the Fody reference from the packages.config file and there is no XML file.
What else should I do?
You need to also
Uninstall-Package Fody
Remove The "FodyWeavers.xml" and Open the Project file with NotePad or notePad++ and remove the following lines
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<Import Project="..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets" Condition="Exists('..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets')" />
I guess you've recently updated the Fody library? When it asked to replace the existing "FodyWeavers.xml" you might have permitted it to do so. If you have a backup of the project, get the "FodyWeavers.xml" from that and replace it with the new one. Clean and Rebuild the solution.
This doesn't specifically address the project you don't want Fody in, but sometimes VS gives vague/odd errors.
I just went through a similar issue after installing PropertyChanged.Fody for the first time, and couldn't build as soon as I included and referenced it... I wonder if any of these details from my experience might help (making sure these points exist in the project you want the lib in).
Make sure you have the following references in your packages.config from when you ran Install-Package PropertyChanged.Fody:
<package id="Fody" version="1.24.0" targetFramework="net45" developmentDependency="true" />
<package id="PropertyChanged.Fody" version="1.49.0" targetFramework="net45" developmentDependency="true" />
Make sure there is FodyWeavers.xml in the top level of the project you want to use it in.
FodyWeavers.xml should look like this (I had to add <PropertyChanged /> to mine)
<?xml version="1.0" encoding="utf-8" ?>
<Weavers>
<PropertyChanged />
</Weavers>

How to set property eclipse.update.reconcile=true in Eclipse product built with Tycho

I build my Eclipse 4 Application with Maven Tycho 0.15.0. Everything works fine except of the fact, that when i add
<configurations>
...
<property name="org.eclipse.update.reconcile" value="true" />
</configurations>
Tycho is ignoring the property and writing org.eclipse.update.reconcile=false to the config.ini.
I want my application to use every bundle that I drop in the plugins folder therefore I added org.eclipse.update.configurator and the above property.
Any ideas?
As described on official site:
When setting the start level for org.eclipse.update.configurator,
PDE/Build will also automatically set In addition to these properties,
org.eclipse.update.reconcile=false.
In fact if you point
<plugin id="org.eclipse.update.configurator"/>
in .product file you always have default start level as a result
org.eclipse.update.reconcile=false
in your config.ini file.
Solution is not specify
<plugin id="org.eclipse.update.configurator"/>
in .product file. It still will be in plugins.

Update site containing only one Eclipse helios milestone release, i.e 3.6.2, not 3.6.1/3.6.0

I'm trying to create an internal corporate mirror of the Helios Milestone repository http://download.eclipse.org/releases/helios, but this update site contans three releases, corresponding to (I assume) 3.6.2, 3.6.1 and 3.6.0
Is there an update site that only contains release 3.6.2? Saw that there was an indigo update site http://download.eclipse.org/releases/indigo/201202240900, thought there might be something similar, but google doesnt know and I got tired of trying different date/time combinations :)
Ah, found it. This post solved it.
Quote from post:
The repository XML (available as the one and only file that you get by appending /compositeContent.jar to the URL), looks like this:
<?xml version='1.0' encoding='UTF-8'?>
[...]
<children size='4'>
<child location='http://download.eclipse.org/technology/epp/packages/helios/'/>
<child location='201006230900'/>
<child location='201009240900'/>
<child location='201102250900'/>
</children>
The thing to pay attention to are the child elements. They are relative to the composite URL which means that the smaller and coherent SR2 repository can be found at:
http://download.eclipse.org/releases/helios/201102250900
The same apply to http://download.eclipse.org/eclipse/updates/3.6

intelliJ idea 10 community edition and GWT plugin

Having hard time installing GWT plugin. Tried to search for GWT plugins and all I was able to find was GWT Imagebundle which is pretty outdated. Tried File Menu -> configure plugins but didn't help as the plugin is not installed yet.
Is there a support for GWT plugin in intelliJ 10 community edition? If there is can some one please point me to the right document to install it? Just to make sure, I installed scala plugin and I am able to see it in "Add modules" section.
This is my first time using intellij and I love it so far.
There is no GWT support in the Community Edition.
Starting from the version 11 it's not possible to add PROJECT_FOLDER/src as it was described in the previously posted (by ctorx) link http://java.dzone.com/tips/gwt-development-intellij-idea. Once we add a source folder it appears as an "Empty library" and doesn't work. This is because IDEA treats it as a folder where should be compiled classes not sources.
But there is a workaround. To fix it we have to hack the module's IML file. Find the following lines in the IML file of your entry point module
<orderEntry type="module-library">
<library>
<CLASSES />
<JAVADOC />
<SOURCES>
<root url="file://$MODULE_DIR$/src/main/java" />
</SOURCES>
</library>
</orderEntry>
and move your path into the CLASSES tag, so the entire thing looks like the following
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="file://$MODULE_DIR$/src/main/java" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>