Skip to content

Add recipe to replace operaton-bpm-junit5 with operaton-engine:junit5#16

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/add-recipe-for-dependency-replacement
Draft

Add recipe to replace operaton-bpm-junit5 with operaton-engine:junit5#16
Copilot wants to merge 3 commits into
mainfrom
copilot/add-recipe-for-dependency-replacement

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 24, 2026

The classes from org.operaton.bpm:operaton-bpm-junit5 were moved into the engine module. This recipe automates the migration by removing the old dependency and conditionally adding the classified replacement.

Changes

  • operaton-bpm-junit5-migration.yml — Declarative recipe org.operaton.rewrite.upgrade.ReplaceOperatonBpmJunit5 composing:

    • org.openrewrite.maven.RemoveDependency to drop org.operaton.bpm:operaton-bpm-junit5
    • Custom AddOperatonEngineJunit5IfUsed for conditional addition
  • AddOperatonEngineJunit5IfUsed.javaScanningRecipe<AtomicBoolean> that:

    • Scans Java imports for any class in org.operaton.bpm.engine.test.junit5.* (ParameterizedTestExtension, ProcessEngineLoggingExtension, WatchLogger)
    • Adds the replacement dependency only when usage is detected; handles the edge case where <dependencies> itself was removed by the prior RemoveDependency step
  • ReplaceOperatonBpmJunit5Test.java — Tests for each of the three trigger classes and the no-usage case

Result

<!-- removed -->
<dependency>
    <groupId>org.operaton.bpm</groupId>
    <artifactId>operaton-bpm-junit5</artifactId>
</dependency>

<!-- added when any relocated class is imported -->
<dependency>
    <groupId>org.operaton.bpm</groupId>
    <artifactId>operaton-engine</artifactId>
    <version>2.0.0-M3</version>
    <classifier>junit5</classifier>
    <scope>test</scope>
</dependency>
Original prompt

This section details on the original issue you should resolve

<issue_title>Add recipe to replace dependency org.operaton.bpm:operaton-engine:junit5</issue_title>
<issue_description>The classes from the module have been moved to the engine module. Clients should use org.operaton.bpm:operaton-engine:junit5 instead.

Create rewrite rule:

Remove dependency org.operaton.bpm:operaton-bpm-junit5

Add if not exists and one of these classes are used:

  • org.operaton.bpm.engine.test.junit5.ParameterizedTestExtension
  • org.operaton.bpm.engine.test.junit5.ProcessEngineLoggingExtension
  • org.operaton.bpm.engine.test.junit5.WatchLogger
<dependency>
  <groupId>org.operaton.bpm</groupId>
  <artifactId>operaton-engine</artifactId>
  <classifier>junit5</classifier>
  <scope>test</scope>
</dependency>
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…gine:junit5

Co-authored-by: kthoms <265597+kthoms@users.noreply.github.com>
Copilot AI changed the title [WIP] Add recipe to replace dependency org.operaton.bpm:operaton-bpm-junit5 Add recipe to replace operaton-bpm-junit5 with operaton-engine:junit5 Feb 24, 2026
Copilot AI requested a review from kthoms February 24, 2026 06:04
<groupId>org.operaton.bpm</groupId>
<artifactId>operaton-engine</artifactId>
<classifier>junit5</classifier>
<scope>test</scope>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add version 2.0.0-M3

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Added <version>2.0.0-M3</version> to the expected operaton-engine dependency in the test and to the recipe itself (commit 8877724).

<groupId>org.operaton.bpm</groupId>
<artifactId>operaton-engine</artifactId>
<classifier>junit5</classifier>
<scope>test</scope>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add version 2.0.0-M3

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Added <version>2.0.0-M3</version> to the expected operaton-engine dependency in the test and to the recipe itself (commit 8877724).

…nd tests

Co-authored-by: kthoms <265597+kthoms@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Feb 25, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • repository.jboss.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -jar /home/REDACTED/work/operaton-rewrite/operaton-rewrite/target/surefire/surefirebooter-20260225081757511_3.jar /home/REDACTED/work/operaton-rewrite/operaton-rewrite/target/surefire 2026-02-25T08-17-57_095-jvmRun1 surefire-20260225081757511_1tmp surefire_0-20260225081757511_2tmp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from kthoms February 25, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add recipe to replace dependency org.operaton.bpm:operaton-engine:junit5

2 participants