Created
December 18, 2010 09:55
-
-
Save sourcerebels/746361 to your computer and use it in GitHub Desktop.
Multi-module Maven project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> | |
<parent> | |
<artifactId>test-multimodule</artifactId> | |
<groupId>com.sourcerebels</groupId> | |
<version>1.0-SNAPSHOT</version> | |
</parent> | |
<groupId>com.sourcerebels.framework</groupId> | |
<artifactId>framework-core</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<name>framework-core</name> | |
<url>http://www.sourcerebels.com</url> | |
<packaging>jar</packaging> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
</properties> | |
<dependencies> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>3.8.1</version> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> | |
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<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>com.sourcerebels</groupId> | |
<artifactId>test-multimodule</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>pom</packaging> | |
<name>test-multimodule</name> | |
<url>http://www.sourcerebels.com</url> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
</properties> | |
<dependencies> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>3.8.1</version> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> | |
<modules> | |
<module>framework-core</module> | |
<module>testapp</module> | |
</modules> | |
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> | |
<parent> | |
<artifactId>test-multimodule</artifactId> | |
<groupId>com.sourcerebels</groupId> | |
<version>1.0-SNAPSHOT</version> | |
</parent> | |
<groupId>com.sourcerebels.framework</groupId> | |
<artifactId>testapp</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<name>testapp</name> | |
<url>http://www.sourcerebels.com</url> | |
<packaging>war</packaging> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
</properties> | |
<dependencies> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>3.8.1</version> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> | |
<build> | |
<finalName>testApp</finalName> | |
<plugins> | |
<plugin> | |
<groupId>org.mortbay.jetty</groupId> | |
<artifactId>maven-jetty-plugin</artifactId> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on Erick Camacho Screencast [Tutorial de Maven 3 por Erick Camacho javaHispano] [1].
parent-pom.xml This is the main module. This is just a POM file to group common project dependencies, and manage all modules of a enterprise projects at same time. Important points:
And then, if all is ok, pointing your web browser to:
[1] : http://vimeo.com/17531468 "Tutorial de Maven 3 por Erick Camacho javaHispano"