Back to Blog
![]() Select Runtime and Java compiler version as configured in class path. TestMavenWebApp Project -> Right Click ->Properties -> Project Facets It will show some compile time issue on index.jsp page because not attached with any Web Server and also select Java compiler version from facet as given screen. Import -> General-> Existing Project in Workspace -> Select Project TestMavenWebApp > maven-eclipse-plugin:2.10:eclipse (default-cli) > generate-resources TestMavenWebApp > Convert to Eclipse Maven Project : Use below commandĬ:\Users\facingissuesonit\workspace-sample\TestMavenWebApp>mvn eclipse:eclipse -Dwtpversion=2.0.Import to Eclipse : To import this project in eclipse first we need to convert this project according to eclipse and then import it. Now time to import this project in eclipse. Now our build is successful and architecture created by maven is ready. Building war: C:\Users\facingissuesonit\workspace-sample\TestMavenWebApp\target\TestMavenWebApp.war maven-war-plugin:2.2:war (default-war) TestMavenWebApp. maven-surefire-plugin:2.12.4:test (default-test) TestMavenWebApp. maven-compiler-plugin:3.1:testCompile (default-testCompile) TestMavenWebApp. skip non existing resourceDirectory C:\Users\facingissuesonit\workspace-sample\TestMavenWebApp\src\test\resources maven-resources-plugin:2.6:testResources (default-testResources) TestMavenWebApp. maven-compiler-plugin:3.1:compile (default-compile) TestMavenWebApp. Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. ![]() maven-resources-plugin:2.6:resources (default-resources) TestMavenWebApp. ![]() Building TestMavenWebApp Maven Webapp 1.0-SNAPSHOT It will go through all these steps to complete build life cycle as you can see from console logs.It will create war file for your application.Ĭ:\Users\facingissuesonit\workspace-sample\TestMavenWebApp>mvn package > maven-archetype-plugin:3.0.1:generate (default-cli) > generate-sources standalone-pom >īuild Project : Go to project directory and run below command to build your project. DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false Mvn archetype:generate -DgroupId= -DartifactId=TestMavenWebApp -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=falseīecause we are creating our first project with maven that’s why it will download lots of jars and dependency from maven repository.Ĭ:\Users\facingissuesonit\workspace-sample>mvn archetype:generate -DgroupId=com.facingissuesissueonit -DartifactId=TestMavenWebApp Go to directory/ workspace where you want to create maven Java project. Follow link for Maven Configuration in Window and Linux Install and Configure Maven in your machine.Maven provide maven-archetype-webapp archetype artifact to create Dynamic Web based application from command prompt. In this below example will show steps to create Dynamic Web Project using maven and import to eclipse.
0 Comments
Read More
Leave a Reply. |