Issue #85

Code-Generation of Java-Component, Root-Directory for Source-Code

Added by Nils Buntenbeck over 6 years ago. Updated over 4 years ago.

Status:ResolvedStart date:04 February 2013
Priority:MediumDue date:
Assignee:Christophe Malgouyres% Done:

50%

Category:-
Target version:-

Description

Hi,

If I add a Java-Component to my Model and assign it a generation-path, the source is always generated in /src. I don’t know where that “src” appendix is coming from nor did I find a way to customize it.

But maybe it’s just my Project-Setup?

I have two different but closely related maven-projects, aggegated in one parent pom. However I do currently not use any maven-features of Modelio, although that is likely to change sooner or later. Until then, being the lazy guy that I am, I just put my Modelio-Workspace in that parent-directory in a folder “uml”, so I have the following structure:

parentProject —projct1 ——src/main/java —project2 ——src/main/java —uml ——ModelioProject Modeling my stuff in Modelio, hit the Generate-Button, done! At least, That’s what I thought… It is easier to work on both modules using just one project than having a seperate project for each module.

In the JavaDesigner-Directories-Settings, I configure the Code-Generation-Path as ${Project}/../../ In the Model, I add a Java-Component named project1, setting its generation-path to ../../project1/src/main/java, expecting any packages within that component to be generated just there. Instead they are generated in ../../project1/src/main/java/src.

Why does Modelio append the ‘src’-folder?

However I will investigate the maven-features of Modelio, maybe they solve my problem anyway… Any help appreciated :–) Thanks, Nils

History

#1 Updated by Nils Buntenbeck over 6 years ago

Typo-Correction: If I add a Java-Component to my Model and assign it a generation-path, the source is always generated in generation-path-value/src. I don’t know where that “src” appendix is coming from nor did I find a way to customize it.

#2 Updated by Christophe Malgouyres over 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Christophe Malgouyres

Hi,

first of all, you’re not doing anything wrong, your setup is fine. The maven plugin won’t help, as it doesn’t changes anything in the project configuration…

In fact, the ‘src’ directory is currently hardcoded, for historical reasons, and can’t be customized. It should be either removed or editable (for example through module parameters). For now, it is still part of my ‘to do’ list…

The only workaround I see is using two distinct projects instead of one with java components.

#3 Updated by Nils Buntenbeck over 6 years ago

hi christophe,

thanks for your feedback. No worries about that ‘src’ directory, at least I know that I do not need to try fuerther… I changed the project setup in a way, that I have now two seperate projects, switching the workspace every now and then, could be worse… Works for me :–)

#4 Updated by Christophe Malgouyres over 4 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 50

In JavaDesigner 3.3.00, a new module parameter should be available to customize or remove the “src” folder added for components.

See revision 401.

Also available in: Atom PDF