Maven changing faces-config.xml

0

I have an EJB project and my maven is changing the faces-config.xml when I run "mvn install", maven changes everything inside it leaving without the paths I specify, it follows my "pom" file WEB 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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>WEB</artifactId>
    <packaging>war</packaging>
    <properties>
        <basedir>${project.basedir}</basedir>
    </properties>
    <parent>
        <groupId>br.com.empresa</groupId>
        <artifactId>Pai</artifactId>
        <version>1</version>
    </parent>
    <dependencies>
        <!-- dependencia de projetos -->

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>EJBClient</artifactId>
            <version>1</version>
            <optional>true</optional>
        </dependency>
            <artifactId>seguranca</artifactId>
            <groupId>br.com.empresa/groupId>
            <version>1.14</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <artifactId>utilitarios</artifactId>
            <groupId>br.com.empresa</groupId>
            <version>1.16</version>
        </dependency>

        <dependency>
            <artifactId>batch-api</artifactId>
            <groupId>br.com.empresa</groupId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- commons -->
        <dependency>
            <artifactId>commons-beanutils</artifactId>
            <groupId>commons-beanutils</groupId>
            <version>1.8.3</version>
        </dependency>

        <dependency>
            <artifactId>commons-collections</artifactId>
            <groupId>commons-collections</groupId>
            <version>2.1</version>
        </dependency>

        <dependency>
            <artifactId>commons-digester</artifactId>
            <groupId>commons-digester</groupId>
            <version>2.1</version>
        </dependency>

        <!-- ibm -->
        <dependency>
            <groupId>com.ibm.icu</groupId>
            <artifactId>icu4j</artifactId>
            <version>52.1</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.15</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.sun.jmx</groupId>
                    <artifactId>jmxri</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jdmk</groupId>
                    <artifactId>jmxtools</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.jms</groupId>
                    <artifactId>jms</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>mail</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.ibm.websphere.j2ee</groupId>
            <artifactId>j2ee</artifactId>
            <version>7.0.0.29</version>
        </dependency>

        <dependency>
            <groupId>com.ibm.faces</groupId>
            <artifactId>jsf-ibm</artifactId>
            <version>20100702_1406</version>
        </dependency>

        <dependency>
            <artifactId>classworlds</artifactId>
            <groupId>classworlds</groupId>
            <version>1.1</version>
        </dependency>

        <dependency>
            <artifactId>jasperreports</artifactId>
            <groupId>net.sf.jasperreports</groupId>
            <version>5.5.1</version>
        </dependency>

        <dependency>
            <artifactId>junit</artifactId>
            <groupId>junit</groupId>
            <version>3.8.1</version>
        </dependency>

        <dependency>
            <artifactId>plexus-utils</artifactId>
            <groupId>plexus</groupId>
            <version>1.0.2</version>
        </dependency>

        <dependency>
            <artifactId>poi</artifactId>
            <groupId>org.apache.poi</groupId>
            <version>3.11</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <artifactId>javax.faces-api</artifactId>
            <groupId>javax.faces</groupId>
            <version>2.2</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>2.0.1</version>
        </dependency>

        <dependency>
            <groupId>com.ibm.websphere</groupId>
            <artifactId>sitelib</artifactId>
            <version>7.0.0.21</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>
    </dependencies>
    <build>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <webappDirectory>WebContent</webappDirectory>
                    <webXml>WebContent/WEB-INF/web.xml</webXml>
                    <!-- <archive> -->
                    <!-- <manifestFile>WebContent/META-INF/MANIFEST.MF</manifestFile> -->
                    <!-- <manifest> -->
                    <!-- <addClasspath>true</addClasspath> -->
                    <!-- </manifest> -->
                    <!-- </archive> -->
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

What could it be?

    
asked by anonymous 17.11.2015 / 19:31

1 answer

-1

In my case I did this:

        

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>${maven-war.version}</version>
            <configuration>
                <webXml>WebContent\WEB-INF\web.xml</webXml>
                <archive>
                    <manifest>
                        <addClasspath>true</addClasspath>
                        <classpathPrefix>lib/</classpathPrefix>
                    </manifest>
                </archive>
                <webResources>
                    <resource>
                        <directory>WebContent\WEB-INF\</directory>
                        <targetPath>WEB-INF</targetPath>
                        <includes>
                            <include>faces-config.xml</include>
                        </includes>
                    </resource>
                </webResources>
            </configuration>
        </plugin>
        ...
    </plugins>
</build>
    
23.07.2017 / 02:07