Skip to main content

How to create Maven Project in Eclipse


Steps

Create a New Maven Project in Eclipse

1.   In the Eclipse IDE, navigate to File > New > Other… in order to bring up the project creation wizard.




1  2.  Scroll to the Maven folder, open it, and choose Maven Project. Then choose Next.

13.     You may choose to Create a simple project or forgo this option. For the purposes of this tutorial, we will choose the simple project. This will create a basic, Maven-enabled Java project. If you require a more advanced setup, leave this setting unchecked, and you will be able to use more advanced Maven project setup features. Leave other options as is, and click Next.

14.     Now, you will need to enter information regarding the Maven Project you are creating. You may visit the Maven documentation for a more in-depth look at the Maven Coordinates (http://maven.apache.org/pom.html#Maven_Coordinates). In general, the Group Id should correspond to your organization name, and the Artifact Id should correspond to the project’s name. The version is up to your discretion as is the packing and other fields. If this is a stand-alone project that does not have parent dependencies, you may leave the Parent Project section as is. Fill out the appropriate information, and click Finish.


65.     You will now notice that your project has been created. You will place your Java code in /src/main/java, resources in /src/main/resources, and your testing code and resources in /src/test/java and /src/test/resources respectively.


16.     Open the pom.xml file to view the structure Maven has set up. In this file, you can see the information entered in Step 4. You may also use the tabs at the bottom of the window to change to view Dependencies, the Dependency Hierarchy, the Effective POM, and the raw xml code for the pom file in the pom.xml tab.








Comments

Popular posts from this blog

How to Bind Apache Tomcat to IPv4 (Solved)

Apache Tomcat  is an open source web server and servlet container developed by the  Apache Software Foundation . It implements the Java Servlet, JavaServer Pages (JSP), Java Unified Expression Language and Java WebSocket specifications from Sun Microsystems and provides a web server environment for Java code to run in. Binding Tomcat to IPv4 is necessary if we have our server not working due to the default binding of our tomcat server to IPv6. As we know IPv6 is the modern way of assigning IP address to a device and is not in complete practice these days but may come into practice in soon future. So, currently we don't need to switch our tomcat server to IPv6 due to no use and we should bind it to IPv4. Before thinking to bind to IPv4, we should make sure that we've got tomcat installed in our CentOS 7. Here's is a quick tutorial on  how to install tomcat 8 in CentOS 7.0 Server . 1. Switching to user tomcat First of all, we'll gonna switch user to  tomcat  user. We

IOException parsing XML document from class path resource

Error Exception in thread "main" org . springframework . beans . factory . BeanDefinitionStoreException : IOException parsing XML document from class path resource [ src / main / java / resources / combined2 . xml ]; nested exception is java . io . FileNotFoundException : class path resource [ src / main / java / resources / combined2 . xml ] cannot be opened because it does not exist at org . springframework . beans . factory . xml . XmlBeanDefinitionReader . loadBeanDefinitions ( XmlBeanDefinitionReader . java : 341 ) at org . springframework . beans . factory . xml . XmlBeanDefinitionReader . loadBeanDefinitions ( XmlBeanDefinitionReader . java : 302 ) at org . springframework . beans . factory . support . AbstractBeanDefinitionReader . loadBeanDefinitions ( AbstractBeanDefinitionReader . java : 143 ) at org . springframework . beans . factory . support . AbstractBeanDefinitionReader . loadBeanDefinitions ( AbstractBeanDefinitionReader . java : 178 ) at

Linux Command htop vs top

Those who work with Linux servers, but also those who use Linux as a desktop every day knows that it is very useful to have a list of processes running on the machine with a list of resources they are using, to see who is eating all the memory or is using all the CPU, and the ps command is not exactly the most convenient. So we ‘ll see a series of programs that serve to show what’s happening in our system and who is using our resources. The first tool that you can use to get information is the  ps  command, yes i know, it’s not so handy but you are sure to have it installed in every machine and you can get quickly some information on the system: Get the top 10 CPU consuming process ps aux | sort -n -k 3 | tail -10 Get the top 10 memory consuming process ps aux | sort -n -k 4 | tail -10 Top In most Unix-like operating systems, the top command is a system monitor tool that produces a frequently-updated list of processes. By default, the processes are ordered by