Multi-module use; Including deployed jars

31 views
Skip to first unread message

nroo

unread,
Jan 26, 2014, 8:07:43 AM1/26/14
to extdire...@googlegroups.com
Dear All,

I am asking your help with two issues, I thought I'd better put them together in one single post.

Issue A:
Here on this page the issue was raised about using extdirspring in a multi-module Maven project.
I tried the solution suggested at the bottom of that page, but could get it to work.
Has anybody had any luck with it or has another solution for the same problem?

As a workaround I have been generating the model inside my app-model module and using a relative path to my app-clientweb as the output directory.
That works fine, but with that I am creating a dependency between two modules (individual STS (Eclipse) projects).

How else does the Model Generator allow me to do this same things the way it should?
See details below under A.

Issue B:
I have another multi-module project, which only contains generic models, services etc. I use for all projects.
There I have a module international-model that contains models, DAO's and services that handle internationalization (Countries, Languages)  etc.
I also have everything that has to do with Security in a separate module. Hence, the security framework for all my web applications is the same.
I build that multi-module project with "mvn deploy". That makes it available to all developers on our own Maven repository server we have on-line.
As roberthunt indicated in the this link, it's quite easy to include Java classes from a already deployed jar file into the flexmojos maven plugin to generate a model.
We've done that when we used to work with Flex and GraniteDS.
With extdirspring, however, is that possible in any way or form?
For example: I annotate with @Model my class Country inside my international module and "mvn deploy" it to my repo.
The mvn-apt-plugin includes all classes by default. Module app-model depends on and includes my deployed model from my repo like this:
<dependency>
<groupId>net.mydomain.module</groupId>
<artifactId>international-model</artifactId>
</dependency>

... but still seemingly does not process Country.class inside the deployed jar.

I appreciate your help.

Thanks.
nroo

Details for A.
This is the structure of my multi-module Maven project:
parent-app
|___ app-dao
|___ app_model
|___ app-service
|___ app-webapps
       |___ app-clientweb
       |___ app-mgmtweb

The plugin configuration inside the <build> section of the pom.xml for my app_model module:
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<executions>
<execution>
<id>modelgen</id>
<phase>compile</phase>
<goals>
<goal>process</goal>
</goals>
<configuration>
<processor>ch.rasc.extclassgenerator.ModelAnnotationProcessor</processor>
<outputDirectory>../app-webapps/app-clientweb/src/main/webapp/js/app</outputDirectory>
<options>
<debug>true</debug>
<outputFormat>extjs4</outputFormat>
                        <includeValidation>builtin</includeValidation>
<surroundApiWithQuotes>true</surroundApiWithQuotes>
</options>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ch.rasc</groupId>
<artifactId>extclassgenerator</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</plugin>

Reply all
Reply to author
Forward
0 new messages