-
Notifications
You must be signed in to change notification settings - Fork 73
Move to Maven/Tycho for projects and build infrastructure #1992
Comments
@cdietrich @szarnekow I'm "harmonizing" also xtext-eclipse, which was already based on Tycho. I'm getting failures in this test public class ParallelBuildEnabledTest {
@Test
public void testIsParallelBuildEnabledInWorkspace() {
int maxConcurrentProjectBuilds = new ScopedPreferenceStore(InstanceScope.INSTANCE, ResourcesPlugin.PI_RESOURCES).getInt("maxConcurrentBuilds");
assertEquals("parallel build was not enabled", 8, maxConcurrentProjectBuilds);
}
@Test
public void testBuilderSchedulingRuleEnabledInWorkspace() {
String schedulingRule = new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID).getString(XtextBuilder.BuilderPreferences.PREF_SCHEDULING_RULE);
assertEquals("non-default scheduling rule was not enabled", SchedulingOption.ALL_XTEXT_PROJECTS.name(), schedulingRule);
}
} The first one fails with
The second one with:
They fail the same way both from Eclipse and from the build. I don't think I touched anything special to make them fail. |
releng/org.eclipse.xtext.tycho.tests.parent/pluginCustomization.ini |
Right! that was the curlprit: I changed the directory of tycho parent tests! I updated the path and it works. |
There's another small problem I'm facing while harmonizing the build. Looks like in this project the dev-bom is kind of disturbing. In the parent POM I'm importing it (in the master version xtext-eclipse never uses the BOM): <dependencyManagement>
<dependencies>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>xtext-dev-bom</artifactId>
<!--
TODO: update it
The dev BOM should be in the same Git repository of this one
-->
<version>${xtext-current-release-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement> where <xtext-current-release-version>2.30.0.M1</xtext-current-release-version> when building I'm activating the profile <xtext-current-release-version>${project.version}</xtext-current-release-version> This does not work for the xtext.logging fragment: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.xtext</groupId>
<artifactId>xtext-eclipse</artifactId>
<version>2.30.0-SNAPSHOT</version>
</parent>
<packaging>eclipse-plugin</packaging>
<artifactId>org.eclipse.xtext.logging</artifactId>
<version>1.2.24-SNAPSHOT</version>
...
</project> because it would try to download the dev-bom with version It's not a big issue, because in xtext-eclipse the bom was not used before, and in this repository I can remove it. But just to leave a note/reminder here that when merging everything, we'll have to have a different parent ONLY for artifacts that must be released to central and put the bom import only in that parent. |
the dev bom should be project.version. why cant this be downloaded? |
the xtext-current-release-version var name highly disturbs me. is it bootstrrap version for xtend or something else? |
i guess you can redefine the variable and then we fix the adapt versions script |
see the contents of In all git repositories but xtext-lib, the version of the bom is project.version only when using the latest snapshots from jenkins, otherwise, it must be the latest released version. The xtext-current-release-version is a temporary property to refer to the currently latest released version; this is overridden in the profile using the latest snapshots. What I'm saying is that the bom cannot be used like that in the presence of xtext.logging. As I said, in your current master, xtext-eclipse does not use the bom. |
no we need to use current-version-SNAPSHOT everywhere for the bom. otherwise we will never be able to change the bom ever again |
googling also give hints on |
As I said, it's a temporary workaround for me that allows me to test locally against latest released versions of Maven artifacts. But don't worry, in the CI (JIRO) we always use latest snapshots by enabling the profile (as it was done before): <!--
This is the version of the currently released latest version that we
use during the Maven builds for artifacts that are not in this Git repository
(and thus, not in this Maven reactor).
It is redefined in the profile "useJenkinsSnapshots" to take the same version
of this project.
-->
<xtext-current-release-version>2.30.0.M1</xtext-current-release-version>
<!--
This is the version of the currently released latest version of the xtend-maven-plugin that we
use during the Maven builds for processing Xtend files.
-->
<xtend-maven-plugin-version>2.30.0.M1</xtend-maven-plugin-version>
...
<profiles>
<profile>
<id>useJenkinsSnapshots</id>
<properties>
<!-- redefines the property for versions of artifacts not in this Git repository,
so that it takes the same snapshot version of this project. -->
<xtext-current-release-version>${project.version}</xtext-current-release-version>
</properties>
<repositories>
<repository> Don't worry, it was more a note to myself for the merging. probably revision would not help. |
but then this problem will be there tooo? but it also means we are testing bad. |
No: it's just a matter of having a parent POM that is used for bundle projects (not importing the BOM) and another parent POM, which inherits from the first one, used for Maven projects: this latter imports the BOM. |
see my update of privoous comment. |
Sorry, I'm not following. Maybe your answers are too interleaved my answers. |
we need to make use of the snapshot dev bom. and also consume the snapshot version of upstream artifacts |
I still haven't worked on In |
yes and no. we use it in gradle and in eclipse we build with old tycho that does not do the "look at maven crap" |
If you want the dev bom in xtext-eclipse now (I repeat, it is not being used in master): the only fast solution I can think of is to override the dev bom import in xtext.logging. By the way, why doesn't that project use the same version as the other ones? |
i thing we need some moderation here. cc @szarnekow i read your proposal is to do a repo merge and then do a milestone
the version of fragment is the version of the host. i cannot tell you why |
Actually, what I'm working on is try to create a p2 repository with signed contents with the SPLITTED repo, so that we can try to do a fake/milestone/whatever release with the SPLITTED repo. Isn't that what you asked for? |
yes. but therefore i want stuff to be pulled from upstream snapshots/repos in jenkins and not the previously built milestone. |
from my findings and understanding, tycho explodes due to the way the Xtext p2 repo is currently being built right now with the strange reference to local-repo (or something), that is, due to the not completely correct metadata. This should go away once the p2 repo is built correctly. Anyway, I'll find a way to circumvent the problem of xtext.logging and re-introduce the bom also in xtext-eclipse. |
naive question: |
Actually, I'm checking that property right now :) |
Looks like it's working: it's just a matter of redefining that property in xtext.loggin and we can import the BOM also in xtext-eclipse: LorenzoBettini@f035c3a#diff-ff2da789bfe064325263bcdc949bf700f7435c2337026426311ccc462a67b8ffR13 |
with repo merge this is done |
See also eclipse/xtext-lib#499 and eclipse/xtext-core#2052 eclipse/xtext-extras#858 eclipse/xtext-xtend#1445
The text was updated successfully, but these errors were encountered: