Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] atl launcher via command line
[ATL] atl launcher via command line [message #70562] Sun, 06 January 2008 22:36 Go to next message
Eclipse UserFriend
Originally posted by: no.spam.stop

Hi,
I try the atl command line from dennis wagelaar with the example
"families 2 persons" available on the atl website.

here is the command line :


--trans
" file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/t ransformations/Families2Persons.asm "
--in
IN=" file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m odels/sample-Families.ecore "
Families=" file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m etamodels/Families.ecore "
EMF --out
OUT=" file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m odels/sample-Persons.ecore "
Persons=" file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m etamodels/Persons.ecore "
EMF


and here is the output of the command :


--trans
file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/t ransformations/Families2Persons.asm
--in
IN=file:C:/Users/Nicolas/workspace-europa/WSAtlTransformatio n/models/sample-Families.ecore
Families=file:C:/Users/Nicolas/workspace-europa/WSAtlTransfo rmation/metamodels/Families.ecore
EMF
Input metamodel Families @
org.atl.eclipse.engine.AtlEMFModelHandler@98ce7e not yet loaded -
loading from
file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m etamodels/Families.ecore
Referenced extents: []
Using input metamodel Families : MOF
Loading input model IN from
file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m odels/sample-Families.ecore
Referenced extents: []
Using input model IN : Families
--out
OUT=file:C:/Users/Nicolas/workspace-europa/WSAtlTransformati on/models/sample-Persons.ecore
Persons=file:C:/Users/Nicolas/workspace-europa/WSAtlTransfor mation/metamodels/Persons.ecore
EMF
Loading output metamodel Persons @
org.atl.eclipse.engine.AtlEMFModelHandler@98ce7e from
file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m etamodels/Persons.ecore
Referenced extents: []
Using output metamodel Persons : MOF
Creating new model OUT for output
Starting model transformation
file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/t ransformations/Families2Persons.asm
Model transformation done
java.net.UnknownServiceException: protocol doesn't support output
at java.net.URLConnection.getOutputStream(URLConnection.java:79 2)
at
org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createU RLOutputStream(URIConverterImpl.java:390)
at
org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createO utputStream(URIConverterImpl.java:310)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:810)
at
org.atl.eclipse.engine.AtlEMFModelHandler.saveModel(AtlEMFMo delHandler.java:79)
at
org.atl.eclipse.engine.AtlEMFModelHandler.saveModel(AtlEMFMo delHandler.java:43)
at Main.run(Main.java:324)
at Main.main(Main.java:90)


obviously the process stops on this line of the "run" method of "Main.class"

getDefaultHandler((String)handlers.get(mmName)).saveModel(cu rrentOutModel,
(String) paths.get(mName));



Any help would be appreciated
thanks in advance
Nicolas
Re: [ATL] atl launcher via command line [message #70584 is a reply to message #70562] Sun, 06 January 2008 22:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: no.spam.stop

Nicolas a écrit :
> Hi,
> I try the atl command line from dennis wagelaar with the example
> "families 2 persons" available on the atl website.
>
> here is the command line :
>
>
> --trans
> " file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/t ransformations/Families2Persons.asm "
> --in
> IN=" file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m odels/sample-Families.ecore "
> Families=" file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m etamodels/Families.ecore "
> EMF --out
> OUT=" file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m odels/sample-Persons.ecore "
> Persons=" file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m etamodels/Persons.ecore "
> EMF
>
>
> and here is the output of the command :
>
>
> --trans
> file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/t ransformations/Families2Persons.asm
>
> --in
> IN=file:C:/Users/Nicolas/workspace-europa/WSAtlTransformatio n/models/sample-Families.ecore
> Families=file:C:/Users/Nicolas/workspace-europa/WSAtlTransfo rmation/metamodels/Families.ecore
> EMF
> Input metamodel Families @
> org.atl.eclipse.engine.AtlEMFModelHandler@98ce7e not yet loaded -
> loading from
> file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m etamodels/Families.ecore
>
> Referenced extents: []
> Using input metamodel Families : MOF
> Loading input model IN from
> file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m odels/sample-Families.ecore
>
> Referenced extents: []
> Using input model IN : Families
> --out
> OUT=file:C:/Users/Nicolas/workspace-europa/WSAtlTransformati on/models/sample-Persons.ecore
> Persons=file:C:/Users/Nicolas/workspace-europa/WSAtlTransfor mation/metamodels/Persons.ecore
> EMF
> Loading output metamodel Persons @
> org.atl.eclipse.engine.AtlEMFModelHandler@98ce7e from
> file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m etamodels/Persons.ecore
>
> Referenced extents: []
> Using output metamodel Persons : MOF
> Creating new model OUT for output
> Starting model transformation
> file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/t ransformations/Families2Persons.asm
>
> Model transformation done
> java.net.UnknownServiceException: protocol doesn't support output
> at java.net.URLConnection.getOutputStream(URLConnection.java:79 2)
> at
> org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createU RLOutputStream(URIConverterImpl.java:390)
>
> at
> org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createO utputStream(URIConverterImpl.java:310)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:810)
>
> at
> org.atl.eclipse.engine.AtlEMFModelHandler.saveModel(AtlEMFMo delHandler.java:79)
>
> at
> org.atl.eclipse.engine.AtlEMFModelHandler.saveModel(AtlEMFMo delHandler.java:43)
>
> at Main.run(Main.java:324)
> at Main.main(Main.java:90)
>
>
> obviously the process stops on this line of the "run" method of
> "Main.class"
>
> getDefaultHandler((String)handlers.get(mmName)).saveModel(cu rrentOutModel,
> (String) paths.get(mName));
>
>
>
> Any help would be appreciated
> thanks in advance
> Nicolas

also I modified the method "loadmodel" of "Main.class" :

changed "URI absURI = URI.createURI(uri).resolve(cwd);"
in "URI absURI = URI.createURI(uri);"

because the command line :

--trans "transformations/Families2Persons.asm" --in
IN="models/sample-Families.ecore" Families="metamodels/Families.ecore"
EMF --out OUT="models/sample-Persons.ecore"
Persons="metamodels/Persons.ecore" EMF

caused the output :

--trans transformations/Families2Persons.asm
Usage: <this program> --trans <transformation url> [--in <id>=<model>
<id>=<metamodel> <MDR|EMF>] [--out <id>=<model> <id>=<metamodel>
<MDR|EMF>] [--lib <id>=<library url>] [--superimpose <transformation
url>] --next --trans ...java.net.MalformedURLException: no protocol:
transformations/Families2Persons.asmjava.net.MalformedURLExc eption: no
protocol: transformations/Families2Persons.asm
at java.net.URL.<init>(URL.java:567)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at Main.parseArgs(Main.java:156)
at Main.main(Main.java:88)
Re: [ATL] atl launcher via command line [message #71109 is a reply to message #70584] Wed, 09 January 2008 14:01 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
Nicolas schreef:
> Nicolas a écrit :
>> Hi,

Hi Nicolas,

>> I try the atl command line from dennis wagelaar with the example
>> "families 2 persons" available on the atl website.
>>
>> here is the command line :
>>
>>
>> --trans
>> " file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/t ransformations/Families2Persons.asm "
>> --in
>> IN=" file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m odels/sample-Families.ecore "
>> Families=" file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m etamodels/Families.ecore "
>> EMF --out
>> OUT=" file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m odels/sample-Persons.ecore "
>> Persons=" file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m etamodels/Persons.ecore "
>> EMF
>>
>>
>> and here is the output of the command :
>>
>>
>> --trans
>> file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/t ransformations/Families2Persons.asm
>>
>> --in
>> IN=file:C:/Users/Nicolas/workspace-europa/WSAtlTransformatio n/models/sample-Families.ecore
>> Families=file:C:/Users/Nicolas/workspace-europa/WSAtlTransfo rmation/metamodels/Families.ecore
>> EMF
>> Input metamodel Families @
>> org.atl.eclipse.engine.AtlEMFModelHandler@98ce7e not yet loaded -
>> loading from
>> file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m etamodels/Families.ecore
>>
>> Referenced extents: []
>> Using input metamodel Families : MOF
>> Loading input model IN from
>> file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m odels/sample-Families.ecore
>>
>> Referenced extents: []
>> Using input model IN : Families
>> --out
>> OUT=file:C:/Users/Nicolas/workspace-europa/WSAtlTransformati on/models/sample-Persons.ecore
>> Persons=file:C:/Users/Nicolas/workspace-europa/WSAtlTransfor mation/metamodels/Persons.ecore
>> EMF
>> Loading output metamodel Persons @
>> org.atl.eclipse.engine.AtlEMFModelHandler@98ce7e from
>> file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/m etamodels/Persons.ecore
>>
>> Referenced extents: []
>> Using output metamodel Persons : MOF
>> Creating new model OUT for output
>> Starting model transformation
>> file:C:/Users/Nicolas/workspace-europa/WSAtlTransformation/t ransformations/Families2Persons.asm
>>
>> Model transformation done
>> java.net.UnknownServiceException: protocol doesn't support output
>> at java.net.URLConnection.getOutputStream(URLConnection.java:79 2)
>> at
>> org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createU RLOutputStream(URIConverterImpl.java:390)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createO utputStream(URIConverterImpl.java:310)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:810)
>>
>> at
>> org.atl.eclipse.engine.AtlEMFModelHandler.saveModel(AtlEMFMo delHandler.java:79)
>>
>> at
>> org.atl.eclipse.engine.AtlEMFModelHandler.saveModel(AtlEMFMo delHandler.java:43)
>>
>> at Main.run(Main.java:324)
>> at Main.main(Main.java:90)
>>
>>
>> obviously the process stops on this line of the "run" method of
>> "Main.class"
>>
>> getDefaultHandler((String)handlers.get(mmName)).saveModel(cu rrentOutModel,
>> (String) paths.get(mName));
>>
>>
>>
>> Any help would be appreciated
>> thanks in advance
>> Nicolas
>
> also I modified the method "loadmodel" of "Main.class" :
>
> changed "URI absURI = URI.createURI(uri).resolve(cwd);"
> in "URI absURI = URI.createURI(uri);"
>
> because the command line :
>
> --trans "transformations/Families2Persons.asm" --in
> IN="models/sample-Families.ecore" Families="metamodels/Families.ecore"
> EMF --out OUT="models/sample-Persons.ecore"
> Persons="metamodels/Persons.ecore" EMF
>
> caused the output :
>
> --trans transformations/Families2Persons.asm
> Usage: <this program> --trans <transformation url> [--in <id>=<model>
> <id>=<metamodel> <MDR|EMF>] [--out <id>=<model> <id>=<metamodel>
> <MDR|EMF>] [--lib <id>=<library url>] [--superimpose <transformation
> url>] --next --trans ...java.net.MalformedURLException: no protocol:
> transformations/Families2Persons.asmjava.net.MalformedURLExc eption: no
> protocol: transformations/Families2Persons.asm
> at java.net.URL.<init>(URL.java:567)
> at java.net.URL.<init>(URL.java:464)
> at java.net.URL.<init>(URL.java:413)
> at Main.parseArgs(Main.java:156)
> at Main.main(Main.java:88)

I used relative paths/URIs, so something like this:

--trans
" file:../../WSAtlTransformation/transformations/Families2Pers ons.asm "
--in IN="../../WSAtlTransformation/models/sample-Families.ecore"
Families="../../WSAtlTransformation/metamodels/Families.ecore " EMF --out
OUT="../../WSAtlTransformation/models/sample-Persons.ecore"
Persons="../../WSAtlTransformation/metamodels/Persons.ecore " EMF

Also note that I only used "file:" in the --trans argument. See also:

http://ssel.vub.ac.be/viewvc/UML1CaseStudies/uml1cs-instantm essenger-model/outmodels/test2mm/build.xml?revision=5387& ;view=markup
http://ssel.vub.ac.be/viewvc/UML1CaseStudies/uml1cs-instantm essenger-model/outmodels/common.xml?revision=3716&view=m arkup

Regards,
Dennis
Previous Topic:[ATL] How to call a called rule.
Next Topic:[ATL] A problem about resolveTemp
Goto Forum:
  


Current Time: Tue Apr 16 13:23:53 GMT 2024

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

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

Back to the top