This repository was archived by the owner on Jun 2, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Add Cucumber-JVM migration module #1
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
fb26ae2
Add basic structure as seen in cucumber-jvm
timtebeek 37e5a10
Add export of openrewrite/rewrite-testing-frameworks cucumber recipes
timtebeek 058496f
Add language hints to RegexToCucumberExpressionTest
timtebeek ba6556d
Set cucumber.version to 7.11.0 to match test classpathFromResources
timtebeek e11cf71
Drop classpathFromResources
timtebeek 4cd5a71
Drop another classpathFromResources
timtebeek 818ef21
Remove stale/lock as suggested
timtebeek 8151581
Adopt BOMs for dependency versions; Drop spotless
timtebeek 72c3b47
Delete eclipse-formatter-settings.xml
timtebeek 2d93cc3
Delete intellij-idea.importorder
timtebeek 10dc706
Switch to 0.1.0-SNAPSHOT
timtebeek 3650cb3
acceptTransitive: true on junit-platform-suite
timtebeek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
open_collective: cucumber |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"github>cucumber/renovate-config" | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Release GitHub | ||
|
||
on: | ||
push: | ||
branches: [release/*] | ||
|
||
jobs: | ||
create-github-release: | ||
name: Create GitHub Release and Git tag | ||
runs-on: ubuntu-latest | ||
environment: Release | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cucumber/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Release Maven | ||
|
||
on: | ||
push: | ||
branches: [release/*] | ||
|
||
jobs: | ||
publish-mvn: | ||
name: Publish Maven Package | ||
runs-on: ubuntu-latest | ||
environment: Release | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
cache: 'maven' | ||
- uses: cucumber/[email protected] | ||
with: | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
nexus-username: ${{ secrets.SONATYPE_USERNAME }} | ||
nexus-password: ${{ secrets.SONATYPE_PASSWORD }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Test Java | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '**' | ||
workflow_call: | ||
push: | ||
branches: | ||
- main | ||
- renovate/** | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, windows-latest ] | ||
version: [ 17, 19 ] | ||
name: 'Build Java ${{ matrix.version }} - ${{ matrix.os }}' | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: ${{ matrix.version }} | ||
cache: 'maven' | ||
- name: Install dependencies | ||
run: mvn install -DskipTests=true -DskipITs=true --batch-mode -D"style.color=always" --show-version | ||
- name: Test | ||
run: mvn verify -D"style.color=always" | ||
env: | ||
CUCUMBER_PUBLISH_TOKEN: ${{ secrets.CUCUMBER_PUBLISH_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# IDE working files | ||
*.iws | ||
*.ipr | ||
*.iml | ||
.idea/ | ||
.settings | ||
.project | ||
.classpath | ||
lib/ | ||
|
||
|
||
# Build directories | ||
distrib/ | ||
target/ | ||
tmp/ | ||
gen-external-apklibs/ | ||
out/ | ||
|
||
# Build & test droppings | ||
pom.xml.releaseBackup | ||
pom.xml.versionsBackup | ||
release.propertiesF | ||
*.ser | ||
dependency-reduced-pom.xml | ||
*~ | ||
libpeerconnection.log | ||
|
||
# OS generated files | ||
.DS_Store* | ||
ehthumbs.db | ||
Icon? | ||
Thumbs.db |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Copyright (c) The Cucumber Organisation | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,48 @@ | ||
# Cucumber JVM migration | ||
|
||
Cucumber-JVM migration contains [OpenRewrite](https://docs.openrewrite.org/) recipes for migrating applications using Cucumber-JVM. | ||
|
||
## Running migration recipes | ||
Migration recipes can be run using the [rewrite-maven-plugin](https://docs.openrewrite.org/reference/rewrite-maven-plugin) | ||
or [rewrite-gradle-plugin](https://docs.openrewrite.org/reference/gradle-plugin-configuration). | ||
These can either be added to the build file of the project to be migrated or [run without modifying the build](https://docs.openrewrite.org/running-recipes/running-rewrite-on-a-maven-project-without-modifying-the-build). | ||
|
||
|
||
### Upgrade to Cucumber JVM 7.x | ||
```shell | ||
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run \ | ||
-Drewrite.recipeArtifactCoordinates=io.cucumber:cucumber-jvm-migration:LATEST \ | ||
-DactiveRecipes=io.cucumber.migration.UpgradeCucumber7x | ||
``` | ||
|
||
### Cucumber-Java8 migration to Cucumber-Java | ||
```shell | ||
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run \ | ||
-Drewrite.recipeArtifactCoordinates=io.cucumber:cucumber-jvm-migration:LATEST \ | ||
-DactiveRecipes=io.cucumber.migration.CucumberJava8ToJava | ||
``` | ||
|
||
|
||
## Questions, Problems, Help needed? | ||
|
||
Please ask on | ||
|
||
* [Stack Overflow](https://stackoverflow.com/questions/tagged/cucumber-jvm). | ||
* [CucumberBDD Slack](https://cucumberbdd-slack-invite.herokuapp.com/) <sup>[direct link](https://cucumberbdd.slack.com/)</sup> | ||
|
||
## Bugs and Feature requests | ||
|
||
You can register bugs and feature requests in the | ||
[GitHub Issue Tracker](https://github.com/cucumber/cucumber-jvm-migration/issues). | ||
|
||
Please bear in mind that this project is almost entirely developed by | ||
volunteers. If you do not provide the implementation yourself (or pay someone | ||
to do it for you), the bug might never get fixed. If it is a serious bug, other | ||
people than you might care enough to provide a fix. | ||
|
||
## Contributing | ||
|
||
If you'd like to contribute to the documentation, checkout | ||
[cucumber/docs.cucumber.io](https://github.com/cucumber/docs.cucumber.io) | ||
otherwise see our | ||
[CONTRIBUTING.md](https://github.com/cucumber/cucumber-jvm/blob/main/CONTRIBUTING.md). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>io.cucumber</groupId> | ||
<artifactId>cucumber-parent</artifactId> | ||
<version>4.1.1</version> | ||
<relativePath/> | ||
</parent> | ||
|
||
<artifactId>cucumber-jvm-migration</artifactId> | ||
<version>0.1.0-SNAPSHOT</version> | ||
|
||
<name>Cucumber JVM Migration</name> | ||
<description>Migration module to upgrade projects using cucumber-jvm.</description> | ||
|
||
<properties> | ||
<base.java.version>1.8</base.java.version> | ||
<cucumber.version>7.11.0</cucumber.version> | ||
<junit.version>5.9.2</junit.version> | ||
<rewrite.version>1.17.0</rewrite.version> | ||
<resources.encoding>UTF-8</resources.encoding> | ||
<project.build.outputTimestamp>1674814830</project.build.outputTimestamp> | ||
<project.Automatic-Module-Name>io.cucumber.migration</project.Automatic-Module-Name> | ||
</properties> | ||
<scm> | ||
<connection>scm:git:git://github.com/cucumber/cucumber-jvm-migration.git</connection> | ||
<developerConnection>scm:git:[email protected]:cucumber/cucumber-jvm-migration.git</developerConnection> | ||
<url>git://github.com/cucumber/cucumber-jvm-migration.git</url> | ||
<tag>HEAD</tag> | ||
</scm> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.cucumber</groupId> | ||
<artifactId>cucumber-bom</artifactId> | ||
<version>${cucumber.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit</groupId> | ||
<artifactId>junit-bom</artifactId> | ||
<version>${junit.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.openrewrite.recipe</groupId> | ||
<artifactId>rewrite-recipe-bom</artifactId> | ||
<version>${rewrite.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.cucumber</groupId> | ||
<artifactId>cucumber-java</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.cucumber</groupId> | ||
<artifactId>cucumber-java8</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.cucumber</groupId> | ||
<artifactId>cucumber-plugin</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.cucumber</groupId> | ||
<artifactId>cucumber-junit-platform-engine</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.platform</groupId> | ||
<artifactId>junit-platform-suite-api</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.openrewrite</groupId> | ||
<artifactId>rewrite-java</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.openrewrite</groupId> | ||
<artifactId>rewrite-gradle</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.openrewrite</groupId> | ||
<artifactId>rewrite-maven</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.openrewrite</groupId> | ||
<artifactId>rewrite-java-17</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.openrewrite</groupId> | ||
<artifactId>rewrite-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<version>1.18.24</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-enforcer-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>enforce-maven-3-6-3-plus</id> | ||
<goals> | ||
<goal>enforce</goal> | ||
</goals> | ||
<configuration> | ||
<fail>true</fail> | ||
<rules> | ||
<requireMavenVersion> | ||
<version>3.6.3</version> | ||
</requireMavenVersion> | ||
</rules> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>enforce-java</id> | ||
<goals> | ||
<goal>enforce</goal> | ||
</goals> | ||
<configuration> | ||
<rules> | ||
<requireJavaVersion> | ||
<version>[11,)</version> | ||
</requireJavaVersion> | ||
</rules> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<configuration> | ||
<encoding>${resources.encoding}</encoding> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>${base.java.version}</source> | ||
<target>${base.java.version}</target> | ||
<!-- Allow for text blocks in tests --> | ||
<testSource>17</testSource> | ||
<testTarget>17</testTarget> | ||
timtebeek marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: Add this to the secrets.