How to Create a. Eclipse Maven Plugin Apache maven war plugin usage Crunchify.Maven is pretty amazing, isnt it Well for me at least I love using Maven in my daily Java Development practice.Install the IDE. Install the JRE with the default settings To install eclipse, unzip the content to CProgram Fileseclipse Create a shortcut to Eclipse.Install Php Plugin Eclipse Ubuntu Install DockerMaven is nothing but a plugin execution framework all work is done by plugins.Ive written number of Maven tutorials on Crunchify mainly on Maven Plugins.Here are couple of them Use maven shade plugin to create 1 single executable jar.Use maven resources, maven dependency and maven jar plugins to create executable jar file with all dependencies into 1 folder.Now how about creating .Maven in Eclipse This Maven Tutorial focuses on maven war plugin.Install Php Plugin Eclipse Ubuntu Installer' title='Install Php Plugin Eclipse Ubuntu Installer' />Our requirement here is to generate single.Maven which you could run on Apache Tomcat or any other web container.Lets get started Create Dynamic Web Project in Eclipse, i.Crunchify. Tutorial.Create simple . java file into your project, i.Crunchify. War. Using.Maven. java. Convert Java Project into Maven project in Eclipse.Add maven war plugin to pom.Run command clean install to generate.Step 1. Create Dynamic Web Project in to Eclipse, i.Crunchify. Tutorial.Click. File New Other Dynamic Web Project Provide Project.Name Crunchify. TutorialClick Finish.Step 2. Convert Project to Maven Project.Follow these steps http crunchify.Step 3. Create simple java file named Crunchify.War. Using. Maven.NOTE In your dynamic web project you must have web.You could use also Simple Spring MVC project too if you want for Step 3 here.If you dont see web.Crunchify. War. Using.MavenpublicstaticvoidmainStringargs.Test. Test by Crunchify.This is a simple tutorial on how to create.Maven Plugin. Here is a project structure.You could ignore other files and folders from below diagram Step 4.Open your pom. xml file and update it with below code.Mainly look at line 7 and 2.We are packaging project as war using lt packaging warlt packaging.POM4. 0. 0xmlns xsihttp www.XMLSchema instancexsi schema.Locationhttp maven.POM4. 0. 0 http maven.Version 4. 0. Version lt group.Id Crunchify. Tutoriallt group.Id lt artifact. Id Crunchify.Tutoriallt artifact.Id lt version 0. SNAPSHOTlt version lt packaging warlt packaging lt source.Directory srclt source.Directory lt artifact.Id maven compiler pluginlt artifact.Id lt artifact. Id maven war pluginlt artifact.Id lt war. Source. Hitman 2 Download For Pc more. Directory Web. Contentlt war.Source. Directory lt fail.On. Missing. Web.Xml falselt fail.On. Missing. Web.Xml lt group. Id javax.Id lt artifact. Id servlet apilt artifact.Id Step 5. Now Right Click on Project Run As Maven Build Number 5.Step 6. Maven clean install on project.Step 7. Checkout your Build result in Eclipse console.Step 8. Thats it.Now get your. war file from target directory and deploy into Apache Tomcat or any other Web Container.Join the Discussion.Share leave us some comments on what you think about this topic or if you like to add something.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2017
Categories |