Course Design Error primeFaces Algaworks

Asked

Viewed 385 times

1

I’m Doing a Workshop of PrimeFaces by the company AlgaWorks, but is showing this error in the project in the file pom.xml.

inserir a descrição da imagem aqui

The complete code of the file pom.xml

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.cursoprimefaces</groupId>
  <artifactId>iniciando-primefaces</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
        <groupId>org.glassfish</groupId>
        <artifactId>javax.faces</artifactId>
        <version>2.3.0-m03</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
            <groupId>org.primefaces</groupId>  
            <artifactId>primefaces</artifactId>  
            <version>5.1</version>  
            <scope>compile</scope>
    </dependency>
  </dependencies>

  <build>
      <plugins>
          <plugin>
             <artifactId>maven-compiler-plugin</artifactId>
                  <version>3.1</version>
                       <configuration>
                          <source>1.8</source>
                          <target>1.8</target>
                       </configuration>
         </plugin>
      </plugins>
  </build>
</project>
  • 1

    You already have the file web.xml?

  • Another thing, take this "insert the code here" which is in front of the dependency

2 answers

2

That mistake web.xml not found is a mistake of maven-war-plugin, there is the file web.xml? If it does not exist and should not exist, configure the plugin to

<failOnMissingWebXml>false</failOnMissingWebXml>

Adding this inside the project -> plugins:

<plugin>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.6</version>
    <configuration>
        <filteringDeploymentDescriptors>false</filteringDeploymentDescriptors>
    </configuration>
</plugin>

Note: just check the version of your plugin

0

In case of error in War you must click with the right mouse on 1 - Project explorer 2 - Right Boot in deplyment Descriptor 3 - generate Deployment Descriptor stub

Create an xml file that fixes the error, if it persists, create the file again.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.