Skip to content

Commit

Permalink
maven tycho (eclipse-xtext#515)
Browse files Browse the repository at this point in the history
* xtext-dev-bom as a Maven project

* parent POM with starting target platform

* ignore target

* .xbase.lib compiles

* .xbase.lib Maven/Tycho project

* build .xbase.lib

* fixed version in BOM

* GitHub Actions workflow

* xtend.lib.macro compiles

* .xtend.lib.macro as Maven/Tycho project

* build .xtend.lib.macro

* .xtend.lib compiles

* .xtend.lib as Maven/Tycho project

* build .xtend.lib

* guava-testlib in TP as Maven artifact

* .xbase.lib.tests compiles

* .xtend.lib.tests as Maven/Tycho project

* build xbase.lib.tests, tests are green

* xtend.lib.tests compiles

* xtend.lib.tests Maven/Tycho project

* build xtend.lib.tests, tests are green

* xbase.lib.gwt removed gradle nature

* added POM to xbase.lib.gwt

taking inspiration from
https://github.com/eclipse/xtext/tree/v2.10.0/plugins/org.eclipse.xtext.xbase.lib.gwt

* xbase.lib.gwt as Maven/tycho project

* xbase.lib.gwt removed gradle nature

* xtend.lib.gwt as Maven/tycho project

* .xtend.lib.gwt compiles as Maven project

* fixed xtend.lib.gwt.test

* build xbase.lib.feature

* build xtend.lib.feature

* added names to features' POMs

* p2 repository

* removed old releng directory

* updated Jenkins build

* removed features from the p2 repository

* Revert "removed features from the p2 repository"

This reverts commit 8f2a288c895f2f8f8d13c897b2906aa0c8b57d92.

* updated project configuration

* changed groupId of features

Because they have the same artifactId of bundles

* xbase.lib.tests is a pure Maven project

No need to have guava-testlib in the target platform, since we consume
it as a Maven dependency

* put comment in the right place in the POM

* eclipse-jarsigner-plugin

* eclipse-sign profile in Jenkins

* separate projects for p2 and maven

* harmonized parent with xtext-core parent

* harmonized parent with xtext-extras parent

* harmonized parent with xtext-xtend parent

* prepared sonatype-oss-release profile

* distributionManagement

* prepared Jenkinsfile for Maven deploy

* skipTests in profile sonatype-oss-release

* reference to Maven releng project

* distributionManagement in dev-bom

because it does not inherit from the parent

* updated distributionManagement release repository

* removed wrong configuration option of javadoc plugin

* eclipse-sign also when deploying Maven artifacts

* renamed maven aggregator artifactId

* removed blank line

* removed organization for Sebastian

* removed dep com.google.code.findbugs:jsr305

* versions-maven-plugin

* a profile mentioning releng children

* removed old xtext-current-release-version

* xtend-maven-plugin-version 2.30.0.M2

* harmonized parent POM with other projects

* harmonized Jenkins script with other projects

separate maven build, tycho test and tycho sign

* coinfigured maven-jar-plugin

* configured maven-source-plugin

* set execution bit

* skip main "compile" goal of xtend-maven-plugin

to avoid generated sources to be considered as main sources by the
maven-compiler-plugin

* profile buildP2Repository

* configured exec-maven-plugin

* added source bundles in features

As it used to be in the original

* update to lsp4j 0.20.0

* disable p2 sign in Jenkinsfile

* bumped 2.31.0 in POMs

* xtend-maven-plugin-version 2.30.0

* updated other eclipse metadata to 2.31.0

* removed gradle files
  • Loading branch information
LorenzoBettini authored Mar 9, 2023
1 parent 8b723c9 commit acae65b
Show file tree
Hide file tree
Showing 127 changed files with 2,398 additions and 1,700 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/clear-all-caches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Clear all caches

on:
workflow_dispatch:

permissions:
actions: write

jobs:
clear-all-caches:
runs-on: ubuntu-latest
steps:
- name: Clear cache
uses: actions/github-script@v6
with:
script: |
console.log("About to clear")
const caches = await github.rest.actions.getActionsCacheList({
owner: context.repo.owner,
repo: context.repo.repo,
})
for (const cache of caches.data.actions_caches) {
console.log(cache)
github.rest.actions.deleteActionsCacheById({
owner: context.repo.owner,
repo: context.repo.repo,
cache_id: cache.id,
})
}
console.log("Clear completed")
62 changes: 62 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build

on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'

jobs:
build:
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
fail-fast: false
runs-on: ${{ matrix.os }}

steps:
- name: 'Check out repository'
uses: actions/checkout@v3

- name: 'Set up Java'
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'

- name: 'Cache Maven packages'
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/*.target') }}
restore-keys: ${{ runner.os }}-m2

- name: 'Build and test'
run: mvn clean verify -PuseJenkinsSnapshots
working-directory: org.eclipse.xtext.p2.releng

build-maven-artifacts:
runs-on: ubuntu-latest

steps:
- name: 'Check out repository'
uses: actions/checkout@v3

- name: 'Set up Java'
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'

- name: 'Cache Maven packages'
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', '**/*.target') }}
restore-keys: ${{ runner.os }}-maven

- name: Build Maven artifacts
run: mvn clean verify -PuseJenkinsSnapshots
working-directory: org.eclipse.xtext.maven.releng
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ build/
*.xtendbin
org.eclipse.buildship.core.prefs
.DS_Store
target
5 changes: 2 additions & 3 deletions .project
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>xtext-lib</name>
<comment>Project xtext-lib created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
<filteredResources>
<filter>
Expand Down
2 changes: 1 addition & 1 deletion .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
encoding/<project>=ISO-8859-1
4 changes: 4 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
18 changes: 0 additions & 18 deletions 1-gradle-build.sh

This file was deleted.

12 changes: 6 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@ pipeline {
}
}

stage('Gradle Build') {
stage('Maven Build') {
steps {
sh './1-gradle-build.sh'
sh './maven-build.sh'
}
}
stage('Maven Build') {

stage('Maven Tycho Build and Test') {
steps {
sh './2-maven-build.sh'
sh './tycho-test.sh'
}
}
}

post {
always {
junit testResults: '**/build/test-results/test/*.xml'
junit testResults: '**/target/surefire-reports/*.xml'
}
success {
archiveArtifacts artifacts: 'build/**'
Expand Down
52 changes: 0 additions & 52 deletions build.gradle

This file was deleted.

1 change: 0 additions & 1 deletion gradle.properties

This file was deleted.

37 changes: 0 additions & 37 deletions gradle/bootstrap-setup.gradle

This file was deleted.

108 changes: 0 additions & 108 deletions gradle/developers.gradle

This file was deleted.

Loading

0 comments on commit acae65b

Please sign in to comment.