Fericelli
Fericelli

Reputation: 360

Acceleo standalone generation

I also need to generate outside eclipse and i didn't figured out how to do it. I've read this thread but I have another problem to overcome first : I'm unable to start the main !

I tried different ways : export the project as standalone, put the project in a regular or executable jar, and launch directly Generator.class. I would like some help with the last solution. Here's how I launch it :

java -cp "..\testGene\bin\;C:\Program Files\Eclipse\plugins" testGene.main.Generate testModel.uml outputDir

I can't copy the whole console (dev computers are not connected to internet), but it says :

Exception in thread "main" java.lang.NoClassDefFoundError: org/Eclipse/acceleo/engine/service/AbstractAcceleoGenerator Could not find the main class: testGene.main.Generate.

The generator works well inside eclipse, and I manage to call a simple test class with the same command line. I tried to copy the whole acceleo plugins in my bin directory in case the space in "Program Files" is a problem.

I'm pretty sure this is a simple error I made, any ideas ?

Upvotes: 2

Views: 1217

Answers (2)

sbegaudeau
sbegaudeau

Reputation: 1544

Since the program does not seem to find the AbstractAcceleoGenerator I would say that you are lacking some dependencies of the generator. Have a look at this screenshot to see the jar used for an UML to Java generator.

Upvotes: 0

Laurent
Laurent

Reputation: 186

Furthermore, I'm not sure that it's sufficient to use the plugins folder in your classpath. Shouldn't there be a list of the jar files you need?

Upvotes: 1

Related Questions