Fórum Como mudar propriedade outputFileNameMapping no pom do módulo EAR que esta como padrão? #592136
03/04/2018
0
Segue abaixo a configuração do projeto no maven
- Configuração do projeto no maven:
<?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>br.com.diego</groupId>
<artifactId>wms-ee8</artifactId>
<version>0.0.1</version>
<modules>
<module>wmsee8core</module>
<module>wmsee8web</module>
<module>wmsee8eap</module>
</modules>
<packaging>pom</packaging>
<properties>
<version.wildfly-swarm>2018.3.3</version.wildfly-swarm>
<maven.compiler.source>1.9</maven.compiler.source>
<maven.compiler.target>1.9</maven.compiler.target>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>br.com.diego</groupId>
<artifactId>wms-ee8-core</artifactId>
<version>${project.version}</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>br.com.diego</groupId>
<artifactId>wms-ee8-web</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<finalName>${project.artifactId}</finalName>
<pluginManagement>
<plugins>
<!-- The WildFly plugin deploys your ear to a local JBoss
AS container -->
<!-- Due to Maven's lack of intelligence with EARs we need
to configure the wildfly maven plugin to skip deployment for all modules.
We then enable it specifically in the ear module. -->
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.2.0.Final</version>
<configuration>
<hostname>${wildfly-hostname}</hostname>
<port>${wildfly-port}</port>
<username>${wildfly-username}</username>
<password>${wildfly-password}</password>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<ejbVersion>3.2</ejbVersion>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>- Configuração do módulo EAR
<?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">
<parent>
<artifactId>wms-ee8</artifactId>
<groupId>br.com.diego</groupId>
<version>0.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wms-ee8-eap</artifactId>
<packaging>ear</packaging>
<dependencies>
<dependency>
<groupId>br.com.diego</groupId>
<artifactId>wms-ee8-core</artifactId>
<type>ejb</type>
</dependency>
<dependency>
<groupId>br.com.diego</groupId>
<artifactId>wms-ee8-web</artifactId>
<type>war</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<version>7</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
</configuration>
</plugin>
</plugins>
</build>
</project>- Configuração do módulo EJB
<?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">
<parent>
<artifactId>wms-ee8</artifactId>
<groupId>br.com.diego</groupId>
<version>0.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wms-ee8-core</artifactId>
<packaging>ejb</packaging>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>8.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.3</version>
<configuration>
<ejbVersion>3.2</ejbVersion>
</configuration>
</plugin>
</plugins>
</build>
</project>- Configuração do módulo WAR
<?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">
<parent>
<artifactId>wms-ee8</artifactId>
<groupId>br.com.diego</groupId>
<version>0.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wms-ee8-web</artifactId>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>br.com.diego</groupId>
<artifactId>wms-ee8-core</artifactId>
<type>ejb</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>8.0</version>
</dependency>
<dependency>
<groupId>javax.mvc</groupId>
<artifactId>javax.mvc-api</artifactId>
<version>1.0-edr2</version>
</dependency>
<dependency>
<groupId>org.mvc-spec.ozark</groupId>
<artifactId>ozark-core</artifactId>
<version>1.0.0-m03</version>
</dependency>
<dependency>
<groupId>org.mvc-spec.ozark</groupId>
<artifactId>ozark-jersey</artifactId>
<version>1.0.0-m03</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.23.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Diego Silva
Curtir tópico
+ 0Posts
05/04/2018
Marcio Souza
Gostei + 0
05/04/2018
Marcio Souza
http://maven.apache.org/plugins/maven-ear-plugin/examples/customize-file-name-mapping.html
Gostei + 0
05/04/2018
Diego Silva
Então nesse caso eu não setei a a propriedade outputfilenaming exatamente para sair padrão que é groupId-artifactId-version.extension que é o que esta indo para o application.xml mas os arquivos jar e war estão sendo empacotados apenas com o artifactId.extension ai quando faço o deploy no wildfly ele diz que não consegue encontrar o jar e o war. Quando eu inclui a propriedade é como se ele ignorasse ela e mantivesse o padrão
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)