|
| 1 | +# How to build |
| 2 | + |
| 3 | +## Dependencies |
| 4 | +* Eclipse IDE for Eclipse Committers, see `https://www.eclipse.org/downloads/packages/release/2022-03/r/eclipse-ide-eclipse-committers` |
| 5 | +* Maven: just install the m2e plugin, see https://www.eclipse.org/m2e |
| 6 | +* Tycho: do not need separate installation, will be fetched by Maven during the build automattically, see `https://eclipse.org/tycho` |
| 7 | + |
| 8 | +## Get EasyShell plugin sources |
| 9 | +* Clone EasyShell from `https://github.com/anb0s/EasyShell.git` to new directory `EasyShell` |
| 10 | +* switch to `main` branch |
| 11 | +* Import all projects to Eclipse and add them to new "Working Set" **EasyShell** |
| 12 | + * **EasyShell**: root project, needed only for readme, headless build etc. |
| 13 | + * **de.anbos.eclipse.easyshell.feature**: feature project |
| 14 | + * **de.anbos.eclipse.easyshell.platform**: platform definition |
| 15 | + * **de.anbos.eclipse.easyshell.plugin**: plugin with main sources |
| 16 | + * **de.anbos.eclipse.easyshell.site**: update site |
| 17 | + |
| 18 | +## Get EasyShell web-site (gh-pages) |
| 19 | +* Clone EasyShell from `https://github.com/anb0s/EasyShell.git` to new directory `EasyShell-gh-pages` |
| 20 | +* switch to `gh-pages` branch |
| 21 | +* Import the project to Eclipse and add it to "Wortking Set" **EasyShell** |
| 22 | + * **EasyShell-gh-pages**: root project, needed for web- and update-site |
| 23 | + |
| 24 | +## Running and debugging in Eclipse |
| 25 | +* select target platform you want to test EasyShell against: |
| 26 | + * go to project **de.anbos.eclipse.easyshell.platform** |
| 27 | + * open wanted platform definition file, e.g. use **Eclipse-2022-03.target** |
| 28 | + * use `Set as Target Platform` and wait until the platform defition is loaded from Eclipse mirrors |
| 29 | +* now there should be no build errors anymore |
| 30 | +* use `Run | Debug As | Eclipse Application` and wait until the new Eclipse instance is opened |
| 31 | +* use EasyShell, set breakpoint etc. :) |
| 32 | + |
| 33 | +## Update version |
| 34 | + |
| 35 | +!!! ATTENTION do not change other versions manually !!! |
| 36 | + |
| 37 | +!!! all versions must be same BEFORE executiong set-version !!! |
| 38 | + |
| 39 | +!!! e.g. in all pom.xml files: `2.3.0-SNAPSHOT` and all eclipse files `[MANIFEST.MF, feature.xml, category.xml]`: `2.3.0.qualifier` !!! |
| 40 | + |
| 41 | +1. update the version in root `pom.xml`: e.g. `<newVersion>2.3.1-SNAPSHOT</newVersion>` |
| 42 | +2. run `EasyShell-set-new-version.launch` or execute: `mvn clean tycho-versions:set-version` and all versions are updated now |
| 43 | +3. build with `mvn -Dsite.dir=testing clean verify` or just launch config `EasyShell-Testing-Build.launch` |
| 44 | + |
| 45 | +sources: |
| 46 | +- http://codeandme.blogspot.co.at/2012/12/tycho-build-9-updating-version-numbers.html |
| 47 | +- https://wiki.eclipse.org/Tycho/Packaging_Types#eclipse-plugin |
| 48 | +- https://eclipse.org/tycho/sitedocs/tycho-release/tycho-versions-plugin/plugin-info.html |
| 49 | + |
| 50 | +target defintions: |
| 51 | +- https://wiki.eclipse.org/Eclipse_Project_Update_Sites |
| 52 | +- http://codeandme.blogspot.de/2012/12/tycho-build-8-using-target-platform.html |
| 53 | +- https://wiki.eclipse.org/Tycho/Packaging_Types#eclipse-target-definition |
| 54 | +- https://bugs.eclipse.org/bugs/show_bug.cgi?id=383865 |
| 55 | +- http://blog.vogella.com/2013/01/03/tycho-advanced/ |
| 56 | + |
| 57 | +## Building EasyShell plugin with update site for testing |
| 58 | + * go to project **EasyShell** |
| 59 | + * build |
| 60 | + * from Eclipse: run launch configuration `EasyShell-Testing-Build` |
| 61 | + * from commandline / headless / CI server: `mvn clean verify` with parameter `site.dir=testing`: `mvn -Dsite.dir=testing clean verify` |
| 62 | + * go to project **de.anbos.eclipse.easyshell.site** and use one of: |
| 63 | + * directory `target\repository` OR |
| 64 | + * zip file e.g. `target\de.anbos.eclipse.easyshell.site-2.3.0-SNAPSHOT.zip` OR |
| 65 | + * last version from `updates\testing` |
| 66 | + * deploy |
| 67 | + * new automatic pre-process |
| 68 | + * create or reset branch `testing*` to latest from `main` and push, e.g. branch name `testing-my-new-build` |
| 69 | + * new PR with the new build will be automatically created for you |
| 70 | + * wait for PR to be merged to `main` by a maintainer |
| 71 | + * ask maintainer to create and push new tag at main branch for a pre-release with naming patterns |
| 72 | + * `v[0-9]+.[0-9]+.[0-9]+-alpha*` |
| 73 | + * `v[0-9]+.[0-9]+.[0-9]+-beta*` |
| 74 | + * `v[0-9]+.[0-9]+.[0-9]+-rc*` |
| 75 | + * new pre-release tag will be auomatically picked up and new pre-release will be created with changelog and new update site at gh-pages |
| 76 | + * old deprecated manual process as fallback |
| 77 | + * synchronize the directory `updates\testing` to project **EasyShell-gh-pages** directory `testing` |
| 78 | + * commit and push project **EasyShell-gh-pages** to GitHub and check the new version from site `http://anb0s.github.io/EasyShell/testing` |
| 79 | + |
| 80 | +## Building EasyShell plugin with update site for releasing |
| 81 | + * go to project **EasyShell** |
| 82 | + * build |
| 83 | + * from Eclipse: run launch configuration `EasyShell-Release-Build` |
| 84 | + * from commandline / headless / CI server: `mvn clean verify` with parameter `site.dir=release`: `mvn -Dsite.dir=release clean verify` |
| 85 | + * go to project **de.anbos.eclipse.easyshell.site** and use one of: |
| 86 | + * directory `target\repository` OR |
| 87 | + * zip file e.g. `target\de.anbos.eclipse.easyshell.site-2.3.0-SNAPSHOT.zip` OR |
| 88 | + * last version from directory `updates\release` |
| 89 | + * deploy |
| 90 | + * new automatic pre-process |
| 91 | + * create or reset branch `release*` to latest from `main` and push, e.g. branch name `testing-my-new-release` |
| 92 | + * new PR with the new build will be automatically created for you |
| 93 | + * wait for PR to be merged to `main` by a maintainer |
| 94 | + * ask maintainer to create and push new tag at main branch for a release with naming patterns |
| 95 | + * `v[0-9]+.[0-9]+.[0-9]+` |
| 96 | + * new release tag will be auomatically picked up and new release will be created with changelog and new update site at gh-pages |
| 97 | + * old deprecated manual process as fallback |
| 98 | + * synchronize the directory `updates\release` to project **EasyShell-gh-pages** directory `release` |
| 99 | + * commit and push project **EasyShell-gh-pages** to GitHub and check the new version from site `http://anb0s.github.io/EasyShell` |
0 commit comments