• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using Maven using own folder structure

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

My project folder structure is different from that of Maven. Can I still use Maven? If yes how?

I have folder structure like:

common-> Java files, properties, xml files
domain-> Java files, properties, xml files
web-> Java files, properties, xml files

Please provide me any soln ASAP.

Thanks in advance.

Kailas
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Maven, I would turn this into three projects: common, domain, web. The first two would each build a jar and place it into the local repository, and the last would build a war and use those jars. In addition, I would use the standard Maven directory structure for each project.

But you can change the default directory locations for things:



Note that other plugins might also need or assume these locations so there might be other things you have to change also. That is why I stick to the default locations.
[ July 24, 2008: Message edited by: Peter Johnson ]
 
Kailas Mushram
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Peter.

I also want to know -Do we need to stick to Maven folder structure ? like

src/main/java.....
and
src/main/resources.....

Can I still avoid using Maven folder structure.? If yes, how this can be done. If possible can you provide me -the POM.xml and project.xml contents ?

Thanks in advance.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can customize the directory structure in a Maven project, but it's no fun.

I'm not a big fan of how they laid things out myself, but at least it's standardized. So if someone dumps a (non-customized) Maven project on me, I know where to find the project's components.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Can I still avoid using Maven folder structure.? If yes, how this can be done. If possible can you provide me -the POM.xml and project.xml contents ?



I already answered this question and provided the pom.xml contents (yes they showed the defaults - change them to what you want).

But like Tim and I hinted at very strongly already - you are much better off accepting the defaults.
 
You're not going crazy. You're going sane in a crazy word. Find comfort in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic