Hi John,

I changed my pom according to what you said, by removing the provided portion.
However, I am still getting the below error :

Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war 
(default-war) on project Hi5S: Error assembling WAR: webxml attribute is 
required (or pre-existing WEB-INF/web.xml if executing in update mode) 

I have provided web.xml in the WEB-INF :

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
         http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd";
         version="3.1">
  <display-name>Hi5S</display-name>
  <welcome-file-list>
    <welcome-file>tutorRegister.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
  <welcome-file>index.htm</welcome-file>
  <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <resource-ref>
 <description>MySQL Datasource</description>
 <res-ref-name>jdbc/hi5s</res-ref-name>
 <res-type>javax.sql.DataSource</res-type>
 <res-auth>Container</res-auth>
</resource-ref>
  </web-app>

Hope you can let me know what the error is trying to tell me.

Tks.
--------------------------------------------
On Fri, 1/26/18, John Patrick <nhoj.patr...@gmail.com> wrote:

 Subject: Re: Is there another alternative to using maven plug-in ?
 To: "Maven Users List" <users@maven.apache.org>, "Karen Goh" 
<karenwo...@yahoo.com>
 Date: Friday, January 26, 2018, 9:58 PM
 
 Change your pom to something like
 this;
 
 <groupId>Hi5S</groupId>
        
 <artifactId>Hi5S</artifactId>
  
       <version>0.0.1-SNAPSHOT</version>
        
 <packaging>war</packaging>
    
     <properties>
 
 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                
 <maven.compiler.source>1.8</maven.compiler.source>
                
 <maven.compiler.target>1.8</maven.compiler.target>
         </properties>
 
         <build>
                 <plugins>
                        
 <plugin>
                    
           
 <groupId>org.apache.maven.plugins</groupId>
                               
 <artifactId>maven-war-plugin</artifactId>
                               
 <version>3.1.0</version>
    
                     </plugin>
                 </plugins>
         </build>
 
 <packaging>war</packaging>, tell
 maven your wanting to create a war
 not a
 jar, using maven-war-plugin as a plugin as show above
 tells
 maven your wanting to use a specific
 version of the maven plugin.
 there are pros
 and cons to hard coding a maven plugin version. i
 always do because i've been burnt on
 projects where they needed a
 specific
 version but didn't define what version they needed and
 whilst
 that version was the latest things
 worked correctly. But then you come
 back to
 bug fixing that project 2-4 years later and the latest
 maven
 plugin works differently.
 
 dependencies are for external
 code that your java code depends upon
 
 
 
 
 On 26 January 2018 at 11:08, Karen Goh <karenwo...@yahoo.com.invalid>
 wrote:
 > Hi expert,
 >
 > I have been running
 into alot of issue lately and I suspect if it is because I
 have using Maven plug-in?
 >
 > Here's how I do the
 maven-war-plugin:
 >
 >
 <groupId>Hi5S</groupId>
 > 
        <artifactId>Hi5S</artifactId>
 >        
 <version>0.0.1-SNAPSHOT</version>
 >        
 <packaging>war</packaging>
 >         <properties>
 >                
 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 >                
 <maven.compiler.source>1.8</maven.compiler.source>
 >                
 <maven.compiler.target>1.8</maven.compiler.target>
 >         </properties>
 >
 >        
 <dependencies>
 >           
      <dependency>
 >         
               
 <groupId>org.apache.maven.plugins</groupId>
 >                        
 <artifactId>maven-war-plugin</artifactId>
 >                        
 <version>3.1.0</version>
 > 
                       
 <scope>provided</scope>
 > 
                </dependency>
 >
 > I'd like to know
 if it is ok I don't use maven to do the compile but used
 Eclipse to do it instead ?
 >
 > If it is so, how should I change the
 maven-war-plugin to ?
 >
 > I feel that this is the cause that Eclipse
 is not able to do proper debugging as in showing the
 stackover of what's happening when I run debug on
 server.
 >
 > Correct me
 if I am wrong..but I am at my wits end and this is the
 strongest suspect.
 >
 >
 Hope someone can tell me how to make pom as simple as
 possible...I just want to add the relevant
 dependencies...that's all.
 >
 > Tks & regards,
 >
 Karen
 >
 >
 ---------------------------------------------------------------------
 > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 > For additional commands, e-mail: users-h...@maven.apache.org
 >
 
 ---------------------------------------------------------------------
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to