opcoach / genModelAddon

An EMF addon to generate a source structure to separate the model generated code from the overriden code
Eclipse Public License 1.0
14 stars 6 forks source link

How to launch GmaTransform by Maven-Tycho in pom.xml ? #90

Open microwan opened 2 years ago

microwan commented 2 years ago

Hello Olivier ,

I am trying to launch GmaTransform by maven-tycho in pom.xml (Eclipse-run-plugin and generateEMFCode.xml)

Launching by eclipse is ok.

[emf.Ecore2Java] >> Opening folder /com.st.stellar.clocktree.prototype/src-gen/org_example_component [emf.Ecore2Java] GmaTransform for : [emf.Ecore2Java] -> genClassNamePattern : M{0}Impl [emf.Ecore2Java] -> genInterfaceNamePattern : M{0} [emf.Ecore2Java] -> devClassNamePattern : {0}Impl [emf.Ecore2Java] -> devInterfaceNamePattern : {0} [emf.Ecore2Java] -> devInterfaceNamePattern : {0}

Launching by maven-tycho is ko GMA Transform is never launched.

[emf.Ecore2Java] >> Opening folder /com.st.stellar.clocktree.prototype/src-gen/org_example_component [emf.Ecore2Java] >> Preparing new /com.st.stellar.clocktree.prototype/src-gen/org_example_component/MOrg_example_componentPackage.java [emf.Ecore2Java] >> Generating Java class org_example_component.impl.MOrg_example_componentPackageImpl [emf.Ecore2Java] >> Generating /com.st.stellar.clocktree.prototype/src-gen/org_example_component/impl/MOrg_example_componentPackageImpl.java [emf.Ecore2Java] >> Opening folder /com.st.stellar.clocktree.prototype/src-gen/org_example_component/impl [emf.Ecore2Java] >> Preparing new /com.st.stellar.clocktree.prototype/src-gen/org_example_component/impl/MOrg_example_componentPackageImpl.java [emf.Ecore2Java] >> Generating Java interface org_example_component.MOrg_example_componentFactory

here is an extract of my pom.xml :

                           `<plugin>
            <groupId>org.eclipse.tycho.extras</groupId>
            <artifactId>tycho-eclipserun-plugin</artifactId>
            <version>${tycho-version}</version>
            <configuration>
                <appArgLine>-application org.eclipse.ant.core.antRunner -buildfile generateEMFCode.xml</appArgLine>
                <dependencies>
                    <dependency>
                        <artifactId>org.eclipse.ant.core</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                    <dependency>
                        <artifactId>org.apache.ant</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                    <dependency>
                        <artifactId>org.eclipse.emf.ant</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                    <dependency>
                        <artifactId>org.eclipse.emf.importer.ecore</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                    <dependency>
                        <artifactId>org.apache.felix.scr</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                    <dependency>
                        <artifactId>com.st.stellar.component.model</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                    <dependency>
                        <artifactId>com.opcoach.genmodeladdon.feature</artifactId>
                        <type>eclipse-feature</type>
                    </dependency>
                    <dependency>
                        <artifactId>org.eclipse.osgi.compatibility.state</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                </dependencies>`

Have you got a clue about this issue ?

               Best regards

                                   Erwan
opcoach commented 2 years ago

Hi Erwan,

I never launched GMA from Tycho, and this is a good idea to be totally clean regarding the devops.

Could you launch mvn with -X flag to get the debug trace ?

May be some dependencies are missing ?

microwan commented 2 years ago

Hello Olivier ,

the .project generated in eclipe-run-work is not in GMANature. <nature>com.opcoach.genmodeladdon.core.GMANature</nature>

Maybe , an additional patch is needed in GenModelAddon ;-) I will check with Philippe.

opcoach commented 2 years ago

Yes this is may the case if you use the latest release of GMA.

With this release you have to configure the project to be a GMA project (right click, Configure -> set as gam project). This is may be the reason.

Let me know