<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelversion>4.0.0</modelversion> <groupid>com.dineshonjava.example</groupid> <artifactid>maven_first_example</artifactid> <version>0.0.1-SNAPSHOT</version> <name>sample project</name> <description>this project is being created for learning.</description> </project>
package com.dineshonjava; public class Example1 { public static void main(String[] args) { System.out.println("welcome to maven"); } }
11) Now we need to run the application, Before running the application we need to build that and to build that
a) right click on the project
b) click on the run as ‘maven install’
c) after clicking that look into console , if every thing will be fine you will find following :
[INFO] [INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ maven_first_example --- [INFO] Building jar: E:newsprinwsmaven_first_exampletargetmaven_first_example-0.0.1-SNAPSHOT.jar [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ maven_first_example --- [INFO] Installing E:newsprinwsmaven_first_exampletargetmaven_first_example-0.0.1-SNAPSHOT.jar to C:Userslenovo.m2repositorycomdineshonjavaexamplemaven_first_example.0.1-SNAPSHOTmaven_first_example-0.0.1-SNAPSHOT.jar [INFO] Installing E:newsprinwsmaven_first_examplepom.xml to C:Userslenovo.m2repositorycomdineshonjavaexamplemaven_first_example.0.1-SNAPSHOTmaven_first_example-0.0.1-SNAPSHOT.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.271s [INFO] Finished at: Tue Jun 16 23:35:35 IST 2015 [INFO] Final Memory: 7M/178M [INFO] ------------------------------------------------------------------------
Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…
Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…
Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…
Technology has emerged a lot in the last decade, and now we have artificial intelligence;…
Managing a database is becoming increasingly complex now due to the vast amount of data…
Overview In this article, we will explore Spring Scheduler how we could use it by…