Skip to main content


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 PetitFriend
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 GoubetFriend
Messages: 1902
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: Sat Apr 27 01:08:46 GMT 2024

Powered by FUDForum. Page generated in 0.03527 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top