Skip to content

Commit b0fff3f

Browse files
Jamesclaude
authored andcommitted
Give pom_dlineage.xml its own output directory, fixing #39
It shared target/classes with the root build and declares only one source file, so its incremental-compile cleanup deleted every other demo's .class files before failing on its own (separately documented) compile error, breaking a working build with no clue why. Builds into target-dlineage/ instead. Also ignore Claude Code artifacts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qPRpoD8exYRrUmbfXXWXj
1 parent 03dae53 commit b0fff3f

3 files changed

Lines changed: 25 additions & 1 deletion

File tree

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ rebel.xml
5757

5858
# Maven target
5959
**/target
60+
target-dlineage
6061

6162
*.iml
6263

64+
# Claude Code
65+
CLAUDE.md
66+
.claude/
67+
.mcp.json
68+
6369

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ standalone lineage tool:
227227
```bash
228228
mvn -f pom_dlineage.xml package
229229
230-
java -cp "target/gsp_demo_java_dlineage-1.0-SNAPSHOT.jar:lib/*" \
230+
java -cp "target-dlineage/gsp_demo_java_dlineage-1.0-SNAPSHOT.jar:lib/*" \
231231
gudusoft.gsqlparser.demos.dlineage.DataFlowAnalyzer \
232232
/f demo.sql /o lineage.json /json /graph \
233233
/simpleShowRelationTypes fdd,fdr /filterRelationTypes fdd
@@ -236,6 +236,15 @@ java -cp "target/gsp_demo_java_dlineage-1.0-SNAPSHOT.jar:lib/*" \
236236
Other invocations it supports: `/t mssql`, `/t postgresql`, `/showER`,
237237
`/filterRelationTypes fdd`.
238238
239+
`pom_dlineage.xml` builds into `target-dlineage/`, a directory of its own,
240+
rather than the root build's `target/`. It shares this repository's
241+
`${project.basedir}` with `pom.xml` and declares only one source file, so
242+
without a separate output directory the compiler plugin's incremental-build
243+
cleanup would delete every `.class` file the root build produced that isn't
244+
part of this smaller source set — wiping out a working root build before this
245+
one even reaches its own compile error below. See
246+
[#39](https://github.com/sqlparser/gsp_demo_java/issues/39).
247+
239248
> **This build currently fails**, and did so before the trees were merged. It
240249
> pins `lib/gsqlparser-3.1.1.0.jar`, but `DataFlowAnalyzer` has moved on and now
241250
> calls `getOption().setTraceTablePosition(...)` and

pom_dlineage.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,15 @@
105105
</dependencies>
106106

107107
<build>
108+
<!-- This POM shares ${project.basedir} with the root pom.xml, so without
109+
an explicit, separate output directory it also shares target/classes.
110+
It declares only one source file (see the compiler <includes> below),
111+
so the compiler plugin's incremental-compilation cleanup deletes every
112+
.class file the root build produced that isn't part of this smaller
113+
source set, before this build even reaches its own compile error.
114+
That wipes out a working root build with no indication of why. See
115+
https://github.com/sqlparser/gsp_demo_java/issues/39. -->
116+
<directory>${project.basedir}/target-dlineage</directory>
108117
<plugins>
109118
<plugin>
110119
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)