Re: Maven Setup for Project

2011-09-22 Thread Guillaume Polet

  
  
From what you expose, I don't see any reason that would prevent you
from using Maven. However, you will struggle a little bit to set up
sourceDirectory, warDirectory and resourcesDirectory since they are
all merged together. You can get around this by setting up correct
inclusion/exclusion filters (but I think they will be rather painful
to maintain).

It would be a lot easier if you can re-organize a bit the files ,
use maven standard structure (src/main/java, src/main/resources,
src/main/webapp ...) and reorganize the projects so that they are
not sub-folders of each other.

Last time I have set up this kind of project I used the following
structure (although there are maybe better solutions, but I found
this quite useful):

  Root parent (you define here anything that should be shared
across your project: dependency versions, shared properties,
plugin management, etc...)
  
EJB's (to group all your EJB's together)


  EJB-1 (an EJB project)
  EJB-2 (another EJB project)
  ...

EAR's (to group all your EAR's together. if you have only
  one then you can directly put it here instead of having an
  intermediary node)

  EAR-1 (an EAR project)
  EAR-2 (another EAR project)
  ...
  

JAR's (to group all your standard jars together)

  JAR-1
  JAR-2
  ...

WAR's (to group all your wars together)

  WAR-1
  WAR-2
  ...

  

In this structure, all the nodes are 'pom' project and the leaves of
the structure are either 'jar', 'ejb', 'war' or 'ear' projects. 
As this structure is quite heavy (but provides room for
extensibility), you can also use a lighter hierarchy:

  Root
  
EJB-1
EJB-2
JAR-1
JAR-2
EAR-1
EAR-2
WAR-1
WAR-2
  

In this structure, only the root node is a 'pom' project, all the
others are either 'jar', 'ejb', 'war' or 'ear' projects.
In both structure, I would set up the 'pom' project(s) as aggregator
(you define the other projects as modules and they reference their
upper-level project as their parent).

Eventually, you will have to set up the JBoss5 dependencies (with
the scope provided). I think that the JBoss repository is now
located here:
https://repository.jboss.org/nexus/content/groups/public (but it's
been a while since I set this up so maybe with a fresher memory will
guide you better into which dependencies should be set up). Once you
have set up the proper dependencies, you can even remove the "JBoss
Container" library from the Eclipse build path. For your Struts
dependencies,you can search them here: http://search.maven.org/ and
add them where needed.

Cheers,
Guillaume

Le 22/09/2011 07:20, Khavnekar, Pravin a crit:

  
  
  
  
  
Hello,
 We are newbies
  in Maven. We have gone though the Maven Website and
  develop small Projects on our own as mentioned for the
  beginners. So far we are very much successful in
  creating the basic Projects. However, now we want to
  migrate our current Projects into Maven.
  Unfortunately, we are facing lot of problems in that.
  Could you please let us know whether our project
  structure is feasible to migrate in to Maven? Please
  find below the structure and technologies used in our
  Project.

Technology:

Internet
  Technology:
Servlet,
  JSP, _javascript_, HTML, CSS and
  AJAX.
Design Tools:
MyEclipse
  6.0
Server Side
  Technologies:
J2EE -
  EJB 2.0, Hibernate
Frame Work
  Used:
Struts
  1.2
Database:
PL/SQL
Language: Java
Web Servers:
  JBoss 5
Application
  Server Used:
WAS
  (Deployment Environment), JBoss Application Server.
Operating
  Systems:
Win XP
  (Development), Linux (Production Environment)

Project
  Structure:



 Please let us
  know whether it is possible to use Maven and it would
  

RE: Maven Setup for Project

2011-09-22 Thread Diego Lin
 
Hi Khavnekar,
 
You may use the command like this to generate the outline of the J2EE
application and move your code to relevant sub-project:
 
mvn archetype:create -DarchetypeArtifactId=maven-archetype-j2ee-simple
-DgroupId=com.mycom.demo.commonlib -DartifactId=entApp01
 
You will understand more, after you see the stuff generated.
 
 
Thanks,
Diego



From: Khavnekar, Pravin [mailto:pravin.khavne...@igatepatni.com] 
Sent: Thursday, 22 September 2011 13:20
To: users@maven.apache.org
Cc: Alakkal, Abhilash
Subject: Maven Setup for Project



Hello,

We are newbie's in Maven. We have gone though the Maven
Website and develop small Projects on our own as mentioned for the
beginners. So far we are very much successful in creating the basic
Projects. However, now we want to migrate our current Projects into
Maven. Unfortunately, we are facing lot of problems in that. Could you
please let us know whether our project structure is feasible to migrate
in to Maven? Please find below the structure and technologies used in
our Project.

 

Technology:

 

Internet Technology: Servlet, JSP, JavaScript, HTML, CSS and AJAX.

Design Tools: MyEclipse 6.0

Server Side Technologies: J2EE - EJB 2.0, Hibernate

Frame Work Used: Struts 1.2

Database: PL/SQL

Language: Java

Web Servers: JBoss 5

Application Server Used: WAS (Deployment Environment), JBoss Application
Server.

Operating Systems: Win XP (Development), Linux (Production Environment)

 

Project Structure:

 

 

 

Please let us know whether it is possible to use Maven
and it would really helpful if you could tell us what changes we have to
make. Awaiting your response.

 

 

Regards,


Pravin A. Khavnekar

Sr. Software Engineer

 

 





Office: +91 22 39172000 | EXTN: 7467 | pravin.khavne...@igatepatni.com
mailto:pravin.khavne...@igatepatni.com  | PKP, Airoli

 




Information contained and transmitted by this e-mail is confidential and
proprietary to iGATE Patni and its affiliates and is intended for use
only by the recipient. If you are not the intended recipient, you are
hereby notified that any dissemination, distribution, copying or use of
this e-mail is strictly prohibited and you are requested to delete this
e-mail immediately and notify the originator or
mailad...@igatepatni.com. iGATE Patni does not enter into any agreement
with any party by e-mail. Any views expressed by an individual do not
necessarily reflect the view of iGATE Patni. iGATE Patni is not
responsible for the consequences of any actions taken on the basis of
information provided, through this email. The contents of an attachment
to this e-mail may contain software viruses, which could damage your own
computer system. While iGATE Patni has taken every reasonable precaution
to minimise this risk, we cannot accept liability for any damage which
you sustain as a result of software viruses. You should carry out your
own virus checks before opening an attachment. To know more about iGATE
Patni please visit www.igatepatni.com.

image001.jpgimage003.jpg