Location: Maven and JDeveloper ADF projects

Discussion: Comments on project structureReported This is a featured thread

Showing 5 posts

aino
Comments on project structure
Feb 4 2009, 11:32 AM EST | Post edited: Feb 4 2009, 11:32 AM EST
Hi Sandra,

I strongly oppose separate test packages because it makes protected and 'no qualifier' methods more difficult to test. Since the testcases are in a separate directory and a separate JDev project they do not clutter the project navigator
In addition we recommend a separate ear project to build the ear deliverable; Maven cannot do both the ear and war in one project. We also use a separate deployment project for deployment to the appserver and a separate project for integration tests like JMeter or Selenium or others).
Why do you have all the jpr's in the application's directory?
Do you use one pom or multiple?

We consider the model and viewController and other projects as modules / subprojects, each with their own pom file.

Ciao
Aino
Do you find this valuable?    
smuller
smuller
1. RE: Comments on project structure
Feb 5 2009, 4:15 AM EST | Post edited: Feb 5 2009, 4:15 AM EST
Hi Aino,

Thanks for your suggestions for improvement.
> I strongly oppose separate test packages because it makes protected and 'no qualifier' methods more difficult to test.
> Since the testcases are in a separate directory and a separate JDev project they do not clutter the project navigator
Good suggestion, I never realized that this is a possibility! I'll change the wiki page.

> In addition we recommend a separate ear project to build the ear deliverable;
> Maven cannot do both the ear and war in one project.
We did the same, it's just not visible in JDeveloper. I'll add a bit about the folder structure to the wiki page.

> We also use a separate deployment project for deployment to the appserver
With 10g we did not need that, with 11g we have not succeeded yet to automate the deployment to WLS using maven. Do you have an example you can share?

> and a separate project for integration tests like JMeter or Selenium or others).
We don't have those kinds of tests yet, but I can imagine it can be useful to have separate projects for them.

> Why do you have all the jpr's in the application's directory?
To avoid mixing design time files with files needed for building the application, we keep all files that are only needed for JDeveloper design time in a separate jdeveloper folder outside of the Model and ViewController projects.

> Do you use one pom or multiple?
> We consider the model and viewController and other projects as modules / subprojects, each with their own pom file.
Yes, we do that too, and also have a pom.xml for the ear folder.

kind regards,
Sandra
Do you find this valuable?    

aino
2. RE: Comments on project structure
Feb 5 2009, 5:39 AM EST | Post edited: Feb 5 2009, 5:39 AM EST
Hi Sandra,

>> We also use a separate deployment project for deployment to the appserver
>With 10g we did not need that, with 11g we have not succeeded yet to automate the deployment to WLS using maven. Do you have an example you can share?

We do this to be flexible in deploying the application version. We used to do it in the ear file, but that limited us to the current version. Basically we use the exec plugin in combination with the admin_jar utility; I'll post an example later. I haven't tried the new cargo plugin for OC4J and have limited experience with 11g.

>> Why do you have all the jpr's in the application's directory?
>To avoid mixing design time files with files needed for building the application, we keep all files that are only needed for JDeveloper design time in a >separate jdeveloper folder outside of the Model and ViewController projects.

I still don't understand this explanation. Do you use the jpr files in maven execution?

In addition, we use ant build files as wrapper for maven tasks instead of external tools.

Ciao
Aino
1  out of 1 found this valuable. Do you?    
smuller
smuller
3. RE: Comments on project structure
Feb 5 2009, 8:02 AM EST | Post edited: Feb 5 2009, 8:02 AM EST
"Hi Sandra,

>> We also use a separate deployment project for deployment to the appserver
>With 10g we did not need that, with 11g we have not succeeded yet to automate the deployment to WLS using maven. Do you have an example you can share?

We do this to be flexible in deploying the application version. We used to do it in the ear file, but that limited us to the current version. Basically we use the exec plugin in combination with the admin_jar utility; I'll post an example later. I haven't tried the new cargo plugin for OC4J and have limited experience with 11g.

>> Why do you have all the jpr's in the application's directory?
>To avoid mixing design time files with files needed for building the application, we keep all files that are only needed for JDeveloper design time in a >separate jdeveloper folder outside of the Model and ViewController projects.

I still don't understand this explanation. Do you use the jpr files in maven execution?

In addition, we use ant build files as wrapper for maven tasks instead of external tools.

Ciao
Aino"
>>> Why do you have all the jpr's in the application's directory?
>> To avoid mixing design time files with files needed for building the application, we keep all files
>> that are only needed for JDeveloper design time in a
>> separate jdeveloper folder outside of the Model and ViewController projects.
> I still don't understand this explanation. Do you use the jpr files in maven execution?

No, that's the point. We don't want the jpr files that are not used by maven hanging around in the folders Model and ViewController that are used by Maven. Also, any files that are automatically added by JDeveloper to the folder where the jpr is, like diagram files, will then be cleanly separated from the source code of the application.
Imagine someone that wants to edit the Java sources using some other tool than JDeveloper. He would not need any files that are in the jdeveloper folder.
Does this explain it? But maybe I don't understand your question. How do you organize it?
Do you find this valuable?    
smuller
smuller
4. RE: Comments on project structure
Feb 5 2009, 8:09 AM EST | Post edited: Feb 5 2009, 8:09 AM EST
"Hi Sandra,

>> We also use a separate deployment project for deployment to the appserver
>With 10g we did not need that, with 11g we have not succeeded yet to automate the deployment to WLS using maven. Do you have an example you can share?

We do this to be flexible in deploying the application version. We used to do it in the ear file, but that limited us to the current version. Basically we use the exec plugin in combination with the admin_jar utility; I'll post an example later. I haven't tried the new cargo plugin for OC4J and have limited experience with 11g.

>> Why do you have all the jpr's in the application's directory?
>To avoid mixing design time files with files needed for building the application, we keep all files that are only needed for JDeveloper design time in a >separate jdeveloper folder outside of the Model and ViewController projects.

I still don't understand this explanation. Do you use the jpr files in maven execution?

In addition, we use ant build files as wrapper for maven tasks instead of external tools.

Ciao
Aino"
> In addition, we use ant build files as wrapper for maven tasks instead of external tools.
That is a good idea, can you add how to do that to the wiki?
Do you find this valuable?