Dynamic directory [message #923111] |
Tue, 25 September 2012 11:57  |
Eclipse User |
|
|
|
Hi,
I rt to create a dynamic directory tree but It failed: message Can't create directory
My template code
[template public genTestCase(testCase : TestCase, campaign : String, testSuite : String)]
[file (campaign+'/'+testSuite+'/'+testCase.name.trim().toLower() + '.java', false)]
I try a hard code path and It work fine:
[file ('test/repertoire/'+testCase.name+'.java', false)/]
Anyone have an idea about my problem?
Thanks a lot
Regards
Sylvain
|
|
|
Re: Dynamic directory [message #931550 is a reply to message #923111] |
Wed, 03 October 2012 06:01  |
Eclipse User |
|
|
|
Hi Sylvain,
This means that we could not create the parent directory of the target file from the Acceleo engine. This usually boils down to one of :
- the "target" you specified for your generation is read-only,
- the "target" you specified for your generation is owned by another user as the one that runs the generation, and the latter does not have writing access to it, or
- there is a forbidden character in the patch you specified.
"forbidden characters" are dependent on the OS you're running, things like "?", ":" ... You can try and print the full path before you generate it in order to debug the root cause of this issue. Something like :
[file ('stdout', false)]
[campaign+'/'+testSuite+'/'+testCase.name.trim().toLower() + '.java'/]
[/file]
(note that "stdout" is a special uri that denotes the standard output... so the contents should be printed in the console.)
Laurent Goubet
Obeo
|
|
|
Powered by
FUDForum. Page generated in 0.03732 seconds