Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Move to Maven/Tycho for projects and build infrastructure #499

Closed
LorenzoBettini opened this issue Jan 17, 2023 · 22 comments
Closed

Move to Maven/Tycho for projects and build infrastructure #499

LorenzoBettini opened this issue Jan 17, 2023 · 22 comments
Labels
Milestone

Comments

@LorenzoBettini
Copy link
Contributor

Similar to eclipse/xtext-core#2052

@LorenzoBettini
Copy link
Contributor Author

I started working on that in my fork, this branch https://github.com/LorenzoBettini/xtext-lib/tree/lb_499_maven_tycho

@LorenzoBettini
Copy link
Contributor Author

@cdietrich do you know if com.google.guava:guava-testlib is available somewhere as a p2 bundle?

@cdietrich
Copy link
Member

no, i have zero clue. can you check what it is used for?

@LorenzoBettini
Copy link
Contributor Author

It's used in org.eclipse.xtext.xbase.lib.tests which is not even an Eclipse plug-in project (no MANIFEST). However, by using the new mechanism of adding Maven deps in the .target file I solved the problem and the code compiles (tests are also green):

		<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="generate" type="Maven">
			<dependencies>
				<dependency>
					<groupId>com.google.guava</groupId>
					<artifactId>guava-testlib</artifactId>
					<version>30.1-jre</version>
					<type>jar</type>
				</dependency>
			</dependencies>
			<instructions><![CDATA[
Bundle-Name:           Bundle derived from maven artifact ${mvnGroupId}:${mvnArtifactId}:${mvnVersion}
version:               ${version_cleanup;${mvnVersion}}
Bundle-SymbolicName:   ${mvnGroupId}.${mvnArtifactId}
Bundle-Version:        ${version}
Import-Package:        *;resolution:=optional
Export-Package:        *;version="${version}";-noimport:=true
DynamicImport-Package: *
]]></instructions>
		</location>

@cdietrich
Copy link
Member

i assume which of the collections asserts therein are actually used and if we can replace it with something else

@LorenzoBettini
Copy link
Contributor Author

import com.google.common.collect.testing.MapTestSuiteBuilder;
import com.google.common.collect.testing.TestStringMapGenerator;
import com.google.common.collect.testing.features.CollectionFeature;
import com.google.common.collect.testing.features.CollectionSize;
import com.google.common.collect.testing.features.MapFeature;

in org.eclipse.xtext.xbase.tests.lib.MapExtensionsTest

@cdietrich
Copy link
Member

ok, then i guess we can try if maven dep works

@LorenzoBettini
Copy link
Contributor Author

It's also used extensively in the test suites (I seem to understand that it executes tests in that very dependency).

@LorenzoBettini
Copy link
Contributor Author

@cdietrich some updates: I still have to deal with gwt. Everything else builds and tests are green!

@LorenzoBettini
Copy link
Contributor Author

@cdietrich concerning GWT: I have no idea of what to do with those projects (I seem to recall what GWT is but I have only a very primordial idea)...

@cdietrich
Copy link
Member

am not sure if we want to keep it or not
unfortunately nobody has knowledge
see eclipse/xtext#2241
@mbudnick are you still using xtend+gwt and do you have experience with gwt and maven?

@LorenzoBettini
Copy link
Contributor Author

I mean: I can try to create the packages but I have no idea of how they should look like (of course there are tests and I can run them).

Moreover, there's dependency in the gradle file api "com.google.guava:guava-gwt" while in the MANIFEST we simply have com.google.guava... are they the same?

@cdietrich
Copy link
Member

you need to check the binary files i guess

@cdietrich
Copy link
Member

@LorenzoBettini
Copy link
Contributor Author

yes, that put me on the right track.
All projects compile, and all tests are green (including the xtend.lib.gwt.test)!!! :)

@LorenzoBettini
Copy link
Contributor Author

@cdietrich as I said in my previous comment, everything compiles, builds and tests are green (including gwt).

I seem to understand that gwt stuff must NOT be in the update site, am I right? Currently, there are still two features for gwt to be included in the p2 repository.

@cdietrich
Copy link
Member

yes it looks like they are published to maven only

@mbudnick
Copy link
Contributor

@mbudnick are you still using xtend+gwt and do you have experience with gwt and maven?

@cdietrich yes, we use org.eclipse.xtext:org.eclipse.xtext.xbase.lib.gwt from Maven Central Repository.
If there is a milestone-version or a snapshot-version in an other respository I can test it.

@cdietrich
Copy link
Member

ok, so as soon as @LorenzoBettini moves this to our jenkins we will have a maven repo to test

@LorenzoBettini
Copy link
Contributor Author

@cdietrich @mbudnick I've just pushed my branch and Jenkins built it successfully (I'll create a PR in a minute).

That's the generated Maven repository generated from my branch: https://ci.eclipse.org/xtext/job/xtext-lib/job/lb_499_maven_tycho/lastSuccessfulBuild/artifact/build/maven-repository/

@mbudnick
Copy link
Contributor

mbudnick commented Jan 18, 2023

My gwt-app has no problem with 2.30.0-SNAPSHOT.

@cdietrich
Copy link
Member

done

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants