Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Dynamic directory
Dynamic directory [message #923111] Tue, 25 September 2012 15:57 Go to next message
Sylvain Le Petit is currently offline Sylvain Le Petit
Messages: 1
Registered: July 2009
Junior Member
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 10:01 Go to previous message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1625
Registered: July 2009
Senior Member
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
Previous Topic:[Acceleo] keeping track of model changes on generation
Next Topic:[Acceleo] StringIndexOutOfBoundsException during Acceleo Build
Goto Forum:
  


Current Time: Wed Sep 03 04:40:28 GMT 2014

Powered by FUDForum. Page generated in 0.05479 seconds