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

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+'/' + '.java', false)]	

I try a hard code path and It work fine:
[file ('test/repertoire/''.java', false)/]

Anyone have an idea about my problem?

Thanks a lot


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: 1900
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+'/' + '.java'/]

(note that "stdout" is a special uri that denotes the standard output... so the contents should be printed in the console.)

Laurent Goubet
Previous Topic:[Acceleo] keeping track of model changes on generation
Next Topic:[Acceleo] StringIndexOutOfBoundsException during Acceleo Build
Goto Forum:

Current Time: Thu Sep 29 22:09:18 GMT 2022

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

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

Back to the top