Community
Participate
Working Groups
I'm building a custom RCP. It used to work fine up until about 2 months ago, but now it fails. Since my custom RCP is based on the Incubator RCP, I've tried building it. However, it also fails, and I'm assuming that it is the same underlying issue. Steps using master (TC: 6463d292, TC Incubator: a577af89): ``` cd org.eclipse.tracecompass/ mvn clean install -DskipTests=true -e -X cd .. cd org.eclipse.tracecompass.incubator/ mvn clean install -DskipTests=true -e -X ``` Everything works fine for TC. Building/installing the TC Incubator works for everything except the RCP. Relevant part of the error message: ``` Installing org.eclipse.tracecompass.incubator.rcp 0.3.0.202211071742. Installing org.eclipse.tracecompass.jsontrace.feature.group 8.1.0.202211071709. Installing org.eclipse.tracecompass.rcp.feature.group 8.1.0.202211071709. Installing org.eclipse.tracecompass.incubator.rcp.feature.group 0.3.0.202211071742. Installing org.eclipse.tracecompass.tmf.cli.feature.group 8.1.0.202211071709. Installing org.eclipse.tracecompass.incubator.filters.feature.group 0.3.0.202211071742. Installing org.eclipse.tracecompass.incubator.scripting.feature.group 0.3.0.202211071742. Installing org.eclipse.tracecompass.incubator.scripting.javascript.feature.group 0.3.0.202211071742. Installing org.eclipse.tracecompass.incubator.scripting.python.feature.group 0.3.0.202211071742. Installation failed. Cannot complete the install because one or more required items could not be found. Software being installed: Trace Compass Scripting (Incubation) 0.3.0.202211071742 (org.eclipse.tracecompass.incubator.scripting.feature.group 0.3.0.202211071742) Missing requirement: Trace Compass State System Core Plug-in 5.2.0.202211071709 (org.eclipse.tracecompass.statesystem.core 5.2.0.202211071709) requires 'java.package; com.google.gson 0.0.0' but it could not be found Cannot satisfy dependency: From: Trace Compass Scripting (Incubation) 0.3.0.202211071742 (org.eclipse.tracecompass.incubator.scripting.feature.group 0.3.0.202211071742) To: org.eclipse.equinox.p2.iu; org.eclipse.tracecompass.statesystem.core 0.0.0 ... [INFO] Trace Compass Incubator RCP Product 0.3.0-SNAPSHOT . FAILURE [ 48.363 s] ``` One interesting thing to note is that I do not get this error when I delete the contents of my `$HOME/.m2/repository` directory and build/install *only* the Incubator (and thus rely on official TC packages). However, I'm not sure what to do with this possible clue, as I don't have much experience with the build/packaging side.
Which target definition do you use? There has been updates to the tracecompass-incubator-master.target after the Trace Compass 8.1.0 release. Make sure that Trace Compass baseline, Trace Compass incubator and your custom RCP versions are align.
> Which target definition do you use? I'm not sure what answer to give here. In the example I gave above, I'm simply building from master. Do I have to do anything other than the `mvn clean install ...` commands to get it to build properly?
I think this means I'm using tracecompass-e4.25 for TC and tracecompass-incubator-master for the Incubator. I also tried to change tracecompass-e4.25 so that it is equal to tracecompass-incubator-master, but that didn't work. I assumed that building the Incubator RCP using TC and TC Incubator @ master (as-is) would work. I cannot find any documentation about it.
First of all, if you want to build the incubator RCP, you don't need to build Trace Compass mainline before. The incubator build will download the Trace Compass features from the corresponding trace compass update site. In fact, sometimes having Trace Compass built before can interfere with the incubator build, if the trace compass artifacts built locally and the referenced ones from the incubator target are not the same version. If such a failure happens I usually clear the maven reactor cache in ~/.m2/repository and build the incubator again. About the target definition, when building the incubator from master, the following target definition is used: ./common/org.eclipse.tracecompass.incubator.target/tracecompass-incubator-master.target This file defines all the dependencies and version to be used for the incubator build. About your custom RCP, I don't know how your custom repository is structured. If you have a custom target definition in your custom repository, make sure it is aligned with the incubator target definition.
> In fact, sometimes having Trace Compass built before can interfere with the incubator build, if the trace compass artifacts built locally and the referenced ones from the incubator target are not the same version. I see. That is unfortunate, because I need to re-build Trace Compass mainline since I need to apply a patch (while waiting for it to get merged upstream). Is there any way I can build TC mainline the same way it is built for the update site so that I can use it for my custom RCP? If this is somehow possible, it would be great to document it so that people like me (who assumed this would work out-of-the-box) don't get weird surprises and actually have a documented way to do this! > About your custom RCP, I don't know how your custom repository is structured. If you have a custom target definition in your custom repository, make sure it is aligned with the incubator target definition. I'll make sure they're aligned.
(In reply to Christophe Bedard from comment #5) > > In fact, sometimes having Trace Compass built before can interfere with the incubator build, if the trace compass artifacts built locally and the referenced ones from the incubator target are not the same version. > > I see. That is unfortunate, because I need to re-build Trace Compass > mainline since I need to apply a patch (while waiting for it to get merged > upstream). > > Is there any way I can build TC mainline the same way it is built for the > update site so that I can use it for my custom RCP? If this is somehow > possible, it would be great to document it so that people like me (who > assumed this would work out-of-the-box) don't get weird surprises and > actually have a documented way to do this! > Yes, there is a way to do that. You can build Trace Compass on your laptop. This will create the Trace Compass and RCP update sites. In the incubator target as well as your custom target definition, you need to specify this local update sites instead the ones at Eclipse.org. Here are the update sites: [1] org.eclipse.tracecompass/releng/org.eclipse.tracecompass.releng-site/target/repository [2] org.eclipse.tracecompass/rcp/org.eclipse.tracecompass.rcp.product/target/repository In the target definition you can reference them with using file:/ URLs Please note if you change the incubator code as well, then you need to repeat the same steps with the incubator update sites built locally.
I get this maven build error locally in Incubator when trying the above out. There must be incompatibilities when trying to use a locally built master version of TC core within Incubator's own master version. The latter currently pins TC version 4.24, which is older than master indeed. I don't know how to work around this; do you? [ERROR] Cannot resolve target definition: [ERROR] Software being installed: org.eclipse.tracecompass.rcp.feature.group 8.1.0.202211141935 [ERROR] Software being installed: org.eclipse.xsd 2.18.0.v20220312-1031 [ERROR] Only one of the following can be installed at once: [org.eclipse.xsd 2.18.0.v20200917-0747, org.eclipse.xsd 2.18.0.v20220312-1031, org.eclipse.xsd 2.18.0.v20220616-0915] [ERROR] Cannot satisfy dependency: org.eclipse.tracecompass.rcp.feature.group 8.1.0.202211141935 depends on: org.eclipse.equinox.p2.iu; org.eclipse.xsd [2.18.0.v20220616-0915,2.18.0.v20220616-0915]
I haven't been able to find a fix yet. I tried changing the Incubator's target platform file to point to my local TC mainline update site (using file:/ and many other variations), but Maven didn't recognize it.
> There must be incompatibilities when trying to use a locally built master version of TC core within Incubator's own master version. The latter currently pins TC version 4.24, which is older than master indeed I was however indeed able to build the Incubator RCP from source after building mainline TC from source without relying on my local update site, which I wasn't able to do before. I changed TC mainline to 4.24 as follows: diff --git a/org.eclipse.tracecompass/pom.xml b/org.eclipse.tracecompass/pom.xml index 791f532315..03f8c38e86 100644 --- a/org.eclipse.tracecompass/pom.xml +++ b/org.eclipse.tracecompass/pom.xml @@ -57,7 +57,7 @@ <tycho-use-project-settings>true</tycho-use-project-settings> <tycho.scmUrl>scm:git:git://git.eclipse.org/gitroot/tracecompass/org.eclipse.tracecompass.git</tycho.scmUrl> <cbi-plugins.version>1.3.2</cbi-plugins.version> - <target-platform>tracecompass-e4.25</target-platform> + <target-platform>tracecompass-e4.24</target-platform> <help-docs-eclipserun-repo>http://download.eclipse.org/eclipse/updates/4.20</help-docs-eclipserun-repo> <rcptt-version>2.5.3</rcptt-version> Seems like the Incubator should be aligned on mainline/4.25.
> Seems like the Incubator should be aligned on mainline/4.25 We could not align the incubator to mainline e4.25 because there was a breaking change in the webtools dependencies that prevented that. So, for the time being and until 4.26 release, the incubator stayed on e4.24. We provided a fix for webtools so that for 4.26 we can uplift mainline and incubator to e4.26. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=580775 for more details.
I see, thanks for the explanation. That means that building locally and relying on packages from the local .m2 repository instead of the local update sites should work again out-of-the-box in the future, correct? If so, I think we can close this issue.
It works also right now. You just have to build with the correct target files and make sure that you update the target files with local updates sites that contain your specific changes.
> It works also right now. You just have to build with the correct target files Indeed, but this wasn't obvious to me; I just assumed that it would work out-of-the-box. With your explanation, it makes sense, though. > and make sure that you update the target files with local updates sites that contain your specific changes. I personally wasn't able to change the update site to point to a local directory (like file:/).
(In reply to Christophe Bedard from comment #13) > > It works also right now. You just have to build with the correct target files > > Indeed, but this wasn't obvious to me; I just assumed that it would work > out-of-the-box. With your explanation, it makes sense, though. > No, it's not obvious. I also struggle, when I need to build other Eclipse projects. > > and make sure that you update the target files with local updates sites that contain your specific changes. > > I personally wasn't able to change the update site to point to a local > directory (like file:/). Can you try it with two slashes (like file://)?
What I tried locally (only) to some successful extent was this syntax [3,4]: [3] <repository location="file:///home/myself/git/org.eclipse.tracecompass/releng/org.eclipse.tracecompass.releng-site/target/repository/"/> [4] <repository location="file:///home/myself/git/org.eclipse.tracecompass/rcp/org.eclipse.tracecompass.rcp.product/target/repository/"/>
I swear I tried file:/home, file://home and file:///home, and none of them worked. That last one seems to work now, though, thank you!