URI:
   DIR Return Create A Forum - Home
       ---------------------------------------------------------
       knowledge-space
  HTML https://sravanks.createaforum.com
       ---------------------------------------------------------
       *****************************************************
   DIR Return to: Dictionary
       *****************************************************
       #Post#: 21--------------------------------------------------
       First time maven project Setup on eclipse to fix issues
   DIR By: sravan
       Date: October 3, 2017, 2:19 am
       ---------------------------------------------------------
       1. When you create a maven project on eclipse for the first
       time,  as soon as the project is setup, you will see eclipse is
       using Java 1.5  as default.
       To fix that, you need to add below code in the pom.xml root
       element (<project>) of  your project
       --- Quote ---
       >
       > <build>
       > <plugins>
       > <plugin>
       > <groupId>org.apache.maven.plugins</groupId>
       > <artifactId>maven-compiler-plugin</artifactId>
       > <version>3.7.0</version>
       > <configuration>
       > <source>1.8</source>
       > <target>1.8</target>
       > </configuration>
       > </plugin>
       > </plugins>
       > </build>
       >
       --- End Quote ---
       2. When you create a maven project on eclipse for the first
       time, as soon as the project is setup, you will see red marks on
       index.html.
       This is because, eclipse doesn't check the servers checkbox in
       runtime tab.
       Below is the image on how to fix it
       [attach=1]
       3. When you create a servlet in the same maven project for the
       first time, you will see red marks on servlet saying "package
       javax.servlet does not exist"
       To fix that, you need to add below code in the pom.xml of your
       project
       --- Quote ---
       >
       > <dependency>
       > <groupId>javax.servlet</groupId>
       > <artifactId>javax.servlet-api</artifactId>
       > <version>3.0.1</version>
       > <scope>provided</scope>
       > </dependency>
       >
       >
       --- End Quote ---
       *****************************************************
       Page 1 of 1