google-code-export / protostuff

Automatically exported from code.google.com/p/protostuff
Apache License 2.0
1 stars 1 forks source link

Wrong output path is generated in Windows for .java files #166

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am getting error"The filename, directory name, or volume label syntax is 
incorrect" due to the plugin not generating proper output path while it's 
working fine on Mac. Following are the details:

Errors caused by: java.io.FileNotFoundException: 
C:\ABC\target\generated-sources\com\abc\optimization\common\vdf\C:\ABC\src\main\
protostuff\VDFCollectionTypeSchema.java (The filename, directory name, or 
volume label syntax
 is incorrect)

Just the file name should be appended to the <outputDir> path but it appends 
another absolute path.
Here is the config section [Refer to the attached image for complete 
configuration]:

 <source>src/main/protostuff/VDFDataProto.proto</source>
 <outputDir>target/generated-sources</outputDir>
 <output>src/main/protostuff/$Schema.java.stg</output>
 <encoding>UTF-8</encoding>

The output path should be:
C:\ABC\target\generated-sources\com\abc\optimization\common\vdf\VDFCollectionTyp
eSchema.java

instead it generates 
C:\ABC\target\generated-sources\com\abc\optimization\common\vdf\C:\ABC\src\main\
protostuff\VDFCollectionTypeSchema.java

I am using version 1.3.0, 1.2.0 as well has this issue.

Original issue reported on code.google.com by pawan.ga...@gmail.com on 4 Feb 2015 at 6:51

Attachments:

GoogleCodeExporter commented 9 years ago
I could not reproduce this issue, so I am not sure what is a root cause for 
your case.

I found another one - right now <output> does not work properly with relative 
template locations (in maven multi-module project it always gives an error).
There is workaround - full template location must be specified - 
${project.basedit}src/main/protostuff/$Schema.java.stg, for example. This one 
will be fixed in protostuff-1.3.1, the most probably it will be released on 
this week.

P.S. I used this configuration for testing: 
https://github.com/protostuff/examples/blob/master/code-generation/plugin-proto-
compiler/pom.xml (it uses some not-released-yet features that must be available 
in 1.3.1).

Original comment by schepano...@gmail.com on 10 Feb 2015 at 10:16

GoogleCodeExporter commented 9 years ago
Reproduced, will be fixed in version 1.3.1

Original comment by schepano...@gmail.com on 11 Feb 2015 at 9:41

GoogleCodeExporter commented 9 years ago
Fixed. David, you can close this.

Original comment by schepano...@gmail.com on 12 Feb 2015 at 10:10