do projeto. Na pasta raiz do projeto inicialmente existe apenas o pom.xml assim como arquivos secundarios tais como propriedades, build.xml(caso esteja tambem usando o Ant) e os diretorios src e target(este ultimo sera gerado apenas apos a execucao de alguns comandos tais como mvn compile, mvn package, mvn install etc). Conforme descrito o src e onde esta todo o codigo fonte necessario para o projeto. A pasta target e o local onde todos os artefatos necessarios para a criacao dos pacotes do projeto serao gerados. Nunca versione(CVS,SVN,Clearcase etc) esta pasta. Ela pode ser apagada sem problemas e o Maven tambem pode fazer isto(mvn clean). Usamos como base um projeto com codigos fonte Java porem podem existir outras pastas de arquivo fonte tais como Antlr(src/main/antlr) e Groovy(src/main/groovy). Sugiro que use as configuracoes conforme especificado acima e sera possivel, como exemplo, criar a seguinte estrutura de projeto para um projeto war(vamos dizer que seu projeto esteja na pasta F:\projetos\maven.default):<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>br.com.maven3.tutorial</groupId> <artifactId>maven.default</artifactId> <version>1.0</version> <packaging>war</packaging></project>O comando mvn help:effective-pom exibe uma versao extendida do arquivo pom.xml como o Maven realmente entende. Isto ira ajudar no entendimento do que realmente e configurado automaticamente pelo Maven para voce. Perceba que apenas como 7 linhas do pom.xml se transformam em mais de 237 linhas!<?xml version="1.0"?><project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <groupId>br.com.maven3.tutorial</groupId> <artifactId>maven.default</artifactId> <version>1.0</version> <packaging>war</packaging> <repositories> <repository> <id>Codehaus Snapshots</id> <url>nexus.codehaus.org</url> </repository> <repository> <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>Maven Repository Switchboard</name> <url>http://repo1.maven.org/maven2</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>Codehaus Snapshots</id> <url>nexus.codehaus.org</url> </pluginRepository> <pluginRepository> <releases> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>Maven Plugin Repository</name> <url>http://repo1.maven.org/maven2</url> </pluginRepository> </pluginRepositories> <build> <sourceDirectory>F:\projetos\maven.default\src\main\java</sourceDirectory> <scriptSourceDirectory>F:\projetos\maven.default\src\main\scripts</scriptSourceDirectory> <testSourceDirectory>F:\projetos\maven.default\src\test\java</testSourceDirectory> <outputDirectory>F:\projetos\maven.default\target\classes</outputDirectory> <testOutputDirectory>F:\projetos\maven.default\target\test-classes</testOutputDirectory> <resources> <resource> <directory>F:\projetos\maven.default\src\main\resources</directory> </resource> </resources> <testResources> <testResource> <directory>F:\projetos\maven.default\src\test\resources</directory> </testResource> </testResources> <directory>F:\projetos\maven.default\target</directory> <finalName>maven.default-1.0</finalName> <pluginManagement> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.3</version> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2-beta-5</version> </plugin> <plugin> <artifactId>maven-dependency-plugin</artifactId> <version>2.1</version> </plugin> <plugin> <artifactId>maven-release-plugin</artifactId> <version>2.0</version> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <artifactId>maven-clean-plugin</artifactId> <version>2.4.1</version> <executions> <execution> <id>default-clean</id> <phase>clean</phase> <goals> <goal>clean</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-install-plugin</artifactId> <version>2.3.1</version> <executions> <execution> <id>default-install</id> <phase>install</phase> <goals> <goal>install</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.4.3</version> <executions> <execution> <id>default-resources</id> <phase>process-resources</phase> <goals> <goal>resources</goal> </goals> </execution> <execution> <id>default-testResources</id> <phase>process-test-resources</phase> <goals> <goal>testResources</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.7.1</version> <executions> <execution> <id>default-test</id> <phase>test</phase> <goals> <goal>test</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <executions> <execution> <id>default-testCompile</id> <phase>test-compile</phase> <goals> <goal>testCompile</goal> </goals> </execution> <execution> <id>default-compile</id> <phase>compile</phase> <goals> <goal>compile</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> <executions> <execution> <id>default-war</id> <phase>package</phase> <goals> <goal>war</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-deploy-plugin</artifactId> <version>2.5</version> <executions> <execution> <id>default-deploy</id> <phase>deploy</phase> <goals> <goal>deploy</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-site-plugin</artifactId> <version>2.0.1</version> <executions> <execution> <id>default-site</id> <phase>site</phase> <goals> <goal>site</goal> </goals> <configuration> <outputDirectory>F:\projetos\maven.default\target\site</outputDirectory> <reportPlugins> <reportPlugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> </reportPlugin> </reportPlugins> </configuration> </execution> <execution> <id>default-deploy</id> <phase>site-deploy</phase> <goals> <goal>deploy</goal> </goals> <configuration> <outputDirectory>F:\projetos\maven.default\target\site</outputDirectory> <reportPlugins> <reportPlugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> </reportPlugin> </reportPlugins> </configuration> </execution> </executions> <configuration> <outputDirectory>F:\projetos\maven.default\target\site</outputDirectory> <reportPlugins> <reportPlugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> </reportPlugin> </reportPlugins> </configuration> </plugin> </plugins> </build> <reporting> <outputDirectory>F:\projetos\maven.default\target\site</outputDirectory> </reporting></project>Apos este trecho posso dizer que o Maven realmente e muito habilidoso e que e uma ferramenta construida para facilitar a nossa vida.