Skip to content

Commit

Permalink
Merge pull request #69 from riseclipse/develop
Browse files Browse the repository at this point in the history
Tell Tycho to keep parents in child poms
  • Loading branch information
marcadetd authored Nov 9, 2023
2 parents d9ccf3e + 98cc552 commit 5c21062
Show file tree
Hide file tree
Showing 12 changed files with 114 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Shared-Pre-Release-GH.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *************************************************************************
# ** Copyright (c) 2022 CentraleSupélec & EDF.
# ** Copyright (c) 2022-23 CentraleSupélec & EDF.
# ** All rights reserved. This program and the accompanying materials
# ** are made available under the terms of the Eclipse Public License v2.0
# ** which accompanies this distribution, and is available at
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Shared-Prepare-Next-Dev-Tools.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *************************************************************************
# ** Copyright (c) 2022 CentraleSupélec & EDF.
# ** Copyright (c) 2022-23 CentraleSupélec & EDF.
# ** All rights reserved. This program and the accompanying materials
# ** are made available under the terms of the Eclipse Public License v2.0
# ** which accompanies this distribution, and is available at
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Shared-Release-On-DockerHub.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *************************************************************************
# ** Copyright (c) 2022 CentraleSupélec & EDF.
# ** Copyright (c) 2022-23 CentraleSupélec & EDF.
# ** All rights reserved. This program and the accompanying materials
# ** are made available under the terms of the Eclipse Public License v2.0
# ** which accompanies this distribution, and is available at
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Shared-Release-On-Maven-Central.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *************************************************************************
# ** Copyright (c) 2022 CentraleSupélec & EDF.
# ** Copyright (c) 2022-23 CentraleSupélec & EDF.
# ** All rights reserved. This program and the accompanying materials
# ** are made available under the terms of the Eclipse Public License v2.0
# ** which accompanies this distribution, and is available at
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Shared-Rollback-If-Failure.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *************************************************************************
# ** Copyright (c) 2022 CentraleSupélec & EDF.
# ** Copyright (c) 2022-23 CentraleSupélec & EDF.
# ** All rights reserved. This program and the accompanying materials
# ** are made available under the terms of the Eclipse Public License v2.0
# ** which accompanies this distribution, and is available at
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Shared-Verify-Components.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *************************************************************************
# ** Copyright (c) 2022 CentraleSupélec & EDF.
# ** Copyright (c) 2022-23 CentraleSupélec & EDF.
# ** All rights reserved. This program and the accompanying materials
# ** are made available under the terms of the Eclipse Public License v2.0
# ** which accompanies this distribution, and is available at
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
run: |
cd ${{ github.event.repository.name }}
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.organization=riseclipse \
-Dsonar.host.url=http://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_TOKEN }} \
-Dsonar.host.url=http://sonarcloud.io -Dsonar.token=${{ secrets.SONAR_TOKEN }} \
-Dsonar.projectKey=riseclipse_${{ github.event.repository.name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/Shared-Verify-Tools.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *************************************************************************
# ** Copyright (c) 2022 CentraleSupélec & EDF.
# ** Copyright (c) 2022-23 CentraleSupélec & EDF.
# ** All rights reserved. This program and the accompanying materials
# ** are made available under the terms of the Eclipse Public License v2.0
# ** which accompanies this distribution, and is available at
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
----
Copyright (c) 2023 CentraleSupélec & EDF.

All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-v20.html

This file is part of the RiseClipse tool

**Contributors:**
* Computer Science Department, CentraleSupélec
* EDF R&D

**Contacts:**
* [email protected]
* [email protected]

**Web site:**
* https://riseclipse.github.io/
----

## Scenario

This scenario corresponds to the building and deployment of RiseClipse components and tools on GitHub. It starts from the state after `BuildingOnLocalMachine`.



## Process

- Edit `riseclipse-developer/fr.centralesupelec.edf.riseclipse.developer.maven/pom.xml`:
- Update `project.properties.*`:
- Update `.riseclipse-target-platform-version` with `project.version` **without** `-SNAPSHOT`

- Edit `riseclipse-developer/fr.centralesupelec.edf.riseclipse.developer.p2_to_m2/pom.xml`
- Update `project.version` and `project.parent.version` to be the same as `project.version` from `fr.centralesupelec.edf.riseclipse.developer.maven/pom.xml` (**without** `-SNAPSHOT`)
- The rationale for this is: `p2_to_m2` will not be deployed on Maven Central, but it will be used when building the validators, and the version used for this will be obtained from the `riseclipse-developer/fr.centralesupelec.edf.riseclipse.developer.maven/pom.xml` deployed on Maven Central

- Commit to `develop`

- Push to GitHub

- Merge `develop` to `master`

- Run workflow `Release on OSSRH and Maven Central`

- Log in at [https://s01.oss.sonatype.org/](https://s01.oss.sonatype.org/) with the `riseclipse` account

- Select **Staging Repositories**, then the `iogithubriseclipse-XXXX` repository (using **Refresh** may help)

- Verify that everything seems OK, then **Close** and **Release**

- Merge PR **prepare for next development iteration after release** on GitHub, deleting the `do_release` branch

- For the next builds to succeed, the new version of `riseclipse-developer` must be available on [Maven Central](https://central.sonatype.com/artifact/io.github.riseclipse/riseclipse-developer/versions)

- Edit `riseclipse-main/pom.xml`:
- Update `project.parent.version` to be the same as `project.version` from `fr.centralesupelec.edf.riseclipse.developer.maven/pom.xml` (**without** `-SNAPSHOT`)

- Commit to `develop` and continue like above



Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ This file is part of the RiseClipse tool

## Scenario

This scenario corresponds to the introduction of new versions of the tools used. It shows how to build the SCL validator on a machine to test it before building and deploying this update on GitHub.
This scenario corresponds to the introduction of new versions of the tools used by RiseClipse. It shows how to build the SCL validator on a machine to test it before building and deploying this update on GitHub.



## Needed Tools

- Install a JDK 17 or higher ([here for example](https://adoptium.net/))
- JDK 17 or higher ([here for example](https://adoptium.net/))

- Install [**Maven**](https://maven.apache.org)
- [**Maven**](https://maven.apache.org)

- Install latest [**Eclipse IDE for Java Developers**](https://eclipseide.org)
- [**Eclipse IDE for Java Developers**](https://eclipseide.org)

- Install from the corresponding Eclipse update site:
- **Eclipse Plug-in Development Environment**
Expand All @@ -43,11 +43,12 @@ This scenario corresponds to the introduction of new versions of the tools used.
- Install the **CBI p2 Aggregator Tools** using the `https://download.eclipse.org/cbi/updates/p2-aggregator/tools/nightly` update site


- clone projects
## Process

- Clone projects `riseclipse-developer`, `riseclipse-main`, `riseclipse-validator-ocl`, `riseclipse-metamodel-scl2003`, `riseclipse-metamodel-nsd2016`, import in the Eclipse workspace

- Create a branch `develop` for project `riseclipse-developer`

- Import `riseclipse-developper` in the Eclipse workspace
- Edit `riseclipse-developer/fr.centralesupelec.edf.riseclipse.developer.eclipse/fr.centralesupelec.edf.riseclipse.developer.eclipse.tpd` so that it points to the latest Eclipse release and the corresponding Orbit site
- Generate the corresponding target file

Expand All @@ -57,11 +58,15 @@ This scenario corresponds to the introduction of new versions of the tools used.
- Edit `fr.centralesupelec.edf.riseclipse.developer.maven/pom.xml`:
- Update `project.repositories.repository` with the URL of the new Eclipse version
- Update `project.properties.*`:
- Update `.riseclipse-target-platform-version` with `project.version` without `-SNAPSHOT`
- Update `.riseclipse-target-platform-version` with `project.version` with `-SNAPSHOT`
- Update `.maven-*` with latest versions using [https://maven.apache.org/plugins/index.html](https://maven.apache.org/plugins/index.html)
- Update `.tycho-version` with latest one (see on [https://projects.eclipse.org/projects/technology.tycho](https://projects.eclipse.org/projects/technology.tycho)
- Use the generated target file to update plugin versions

- Edit `riseclipse-developer/fr.centralesupelec.edf.riseclipse.developer.p2_to_m2/pom.xml`
- Update `project.version` and `project.parent.version` to be the same as `project.version` from `fr.centralesupelec.edf.riseclipse.developer.maven/pom.xml` (with `-SNAPSHOT`)

- Commit to `develop` (but don't push to GitHub, building on GitHub will fail in this state)

- Use a `~/.m2/toolchains.xml` file to specify which jdk to use for the build (see [https://maven.apache.org/guides/mini/guide-using-toolchains.html](https://maven.apache.org/guides/mini/guide-using-toolchains.html), version should be `17` and vendor `temur`)

Expand All @@ -70,19 +75,23 @@ This scenario corresponds to the introduction of new versions of the tools used.


- Go to `riseclipse-main`:
- create a `develop` branch
- edit `pom.xml` and set the `project.parent.version` to the same as `riseclipse-developper/pom.xml:project.version` (with `-SNAPSHOT`)
- edit `fr.centralesupelec.edf.riseclipse.main/META-INF/MANIFEST.MF` and set `Bundle-Version` to the same as `pom.xml:project.version`, replacing `-SNAPSHOT` with `.qualifier`
- run `mvn clean install`
- Create a `develop` branch
- Edit `pom.xml` and set the `project.parent.version` to the same as `riseclipse-developper/pom.xml:project.version` (with `-SNAPSHOT`)
- Edit `fr.centralesupelec.edf.riseclipse.main/META-INF/MANIFEST.MF` and set `Bundle-Version` to the same as `pom.xml:project.version`, replacing `-SNAPSHOT` with `.qualifier`
- Commit to `develop`
- Run `mvn clean install`

- Do the same for `riseclipse-validator-ocl`, `riseclipse-metamodel-scl2003`, `riseclipse-metamodel-nsd2016` (warning: there can be several `META-INF/MANIFEST.MF` to change)

- Go to `riseclipse-validator-scl2003`:
- create a `develop` branch
- edit `pom.xml`:
- set the `project.parent.version` to the same as `riseclipse-developper/pom.xml:project.version` (with `-SNAPSHOT`)
- update the versions of **RiseClipse needed plugins** to the current ones (with `-SNAPSHOT`)
- edit `fr.centralesupelec.edf.riseclipse.iec61850.scl.validator*/META-INF/MANIFEST.MF`
- set `Bundle-Version` to the same as `pom.xml:project.version`, replacing `-SNAPSHOT` with `.qualifier`
- change `Require-Bundle` versions of RiseClipse bundles to current ones
- run `mvn clean package`
- Create a `develop` branch
- Edit `pom.xml`:
- Set the `project.parent.version` to the same as `riseclipse-developper/pom.xml:project.version` (with `-SNAPSHOT`)
- Update the versions of **RiseClipse needed plugins** to the current ones (with `-SNAPSHOT`)
- Edit `fr.centralesupelec.edf.riseclipse.iec61850.scl.validator*/META-INF/MANIFEST.MF`
- Set `Bundle-Version` to the same as `pom.xml:project.version`, replacing `-SNAPSHOT` with `.qualifier`
- Change `Require-Bundle` versions of RiseClipse bundles to current ones
- Commit to `develop`
- Run `mvn clean package`


12 changes: 11 additions & 1 deletion fr.centralesupelec.edf.riseclipse.developer.maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
</distributionManagement>

<properties>
<riseclipse-target-platform-version>1.2.9</riseclipse-target-platform-version>
<riseclipse-target-platform-version>1.2.10</riseclipse-target-platform-version>

<maven-group-id>org.apache.maven.plugins</maven-group-id>
<maven-clean-plugin-version>3.3.2</maven-clean-plugin-version>
Expand Down Expand Up @@ -594,6 +594,16 @@
</executions>
</plugin>

<!-- See https://github.com/eclipse-tycho/tycho/discussions/3024 -->
<plugin>
<groupId>${tycho-group-id}</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<removeParent>false</removeParent>
</configuration>
</plugin>

</plugins>
</pluginManagement>

Expand Down
6 changes: 3 additions & 3 deletions fr.centralesupelec.edf.riseclipse.developer.p2_to_m2/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
*************************************************************************
** Copyright (c) 2022 CentraleSupélec & EDF.
** Copyright (c) 2022-23 CentraleSupélec & EDF.
**
** This program is free software:
** you can redistribute it and/or modify it under the terms of the GNU Lesser
Expand Down Expand Up @@ -42,13 +42,13 @@

<groupId>io.github.riseclipse</groupId>
<artifactId>fr.centralesupelec.edf.riseclipse.developer.p2_to_m2</artifactId>
<version>1.2.9</version>
<version>1.2.10</version>
<packaging>pom</packaging>

<parent>
<groupId>io.github.riseclipse</groupId>
<artifactId>fr.centralesupelec.edf.riseclipse.developer.maven</artifactId>
<version>1.2.9</version>
<version>1.2.10</version>
<!-- See https://maven.apache.org/ref/3.8.1/maven-model/maven.html#class_parent -->
<relativePath></relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
*************************************************************************
** Copyright (c) 2016-2022 CentraleSupélec & EDF.
** Copyright (c) 2016-2023 CentraleSupélec & EDF.
** All rights reserved. This program and the accompanying materials
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
Expand Down

0 comments on commit 5c21062

Please sign in to comment.