From 09774104b468fcd925445b9b15a4b6e9ba9c444f Mon Sep 17 00:00:00 2001 From: Adam Cimarosti Date: Wed, 5 Jul 2023 14:46:16 +0100 Subject: [PATCH] docs: fixed order of topics in README.md (#36) --- README.md | 114 +++++++++++++++++++++++++++--------------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index 6714aed..528d8bb 100644 --- a/README.md +++ b/README.md @@ -250,64 +250,10 @@ into the JAR file. The `classes` directory sits within the `target` directory, outside the source tree. -## IntelliJ Integration +## Binaries in the source tree -If you're using IntelliJ, you'll notice that the `rust-maven-plugin` is not invoked -when you run `Build -> Build Project` or `Build -> Rebuild Project`. - -This is because IntelliJ uses its own build system, and does not invoke Maven. - -To work around this, you can add a Maven Run Configuration that invokes an Ant task before each build. -The Ant task then invokes the Maven build step. - -Whilst it does sound a little scary to also involve Ant, the actual XML is (for once) very simple. - -`/rust-intellij.xml`: -```xml - - - IntelliJ integration to trigger maven steps to build the Rust code via the rust-maven-plugin. - - - - - - - -``` - -In the XML above, `str-reverse` is the `` of the `` block in the -`rust-maven-plugin` configuration in the `pom.xml` file. - -You can add multiple executions here, for example to also build release binaries. - -Check the file into your source control. - -You can then go to the Ant window in IntelliJ (View -> Tool Windows -> Ant) and -select the configured ant target, right-click, Execute On -> Before Build. - -This will generate a new `.idea/ant.xml` file that will be picked up by IntelliJ -and will trigger the Ant task before each build which you probably want to add to source control. - -This file will look something like this: - -```xml - - - - - - - - -``` - -Here is the IntelliJ reference for this feature: https://www.jetbrains.com/help/idea/configuring-triggers-for-ant-build-target.html#db2565bc - -## Binaries in source tree - -If you prefer to keep your binaries in the source tree, then you instead -configure to copy binaries to the [`resources`](https://stackoverflow.com/questions/25786185/what-is-the-purpose-for-the-resource-folder-in-maven) directory +If you prefer to keep your binaries in the source tree, you can instead +configure the plugin to copy binaries to the [`resources`](https://stackoverflow.com/questions/25786185/what-is-the-purpose-for-the-resource-folder-in-maven) directory instead: ```xml @@ -403,6 +349,60 @@ JarJniLoader.loadLib( null); ``` +# IntelliJ Integration + +If you're using IntelliJ, you'll notice that the `rust-maven-plugin` is not invoked +when you run `Build -> Build Project` or `Build -> Rebuild Project`. + +This is because IntelliJ uses its own build system, and does not invoke Maven. + +To work around this, you can add a Maven Run Configuration that invokes an Ant task before each build. +The Ant task then invokes the Maven build step. + +Whilst it does sound a little scary to also involve Ant, the actual XML is (for once) very simple. + +`/rust-intellij.xml`: +```xml + + + IntelliJ integration to trigger maven steps to build the Rust code via the rust-maven-plugin. + + + + + + + +``` + +In the XML above, `str-reverse` is the `` of the `` block in the +`rust-maven-plugin` configuration in the `pom.xml` file. + +You can add multiple executions here, for example to also build release binaries. + +Check the file into your source control. + +You can then go to the Ant window in IntelliJ (View -> Tool Windows -> Ant) and +select the configured ant target, right-click, Execute On -> Before Build. + +This will generate a new `.idea/ant.xml` file that will be picked up by IntelliJ +and will trigger the Ant task before each build which you probably want to add to source control. + +This file will look something like this: + +```xml + + + + + + + + +``` + +Here is the IntelliJ reference for this feature: https://www.jetbrains.com/help/idea/configuring-triggers-for-ant-build-target.html#db2565bc + # Contributing & Support * Test cases, features, docs, tutorials, etc are always welcome.