Skip to content

Commit

Permalink
docs: Removed reference to 'resources' in example's pom.xml. (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
amunra authored Jan 19, 2023
1 parent 48aad51 commit e60d71a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ hs_err_pid*

# Compiler output
**/target/

# JNI dynamic libs
rust-maven-example/src/main/resources/io/questdb/rust/maven/example/*/**
5 changes: 0 additions & 5 deletions rust-maven-example/.gitignore

This file was deleted.

8 changes: 4 additions & 4 deletions rust-maven-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
<plugins>
<!--
The Rust Maven Plugin
Here it'll build the `str-reverse` crate and place the cdylib in a subdirectory of the "resources" dir.
The binary will be auto-bundled into the final jar.
Make sure to configure your `.gitignore` appropriately (See rust-maven-example/.gitignore).
Here it'll build the `str-reverse` crate and place the cdylib in the target's "classes" directory.
Placing it there will have Maven automatically bundle the compiled code in the Jar.
-->
<plugin>
<groupId>io.questdb</groupId>
Expand Down Expand Up @@ -115,7 +115,7 @@
<copyWithPlatformDir>true</copyWithPlatformDir>

<!--
Environment variables used when calling `cargo build`.
Additional environment variables used when calling `cargo build`.
-->
<environmentVariables>
<REVERSED_STR_PREFIX>Great scott! A reversed string!</REVERSED_STR_PREFIX>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,19 @@ private void copyArtifacts() throws MojoExecutionException {
return;
}

getLog().info("Copying artifacts to " + Shlex.quote(copyTo));
getLog().info("Copying " + getName() + "'s cdylib to " + Shlex.quote(copyTo));

final File getArtifactPath = findArtifactPath();
final File copyToDir = getCopyToDir();
final File copyToPath = new File(copyToDir, getArtifactPath.getName());
try {
Files.copy(getArtifactPath.toPath(), copyToPath.toPath(), StandardCopyOption.REPLACE_EXISTING);
} catch (IOException e) {
throw new MojoExecutionException("Failed to copy " + getArtifactPath + " to " + copyToPath, e);
throw new MojoExecutionException(
"Failed to copy " + getArtifactPath + " to " + copyToPath + ":" + e.getMessage());
}

getLog().info("Copied " + Shlex.quote(getArtifactPath.getName()));
}

@Override
Expand Down

0 comments on commit e60d71a

Please sign in to comment.