Google Guice update site - eclipse

I am trying to use com.google.inject in my application. Initialy I added as a jar, but now that I am building my application I need Guice to be part of my target definition. What is Google Guice update site URL that I can use in my target definition?

You could use the xtext 'orbit' update-site, which contains google inject :
<location includeAllPlatforms="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="com.google.guava" version="0.0.0"/>
<unit id="com.google.inject" version="0.0.0"/>
<unit id="org.apache.log4j" version="0.0.0"/>
<unit id="org.aopalliance" version="0.0.0"/>
<unit id="org.easymock" version="0.0.0"/>
<unit id="org.antlr.runtime" version="0.0.0"/>
<unit id="org.junit" version="0.0.0"/>
<unit id="javax.inject" version="0.0.0"/>
<unit id="org.apache.ant" version="0.0.0"/>
<unit id="org.objectweb.asm" version="0.0.0"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20180606145124/repository/"/>
</location>

If you're using a build tool like maven or gradle, you can include it as a dependency. For example, here's how you could do it with gradle:
compile 'com.google.inject:guice:4.0'
This will pull in javax.inject which has the standard inject annotation, as a dependency.

Related

Eclipse RCP build - missing javax.xml

I am updating my RCP target from circa 2015 to latest.
I have a requirement for Java XML Streaming that I resolve from the p2 site Orbit-R20200529191137 - https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository. This feature has a requirement for javax.xml.
When building I get a new error that did not occur with the old target file:
Missing requirement: mybundle.core.support.feature.feature.group 1.0.0.qualifier requires 'javax.xml 0.0.0' but it could not be found
Any suggestions on how I can meet this requirement.
Thanks for the time to read and think about my question,
Timothy
From a post on Eclipse forums this VERY useful link to a release specific migration guide.
Migration guide
Adding target platform
The target platform is defined using software sites only so that it is compatible with Tycho build. Here is the text view of the OLD target file.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="motordb-4" sequenceNumber="179">
<locations>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.gemini.jpa.feature.feature.group" version="1.2.0.M1" />
<repository location="https://download.eclipse.org/gemini/jpa/updates" />
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="org.apache.commons.collections.source" version="3.2.0.v2013030210310" />
<unit id="org.apache.commons.collections" version="3.2.0.v2013030210310" />
<unit id="org.apache.commons.beanutils" version="1.8.0.v201205091237" />
<unit id="javax.xml.stream" version="1.0.1.v201004272200" />
<unit id="org.apache.commons.net" version="3.2.0.v201305141515" />
<unit id="org.apache.commons.net.source" version="3.2.0.v201305141515" />
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository/" />
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.emf.common.feature.group" version="2.11.0.v20150805-0538" />
<unit id="org.eclipse.emf.ecore.feature.group" version="2.11.1.v20150805-0538" />
<unit id="org.eclipse.rcp.source.feature.group" version="4.5.1.v20150904-0015" />
<unit id="org.eclipse.equinox.sdk.feature.group" version="3.11.1.v20150831-1342" />
<unit id="org.eclipse.help.source.feature.group" version="2.1.1.v20150904-0015" />
<unit id="org.eclipse.equinox.p2.rcp.feature.feature.group" version="1.2.101.v20150826-1318" />
<unit id="org.eclipse.rcp.feature.group" version="4.5.1.v20150904-0015" />
<unit id="org.eclipse.help.feature.group" version="2.1.1.v20150904-0015" />
<repository location="https://download.eclipse.org/eclipse/updates/4.5" />
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.persistence.jpa.feature.group" version="2.6.0.v20150309-bf26070" />
<unit id="org.eclipse.persistence.jpa.source.feature.group" version="2.6.0.v20150309-bf26070" />
<repository location="https://download.eclipse.org/rt/eclipselink/updates/" />
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="org.hamcrest" version="1.1.0.v20090501071000" />
<unit id="org.hamcrest.text" version="1.1.0.v20090501071000" />
<unit id="org.hamcrest.integration" version="1.3.0.v201305210900" />
<unit id="org.junit" version="4.11.0.v201303080030" />
<unit id="org.hamcrest.generator" version="1.3.0.v201305210900" />
<unit id="org.hamcrest.core" version="1.3.0.v201303031735" />
<unit id="org.hamcrest.library" version="1.3.0.v201305281000" />
<unit id="org.hamcrest.core.source" version="1.3.0.v201303031735" />
<unit id="org.hamcrest.generator.source" version="1.3.0.v201305210900" />
<unit id="org.hamcrest.library.source" version="1.3.0.v201305281000" />
<unit id="org.hamcrest.text" version="1.1.0.v20090501071000" />
<unit id="org.hamcrest.integration.source" version="1.3.0.v201305210900" />
<unit id="org.junit.source" version="4.11.0.v201303080030" />
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository/" />
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.ecf.core.ssl.feature.feature.group" version="1.1.0.v20160823-2221" />
<unit id="org.eclipse.ecf.filetransfer.feature.feature.group" version="3.13.2.v20160823-2221" />
<unit id="org.eclipse.ecf.core.feature.feature.group" version="1.3.0.v20160823-2221" />
<unit id="org.eclipse.ecf.filetransfer.httpclient4.feature.feature.group" version="3.13.2.v20160823-2221" />
<unit id="org.eclipse.ecf.remoteservice.rosgi.feature.feature.group" version="1.0.0.v20160823-2221" />
<unit id="org.eclipse.ecf.filetransfer.httpclient4.ssl.feature.feature.group" version="1.1.0.v20160823-2221" />
<unit id="org.eclipse.ecf.filetransfer.httpclient4.source.feature.feature.group" version="3.13.2.v20160823-2221" />
<unit id="org.eclipse.ecf.remoteservice.sdk.source.feature.feature.group" version="3.13.2.v20160823-2221" />
<unit id="org.eclipse.ecf.filetransfer.ssl.source.feature.feature.group" version="1.1.0.v20160823-2221" />
<unit id="org.eclipse.ecf.remoteservice.rosgi.source.feature.feature.group" version="1.0.0.v20160823-2221" />
<unit id="org.eclipse.ecf.remoteservice.feature.feature.group" version="2.3.0.v20160823-2221" />
<unit id="org.eclipse.ecf.filetransfer.httpclient4.ssl.source.feature.feature.group" version="1.1.0.v20160823-2221" />
<unit id="org.eclipse.ecf.remoteservice.source.feature.feature.group" version="2.3.0.v20160823-2221" />
<unit id="org.eclipse.ecf.remoteservice.sdk.feature.feature.group" version="3.13.2.v20160823-2221" />
<unit id="org.eclipse.ecf.filetransfer.ssl.feature.feature.group" version="1.1.0.v20160823-2221" />
<unit id="org.eclipse.ecf.core.source.feature.feature.group" version="1.3.0.v20160823-2221" />
<unit id="org.eclipse.ecf.filetransfer.source.feature.feature.group" version="3.13.2.v20160823-2221" />
<unit id="org.eclipse.ecf.core.ssl.source.feature.feature.group" version="1.1.0.v20160823-2221" />
<repository location="https://download.eclipse.org/rt/ecf/3.13.2/site.p2" />
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="ch.qos.logback.core" version="1.0.7.v20121108-1250" />
<unit id="org.slf4j.log4j" version="1.7.2.v20130115-1340" />
<unit id="org.slf4j.ext" version="1.7.2.v20121108-1250" />
<unit id="org.slf4j.jcl" version="1.7.2.v20130115-1340" />
<unit id="ch.qos.logback.slf4j" version="1.0.7.v20121108-1250" />
<unit id="org.slf4j.jul" version="1.7.2.v20121108-1250" />
<unit id="ch.qos.logback.classic" version="1.0.7.v20121108-1250" />
<unit id="org.slf4j.api" version="1.7.2.v20121108-1250" />
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository/" />
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.gemini.dbaccess.feature.feature.group" version="1.1.0.RELEASE" />
<repository location="https://download.eclipse.org/gemini/updates/dbaccess/1.1.0" />
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="com.custom.support.feature.feature.group" version="1.0.5.201811071810" />
<unit id="com.custom.ecf.websockets.feature.feature.group" version="1.0.0.201512220910" />
<unit id="com.apache.pdfbox.feature.group" version="1.0.0.201505111049" />
<repository location="http://localhost/development/" />
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository" />
<unit id="org.apache.commons.math3" version="3.5.0.v20160301-1110" />
</location>
</locations>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8" />
</target>
and the updated NEW one
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="motordb-5" sequenceNumber="183">
<locations>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.gemini.jpa.feature.feature.group" version="1.2.0.M1"/>
<repository location="https://download.eclipse.org/gemini/jpa/updates"/>
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository/"/>
<unit id="org.hamcrest" version="1.1.0.v20090501071000"/>
<unit id="org.hamcrest.core" version="1.3.0.v201303031735"/>
<unit id="org.hamcrest.core.source" version="1.3.0.v201303031735"/>
<unit id="org.hamcrest.generator" version="1.3.0.v201305210900"/>
<unit id="org.hamcrest.generator.source" version="1.3.0.v201305210900"/>
<unit id="org.hamcrest.integration" version="1.3.0.v201305210900"/>
<unit id="org.hamcrest.integration.source" version="1.3.0.v201305210900"/>
<unit id="org.hamcrest.library" version="1.3.0.v201305281000"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v201305281000"/>
<unit id="org.hamcrest.text" version="1.1.0.v20090501071000"/>
<unit id="org.hamcrest.text" version="1.1.0.v20090501071000"/>
<unit id="org.junit" version="4.11.0.v201303080030"/>
<unit id="org.junit.source" version="4.11.0.v201303080030"/>
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.persistence.jpa.feature.group" version="2.6.0.v20150309-bf26070"/>
<unit id="org.eclipse.persistence.jpa.source.feature.group" version="2.6.0.v20150309-bf26070"/>
<repository location="https://download.eclipse.org/rt/eclipselink/updates/"/>
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.gemini.dbaccess.feature.feature.group" version="1.1.0.RELEASE"/>
<repository location="https://download.eclipse.org/gemini/updates/dbaccess/1.1.0"/>
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="com.easa.motodb.support.feature.feature.group" version="1.0.5.201811071810"/>
<unit id="com.vogelware.ecf.websockets.feature.feature.group" version="1.0.0.201512220910"/>
<unit id="com.apache.pdfbox.feature.group" version="1.0.0.201505111049"/>
<repository location="http://vogelware.com/development/"/>
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<repository location="https://download.eclipse.org/rt/ecf/3.14.7/site.p2"/>
<unit id="org.eclipse.ecf.core.feature.feature.group" version="1.5.500.v20200217-1548"/>
<unit id="org.eclipse.ecf.core.feature.source.feature.group" version="1.5.500.v20200217-1548"/>
<unit id="org.eclipse.ecf.core.ssl.feature.feature.group" version="1.1.300.v20191023-2007"/>
<unit id="org.eclipse.ecf.core.ssl.feature.source.feature.group" version="1.1.300.v20191023-2007"/>
<unit id="org.eclipse.ecf.filetransfer.feature.feature.group" version="3.14.700.v20200217-0016"/>
<unit id="org.eclipse.ecf.filetransfer.feature.source.feature.group" version="3.14.700.v20200217-0016"/>
<unit id="org.eclipse.ecf.filetransfer.httpclient4.feature.feature.group" version="3.14.7.v20200114-1512"/>
<unit id="org.eclipse.ecf.filetransfer.httpclient4.feature.source.feature.group" version="3.14.7.v20200114-1512"/>
<unit id="org.eclipse.ecf.filetransfer.httpclient4.ssl.feature.feature.group" version="1.1.200.v20191024-1546"/>
<unit id="org.eclipse.ecf.filetransfer.httpclient4.ssl.feature.source.feature.group" version="1.1.200.v20191024-1546"/>
<unit id="org.eclipse.ecf.filetransfer.ssl.feature.feature.group" version="1.1.200.v20191024-1546"/>
<unit id="org.eclipse.ecf.filetransfer.ssl.feature.source.feature.group" version="1.1.200.v20191024-1546"/>
<unit id="org.eclipse.ecf.remoteservice.feature.feature.group" version="2.5.102.v20191031-1454"/>
<unit id="org.eclipse.ecf.remoteservice.feature.source.feature.group" version="2.5.102.v20191031-1454"/>
<unit id="org.eclipse.ecf.remoteservice.rosgi.feature.feature.group" version="1.1.2.v20200217-0038"/>
<unit id="org.eclipse.ecf.remoteservice.rosgi.feature.source.feature.group" version="1.1.2.v20200217-0038"/>
<unit id="org.eclipse.ecf.remoteservice.sdk.feature.feature.group" version="3.14.7.v20200217-0120"/>
<unit id="org.eclipse.ecf.remoteservice.sdk.feature.source.feature.group" version="3.14.7.v20200217-0120"/>
<unit id="org.eclipse.ecf.filetransfer.httpclient45.feature.feature.group" version="1.0.300.v20200217-0016"/>
<unit id="org.eclipse.ecf.filetransfer.httpclient45.feature.source.feature.group" version="1.0.300.v20200217-0016"/>
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<repository location="https://download.eclipse.org/eclipse/updates/4.16"/>
<unit id="org.eclipse.emf.common.feature.group" version="2.19.0.v20200324-0932"/>
<unit id="org.eclipse.emf.ecore.feature.group" version="2.22.0.v20200519-1135"/>
<unit id="org.eclipse.equinox.p2.rcp.feature.feature.group" version="1.4.800.v20200602-1138"/>
<unit id="org.eclipse.equinox.sdk.feature.group" version="3.20.200.v20200528-0603"/>
<unit id="org.eclipse.help.feature.group" version="2.3.200.v20200604-0540"/>
<unit id="org.eclipse.help.source.feature.group" version="2.3.200.v20200604-0540"/>
<unit id="org.eclipse.rcp.feature.group" version="4.16.0.v20200604-0951"/>
<unit id="org.eclipse.rcp.source.feature.group" version="4.16.0.v20200604-0951"/>
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository"/>
<unit id="ch.qos.logback.classic" version="1.0.7.v20121108-1250"/>
<unit id="ch.qos.logback.classic" version="1.2.3.v20200428-2012"/>
<unit id="ch.qos.logback.core" version="1.0.7.v20121108-1250"/>
<unit id="ch.qos.logback.core" version="1.2.3.v20200428-2012"/>
<unit id="ch.qos.logback.slf4j" version="1.2.3.v20200428-2012"/>
<unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/>
<unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/>
<unit id="org.slf4j.apis.jcl" version="1.7.30.v20200204-2150"/>
<unit id="org.slf4j.apis.log4j" version="1.7.30.v20200204-2150"/>
<unit id="org.slf4j.bridge.jul" version="1.7.30.v20200204-2150"/>
<unit id="org.slf4j.ext" version="1.7.2.v20121108-1250"/>
<unit id="org.slf4j.ext" version="1.7.30.v20200204-2150"/>
<unit id="org.slf4j.jcl" version="1.7.2.v20130115-1340"/>
<unit id="org.slf4j.jul" version="1.7.2.v20121108-1250"/>
<unit id="org.slf4j.log4j" version="1.7.2.v20130115-1340"/>
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository"/>
<unit id="org.apache.commons.beanutils" version="1.8.0.v201205091237"/>
<unit id="org.apache.commons.collections" version="3.2.2.v201511171945"/>
<unit id="org.apache.commons.net" version="3.2.0.v201305141515"/>
<unit id="org.apache.commons.math3" version="3.5.0.v20190611-1023"/>
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<repository location="https://download.eclipse.org/releases/2020-06"/>
<unit id="javax.xml.bind" version="0.0.0"/>
</location>
</locations>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
</target>
Error when running RCP with new target file
Target Platform State with updated new target file
Excerpt from javax.xml.stream Manifest
Require-Bundle: javax.xml, system.bundle
Bundle-Version: 1.0.1.v201004272200
Export-Package: javax.xml;version="1.0.1"
javax.xml.* in bundle cache directory
Adding the following snippet to your new target definition file should fix this issue (and make <unit id="javax.xml.stream" version="1.0.1.v201004272200"/> obsolete):
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="false" type="InstallableUnit">
<repository location="https://download.eclipse.org/releases/2020-06"/>
<unit id="javax.xml" version="0.0.0"/>
</location>

Tycho cannot download from official p2 repository

I have a Eclipse E4 application that is already build by Tycho. Now we are migrating the application to use Java 12. Herefore we also need to update our target file.
The latest target file looks like:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target includeMode="feature" name="Running Platform">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/nattable/releases/1.5.0/repository/"/>
<unit id="org.eclipse.nebula.widgets.nattable.core.feature.feature.group" version="1.5.0.201703192131"/>
<unit id="org.eclipse.nebula.widgets.nattable.extension.e4.feature.feature.group" version="1.1.0.201703192131"/>
<unit id="org.eclipse.nebula.widgets.nattable.extension.glazedlists.feature.feature.group" version="1.5.0.201703192131"/>
<unit id="org.eclipse.nebula.widgets.nattable.extension.nebula.feature.feature.group" version="1.1.0.201703192131"/>
<unit id="org.eclipse.nebula.widgets.nattable.extension.poi.feature.feature.group" version="1.5.0.201703192131"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/releases/2019-06/"/>
<unit id="org.eclipse.equinox.sdk.feature.group" version="3.18.0.v20190528-1257"/>
<unit id="org.eclipse.platform.sdk" version="4.12.0.I20190605-1800"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/nebula/releases/latest"/>
<unit id="org.eclipse.nebula.widgets.pshelf.css.feature.feature.group" version="1.0.0.201812241324"/>
<unit id="org.eclipse.nebula.widgets.pshelf.feature.feature.group" version="1.0.0.201812241324"/>
</location>
</locations>
<environment>
<arch>x86_64</arch>
<os>win32</os>
<ws>win32</ws>
<nl>en_US</nl>
</environment>
</target>
When we run the build with tycho using Jenkins we are getting following error:
[INFO] Fetching p2.index from http://download.eclipse.org/nattable/releases/1.5.0/repository/
[INFO] Fetching p2.index from http://download.eclipse.org/nattable/releases/1.5.0/repository/
[INFO] Adding repository http://download.eclipse.org/nattable/releases/1.5.0/repository
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2019-06/
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2019-06/
[INFO] Adding repository http://download.eclipse.org/releases/2019-06
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.ecf.provider.filetransfer.httpclient4.SNIAwareHttpClient$1 (file:/C:/Users/PTITDevTools_svc/.m2/repository/org/eclipse/tycho/tycho-bundles-external/1.1.0/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient4_1.1.200.v20170314-0133.jar) to method sun.security.ssl.SSLSocketImpl.setHost(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.eclipse.ecf.provider.filetransfer.httpclient4.SNIAwareHttpClient$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[ERROR] Failed to resolve target definition D:\Software\x64\Jenkins\workspace\ture_ILMV-490-migrate-to-java-12\neon\neon.target: Failed to load p2 metadata repository from location http://download.eclipse.org/releases/2019-06/: Unable to read repository at http://download.eclipse.org/releases/2019-06. Unable to read repository at https://download.eclipse.org/technology/epp/packages/2019-06/content.xml. Connection reset -> [Help 1]
With our old Target file the build was working but the old file was a PDE target file. Can someone tell me why this is failing?
The url of the Eclipse p2 repo was not specific enough.
I changed http://download.eclipse.org/releases/2019-06/ to http://download.eclipse.org/releases/2019-06/201906191000

"Missing requirements" when defining an Eclipse target platform with RAP and Teneo

I created a target file and added the RAP target platform and a local folder with some proprietary bundles. When I tried to add the other dependencies for Teneo and Hibernate as stated in this tutorial, some dependencies for Teneo are not satisfied.
This is my target definition file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?><target name="server.platform" sequenceNumber="222">
<locations>
<location path="<My_bundles_dir>" type="Directory"/>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.rap.examples.feature.feature.group" version="2.3.0.20140602-1108"/>
<unit id="org.eclipse.rap.feature.feature.group" version="2.3.0.20140610-0925"/>
<unit id="org.eclipse.rap.sdk.feature.feature.group" version="2.3.0.20140610-0925"/>
<unit id="org.eclipse.rap.equinox.target.feature.feature.group" version="2.3.0.20140608-1653"/>
<repository location="http://download.eclipse.org/rt/rap/2.3/R-20140610-0925/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.hibernate.feature.group" version="4.1.1.201310261216"/>
<unit id="org.hsqldb.feature.group" version="2.2.8.201310261216"/>
<unit id="com.db4o.feature.group" version="7.4.155.v20120928-1733"/>
<unit id="org.apache.log4j.feature.group" version="1.2.16.201310261216"/>
<unit id="org.dom4j.feature.group" version="1.6.1.201310261216"/>
<unit id="org.apache.commons.logging.feature.group" version="1.1.1.201310261216"/>
<unit id="org.postgresql.feature.group" version="9.0.0.201310261216"/>
<unit id="com.mysql.jdbc.feature.group" version="5.1.11.201310261216"/>
<unit id="javax.persistence.feature.group" version="2.0.1.201310261216"/>
<unit id="com.microsoft.sqlserver.jdbc.feature.group" version="3.0.1301.201310261216"/>
<repository location="http://www.elver.org/eclipse/2.0.0/update"/>
</location>
</locations>
</target>
I'm getting the following error:
Missing requirement: EMF Common UI 2.9.0.v20140519-0339 (org.eclipse.emf.common.ui.feature.group 2.9.0.v20140519-0339) requires 'org.eclipse.ui 0.0.0' but it could not be found
... requires 'org.eclipse.ui 0.0.0' but it could not be found
The problem with your target definition is that you don't specify any p2 repository that contains this dependency. So you e.g. need to add Luna release train repository: http://download.eclipse.org/releases/luna
The PDE editor is not particularly helpful when it comes to adding p2 repositories which are only needed for dependencies. But you can resort to using a text editor to modify the target file. Here is what you need to do to add a p2 repository for adding dependencies:
Copy one of the location lines with type="InstallableUnit" and paste it below the last closing location tag (</location>).
Add the repository, e.g. with
<repository location="http://download.eclipse.org/releases/luna"/>
Add a closing repository tag.
Increment the sequenceNumber attribute in the root element.
Save the file and open it with the Target Definition Editor again. Dependencies to artifacts in the newly added repository can now be resolved.

Eclipse Ant task p2.composite.repository not honoring append=false

I'm using the docs at
http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fp2_repositorytasks.htm
I'm trying to setup a build file like this
<?xml version="1.0" encoding="UTF-8"?><project name="osgi.composite.p2">
<target name="osgi.composite.p2">
<p2.composite.repository>
<repository append="false" location="/d01/osgi/DS_5000_10_0_0" name="DS_5000_10_0_0 Composite"/>
<add>
<repository location="DS_5000_10_0_0.HEAD.1308021100.8500"/>
<repository location="thirdparty"/>
<repository location="e4"/>
<repository location="../nebula/"/>
<repository location="../integration/FUSION_DS_5000_8_3_0_SSO/"/>
</add>
</p2.composite.repository>
</target>
</project>
to overwrite the P2 composite index by running
/d01/sandboxes/baron/eclipse/4.3/eclipse -nosplash -application org.eclipse.ant.core.antRunner -buildfile composite.p2-8500.xml osgi.composite.p2
And instead of creating a new composite index it's appending the new entries listed in the build file to the compositeContent.jar, but properly replacing the entries in the compositeArtifacts.jar.

Which feature to include for bundle org.junit

I'm refactoring my RCP app, and I'm going to use tycho as building system.
In the process, I had to rewrite my target platform so to depend on online repositories. Currently, my target is something like:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.6"?>
<target name="MyRcpApp" sequenceNumber="12">
<locations>
<location includeAllPlatforms="false" includeMode="planner" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.rcp.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0" />
<repository location="http://download.eclipse.org/releases/indigo/"/>
</location>
</locations>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
</target>
However, this target does not provide the bundle for junit tests (org.junit)... hence my eclipse has a lot of errors (due to the missing junit) and my build fails.
Does somebody know which unit should I include? (or, better, how can I get the list of all the unit available at a given repository?)
you will need the JDT feature (unfortunately there is no smaller feature I know of which includes junit)
<unit id="org.eclipse.jdt.feature.group" version="0.0.0"/>
Another option is to include single bundle IUs (the .target file format supports this but the target editor UI does not). In this case you need to make sure that transitive dependencies are also added. Try adding
<unit id="org.junit" version="0.0.0"/>
<unit id="org.hamcrest.core" version="0.0.0"/>