aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes maven Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "maven" Watch "maven" New topic
Author

maven

Elsy Mena
Greenhorn

Joined: Mar 12, 2009
Posts: 8
Hi,

I don't know if this is the correct forum, I tried to find somethig about maven but I didn't find anything.

I am new working with maven, I am trying to create an old web application as a maven project, I don't know how to create the directory structure for that. I used the archetype maven-archetype-webapp, but now I don't know where to put my jsps and everything. I have a classes folder in my WEB-INF folder, but I don't know if I have to take it off, because maven has a directory called target where it puts all complied classes.

I don't kno If somebody can help me with this.

Thank you in advance

Elsy
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61230
    
  66

Moved to a more appropriate forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1280

Hi Elsy,

was it really so hard to find information? I've often heard or read that Maven documentation was really poor in the past but by now there's quite a lot of information on the Maven homepage itself and there are tons of other articles etc.

But for your specific problem have a lookt at Maven standard directory layout.

Here you can see the directory layout it expects for any project. You can still customize it but you save time and trouble just by following the Maven conventions. For web applications all the "web" specific part go to the "src/main/webapp" directory, that is HTMLs, JSPs and WEB-INF for example. I hope this helps solving your problem

For general information and examples about Maven Sonatype is a very good source of information. As I said the Maven homepage and various other pages are really valuable, too.

Marco
Elsy Mena
Greenhorn

Joined: Mar 12, 2009
Posts: 8
Thank you very much Marco, I did found the first link you told me, but I wanted more information. The second one its very good also.

Thank you again for your help and for your kindness, have a great day
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1280

You're welcome ;-) If you have more questions just let us know...

If you take some time to learn you will surely see the full advantages of Maven based projects. Once you know how everything works and if you agree to the conventions (like the directory structure) it's really, really easy to use. And it simply works! Use it from the command line, any of the popular IDEs or other tools like continuous integration servers and it just works without any manual configuration.

Plus there are lots of helpful plugins for additional tasks. For example you could use a plugin which can automatically deploy your web application in case of a successful build and test run etc.

Marco
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

You should also read the free "Maven the Definitive Guide", it pretty much guides you through everything you need to know.


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1280

I'd say that's basically the link from Sonatype I posted above

Marco
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16068
    
  21

We definitely do encourage people to RTFM, although it's a point of pride that we don't flame people into it here at the JavaRanch like some forums do.

Still, here's a freebie, since it will save you a lot of pain:

Don't put files in the target directory!

The entire target directory and its children are subject to being deleted by maven. In fact, "mvn clean" will do exactly that. So anything you want not to get deleted shouldn't go there. In fact, you really shouldn't put anything there. It belongs to maven, and if maven wants something there, it will put it there.

Because Maven deletes target and its children, when using a source code control system such as Subversion or CVS, you should put the target directory into the project vcs "ignore" list.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: maven