Skip to content

Commit

Permalink
Have ANT script to bump ladybug referenced in FF locally (#104)
Browse files Browse the repository at this point in the history
* Have ANT script to bump ladybug referenced in FF locally

* Fix typo

* Rename to build.xml

---------

Co-authored-by: Martijn Dirkse <martijn@integrationpartners.nl>
  • Loading branch information
mhdirkse and Martijn Dirkse authored Sep 27, 2024
1 parent e111b31 commit be767b0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,21 @@ class-level properties or configurations, put it in your `frankframework`
checkout and not in your Frank!Runner checkout. Use folder
`frankframework/webapp/src/main/resources`.

There is an additional consideration when running `specials/ladybug` with
`test.with.iaf=true`. Doing this requires that the `pom.xml` files in the
frankframework and ladybug checkouts are aligned. The ladybug version
referenced in `frankframework/ladybug/pom.xml` must be the version of the
ladybug checkout. If you want to build with the latest ladybug-frontend code,
you also have to do the Maven build of ladybug-frontend, and the ladybug
frontend version referenced in `ladybug/pom.xml` must match the version
defined in `ladybug-frontend/pom.xml`.

In `frank-runner/specials/util/syncPomVersions`, there is an ANT script to
adjust the mentioned `pom.xml` files to be aligned. To use it, change
directory to `frank-runner/specials/util/syncPomVersions` and execute:

../../../build/apache-ant-1.10.10/bin/ant bump-ladybug-in-ff

# Project structure and customisation

In case Frank2YourApplication contains a pom.xml it is assumed to be a Maven
Expand Down
23 changes: 23 additions & 0 deletions specials/util/syncPomVersions/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<project name="syncPomVersions"
basedir="../../../..">
<target name="bump-ladybug-in-ff" depends="ladybug-backend-takes-frontend,ff-takes-ladybug-backend" />
<!-- It was tried to do this with xmltask. That had two drawbacks:
1. It changes something with surrounding spaces and tabs, causing every line to be changed according to git diff.
2. This requires the xmltask.jar task to be present, and we have to take care of its license
These drawbacks explain why xmltask is not used here.
-->
<target name="ladybug-backend-takes-frontend">
<xmlproperty file="ladybug-frontend/pom.xml" prefix="ladybug.frontend" />
<xmlproperty file="ladybug/pom.xml" prefix="ladybug.backend" />
<replace file="ladybug/pom.xml"
token="&lt;frontend.version&gt;${ladybug.backend.project.properties.frontend.version}&lt;/frontend.version&gt;"
value="&lt;frontend.version&gt;${ladybug.frontend.project.properties.revision}&lt;/frontend.version&gt;" />
</target>
<target name="ff-takes-ladybug-backend">
<xmlproperty file="ladybug/pom.xml" prefix="ladybug.backend" />
<xmlproperty file="frankframework/ladybug/pom.xml" prefix="ff.ladybug" />
<replace file="frankframework/ladybug/pom.xml"
token="&lt;ladybug.version&gt;${ff.ladybug.project.properties.ladybug.version}&lt;/ladybug.version&gt;"
value="&lt;ladybug.version&gt;${ladybug.backend.project.properties.revision}&lt;/ladybug.version&gt;" />
</target>
</project>

0 comments on commit be767b0

Please sign in to comment.