Skip to content

Commit

Permalink
DRILL-4375: Fix the maven release profile
Browse files Browse the repository at this point in the history
This generated pom file was being discovered and maven was trying to
run the target directory in jdbc-all as a submodule.

This change reverts to the default output location (the module root)
and adds corresponding .gitignore and RAT exclude entries. NOTE:
this is considered bad practice as generated files should appear in
the target directory and be removed upon a maven clean. This default
location is considered to be a known shortcoming of the shade plugin.

Also updated integration test for the jdbc-all jar with small
path change, as changing the location of the dependency-reduced-pom.xml
actually changed the directory the test was being executed from.

Closes apache#402
  • Loading branch information
jaltekruse committed Mar 8, 2016
1 parent 2850a9f commit 1f29914
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt
# TODO - DRILL-4336
exec/jdbc-all/dependency-reduced-pom.xml
8 changes: 7 additions & 1 deletion exec/jdbc-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,13 @@
<configuration>
<shadedArtifactAttached>false</shadedArtifactAttached>
<createDependencyReducedPom>true</createDependencyReducedPom>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<!-- TODO DRILL-4336: try to move the dependencyReducedPom out of the default location (the module root).
Putting it here caused the target directory to be run as a submodule (oddly
only when trying to run the maven release goal) -->
<!--dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation-->
<!-- TODO DRILL-4336: an attempt to fix the issue by moving the file elsewhere, had issues executing
but may be able to be modified to to fix the issue-->
<!--dependencyReducedPomLocation>${project.build.directory}/generated/shade/dependency-reduced-pom.xml</dependencyReducedPomLocation-->
<minimizeJar>false</minimizeJar>

<artifactSet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void executeJdbcAllQuery() throws Exception {
try {
Driver driver = (Driver) clazz.newInstance();
try (Connection c = driver.connect("jdbc:drill:drillbit=localhost:31010", null)) {
String path = Paths.get("").toAbsolutePath().toString() + "/../src/test/resources/types.json";
String path = Paths.get("").toAbsolutePath().toString() + "/src/test/resources/types.json";
printQuery(c, "select * from dfs.`" + path + "`");
}
} catch (Exception ex) {
Expand Down
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@
<exclude>**/*.linux</exclude>
<exclude>**/client/build/**</exclude>
<exclude>**/*.tbl</exclude>
<!-- TODO DRILL-4336: try to avoid the need to add this -->
<exclude>dependency-reduced-pom.xml</exclude>
</excludes>
</configuration>
</plugin>
Expand Down

0 comments on commit 1f29914

Please sign in to comment.