GUJ
Notícias, artigos e o maior fórum brasileiro sobre Java
home
fórum
notícias
tópicos recentes
empregos
artigos
Bem-vindo ao GUJ.
Crie seu login
, ou digite-o para logar no site.
Usuário:
Senha:
Maven - MultiModule - Properties do Parent Pom
Índice dos Fóruns
»
Ferramentas, Frameworks e Utilitários
Autor
Mensagem
03/02/2012 15:04:34
Assunto:
Maven - MultiModule - Properties do Parent Pom
rafaelcavazin
What is classpath?
Membro desde: 15/07/2010 23:41:43
Mensagens: 6
Localização: São Paulo
Offline
no meu parent pom tenho
<properties>
<org.springframework.version>3.0.5.RELEASE</org.springframework.version>
<org.springframework.jpa.version>2.0.8</org.springframework.jpa.version>
<org.springframework.ws.version>2.0.3.RELEASE</org.springframework.ws.version>
<org.mockito.version>1.9.0</org.mockito.version>
<org.junit.version>4.10</org.junit.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
e no meu pom do filho , tenho algo como
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${org.mockito.version}</version>
</dependency>
A pergunta é : como referenciar a propriedade do pai ?
Olhei no googliss, mas não vi uma solução que funcione.
vlw
macBook5,1 - leopard
03/02/2012 15:57:05
Assunto:
Re:Maven - MultiModule - Properties do Parent Pom
lsjunior
JavaGuru
Membro desde: 17/03/2010 10:41:40
Mensagens: 236
Offline
Talvez isso te ajude:
<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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>br.net.woodstock.jee6web</groupId> <artifactId>jee6-web-parent</artifactId> <packaging>pom</packaging> <version>1.0</version> <name>JEE6 Application</name> <url>http://woodstock.net.br</url> <properties> <!-- Maven --> <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding> <!-- Java --> <ear.version>6</ear.version> <java.version>1.6</java.version> <!-- Test --> <test /> <!-- Libs --> <jee.version>6.0</jee.version> <junit.version>3.8.2</junit.version> <richfaces.version>4.1.0.Final</richfaces.version> <!-- Plugins --> <plugin.compiler.version>2.3.2</plugin.compiler.version> <plugin.jar.version>2.3.2</plugin.jar.version> <plugin.resources.version>2.4.3</plugin.resources.version> <plugin.surefire.version>2.6</plugin.surefire.version> <plugin.war.version>2.1.1</plugin.war.version> </properties> <modules> <module>jee6-web-app</module> <module>jee6-web-components</module> <module>jee6-web-resources</module> </modules> <build> <defaultGoal>package</defaultGoal> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${plugin.compiler.version}</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> <encoding>${project.build.sourceEncoding}</encoding> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>${plugin.resources.version}</version> <configuration> <encoding>${project.build.sourceEncoding}</encoding> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${plugin.surefire.version}</version> <configuration> <failIfNoTests>false</failIfNoTests> </configuration> </plugin> </plugins> </build> <dependencyManagement> <dependencies> <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>${jee.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax</groupId> <artifactId>javaee-endorsed-api</artifactId> <version>${jee.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax</groupId> <artifactId>javaee-web-api</artifactId> <version>${jee.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> </dependency> <dependency> <groupId>org.richfaces</groupId> <artifactId>richfaces-bom</artifactId> <version>${richfaces.version}</version> <scope>import</scope> <type>pom</type> </dependency> </dependencies> </dependencyManagement> </project>
<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> <artifactId>jee6-web-app</artifactId> <packaging>war</packaging> <parent> <relativePath>../</relativePath> <groupId>br.net.woodstock.jee6web</groupId> <artifactId>jee6-web-parent</artifactId> <version>1.0</version> </parent> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>${plugin.war.version}</version><!-- Isso eh o que vc quer --> <configuration> <archive> <manifestEntries> <Dependencies>javax.faces.api, com.sun.jsf-impl</Dependencies> </manifestEntries> </archive> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>br.net.woodstock.jee6web</groupId> <artifactId>jee6-web-components</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>br.net.woodstock.jee6web</groupId> <artifactId>jee6-web-resources</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>javax</groupId> <artifactId>javaee-web-api</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.richfaces.core</groupId> <artifactId>richfaces-core-impl</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.richfaces.ui</groupId> <artifactId>richfaces-components-ui</artifactId> <scope>compile</scope> </dependency> </dependencies> </project>
Índice dos Fóruns
»
Ferramentas, Frameworks e Utilitários
Ir para:
Selecione um Fórum
Notícias
Assuntos gerais (Off-topic)
MundoJ - Artigos, Notícias e Debates
Artigos e Tutoriais
Java Básico
Java Avançado
Ferramentas, Frameworks e Utilitários
Desenvolvimento Web
Interface Gráfica
Google Android e Java Micro Edition (ME)
Certificação Java
Persistência: Hibernate, JPA, JDBC e outros
Java Enterprise Edition (Java EE)
Frameworks e Bibliotecas brasileiros
RIA - Flex, JavaFX e outros
Arquitetura de Sistemas
Metodologias de Desenvolvimento e Testes de Software
JavaScript
Ruby & Ruby on Rails
Outras Linguagens
Powered by
JForum 2.1.8
©
JForum Team