Closed GoogleCodeExporter closed 9 years ago
We require Ant 1.8.4+
Perhaps your (older) version of ant is misinterpreting one of our paths?
Original comment by dragonsinth
on 11 Jul 2012 at 9:28
Original comment by dragonsinth
on 12 Jul 2012 at 6:15
[deleted comment]
I have finally found the resolution of this problem. This problem is cause by
the line in build.xml like this:
"<arg value="--package_base=gen/"/>"
and in my path string
"/home/ligen/works/gitroot/collide/bin/gen/com/google/collide/dto/client", you
can see my home directory string "/home/ligen/" match the package_base string
"gen/", this cause DtoGenerator generate wrong path of DtoClientImpls.java.
I provide a patch here. could you fix this defect? otherwise, I have to change
my name :P.
diff --git a/java/com/google/collide/dto/build.xml
b/java/com/google/collide/dto/build.xml
index abd04f5..b31b5d5 100644
--- a/java/com/google/collide/dto/build.xml
+++ b/java/com/google/collide/dto/build.xml
@@ -49,7 +49,7 @@
<arg value="--dto_jar=${dirs.bin}/${dirs.toppkg}/dto/dto-interfaces.jar"/>
<arg value="--gen_file_name=${dirs.gen}/${dirs.toppkg}/dto/client/DtoClientImpls.java"/>
<arg value="--impl=client"/>
- <arg value="--package_base=gen/"/>
+ <arg value="--package_base=${dirs.gen}/"/>
</java>
<do.javac srcdir="${dirs.gen}" destdir="${dirs.bin}">
<include name="${dirs.toppkg}/dto/client/**/*.java"/>
@@ -87,7 +87,7 @@
<arg value="--dto_jar=${dirs.bin}/${dirs.toppkg}/dto/dto-interfaces.jar"/>
<arg value="--gen_file_name=${dirs.gen}/${dirs.toppkg}/dto/server/DtoServerImpls.java"/>
<arg value="--impl=server"/>
- <arg value="--package_base=gen/"/>
+ <arg value="--package_base=${dirs.gen}/"/>
</java>
<do.javac srcdir="${dirs.gen}" destdir="${dirs.bin}">
<include name="${dirs.toppkg}/dto/server/**/*.java"/>
diff --git a/java/com/google/collide/dtogen/DtoGenerator.java
b/java/com/google/collide/dtogen/DtoGenerator.java
index e51b459..b6ee5d4 100644
--- a/java/com/google/collide/dtogen/DtoGenerator.java
+++ b/java/com/google/collide/dtogen/DtoGenerator.java
@@ -86,6 +86,8 @@ public class DtoGenerator {
String fileName = outputFilePath.substring(packageEnd + 1);
String className = fileName.substring(0, fileName.indexOf(".java"));
String packageName = outputFilePath.substring(packageStart, packageEnd).replace('/', '.');
+
+
File outFile = new File(outputFilePath);
File interfaceJar = new File(dto_jar);
diff --git a/javatests/com/google/collide/client/build.xml
b/javatests/com/google/collide/client/build.xml
index 9038438..38cb74b 100644
--- a/javatests/com/google/collide/client/build.xml
+++ b/javatests/com/google/collide/client/build.xml
@@ -48,7 +48,7 @@
<arg value="--dto_jar=${dirs.testbin}/${dirs.toppkg}/client/testing/dto/client-testdtos.jar"/>
<arg value="--gen_file_name=${dirs.testgen}/${dirs.toppkg}/client/testing/CollideDtoClientTestingImpls.java"/>
<arg value="--impl=client"/>
- <arg value="--package_base=gen/"/>
+ <arg value="--package_base=${dirs.testgen}/"/>
</java>
<do.javac srcdir="${dirs.testgen}" destdir="${dirs.testbin}">
<include name="${dirs.toppkg}/client/**/*.java"/>
diff --git a/javatests/com/google/collide/dtogen/build.xml
b/javatests/com/google/collide/dtogen/build.xml
index fd4f737..d168262 100644
--- a/javatests/com/google/collide/dtogen/build.xml
+++ b/javatests/com/google/collide/dtogen/build.xml
@@ -48,7 +48,7 @@
<arg value="--dto_jar=${dirs.testbin}/${dirs.toppkg}/dtogen/dtogen-testdtos.jar"/>
<arg value="--gen_file_name=${dirs.testgen}/${dirs.toppkg}/dtogen/server/TestDtoServerImpls.java"/>
<arg value="--impl=server"/>
- <arg value="--package_base=gen/"/>
+ <arg value="--package_base=${dirs.testgen}/"/>
</java>
<mkdir dir="${dirs.testgen}/${dirs.toppkg}/dtogen/client"/>
<java classname="${pkg.toppkg}.dtogen.DtoGenerator" fork="true"
Original comment by superli...@gmail.com
on 13 Jul 2012 at 1:25
Nice sleuthing! Please provide your desired "author" string so we can credit
you.
Original comment by dragonsinth
on 13 Jul 2012 at 2:34
This issue was closed by revision 4471933b3c81.
Original comment by dragonsinth
on 13 Jul 2012 at 5:56
Freeland, can please review / check that this builds for you (I'm not properly
setup to build right now on this machine):
http://code.google.com/p/collide/source/list?name=package-base
Original comment by dragonsinth
on 13 Jul 2012 at 5:59
Original comment by dragonsinth
on 14 Jul 2012 at 3:36
Ping. Still wants review.
Original comment by dragonsinth
on 6 Aug 2012 at 11:03
This issue was closed by revision 92de08c50355.
Original comment by dragonsinth
on 7 Aug 2012 at 10:05
Original issue reported on code.google.com by
superli...@gmail.com
on 11 Jul 2012 at 4:11