Solved

maven project clean install and build and adding as war web plugin

Posted on 2016-09-23
4
35 Views
Last Modified: 2016-10-03
Hi,

When right click on maven project from eclipse and give goal like below

clean install

what it does?

when i give like below

build
it says unknow command

how to build?
is install same as build?
where i can find all list of frequenctly used commmands from command prompt and also from eclipse.

how to add one other project(say xyz) as plugin into existing project (say abc)



i have to change below to war instead of jar inside the xyz pom file?
<packaging>war</packaging>
when i change package to war then refresh i see Deployment Descripot created for that project.
when i right on above say generate stubs looks like stubs generaed. wonder why we need stubs?
please advise
how-to-change-to-war2.png
how-to-change-to-war1.png
mavenBuild.png
0
Comment
Question by:gudii9
  • 2
4 Comments
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
Comment Utility
how to build?
is install same as build?
To build a Maven project you would probably use the "package" goal. That will compile the source code into class files and package those class files into a JAR/WAR. The install will do all that, but will also then copy that packaged file to the local Maven repository, usually a directory called ".m2" in your user directory or a root directory.

For more info on this and other goals see https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
0
 
LVL 15

Expert Comment

by:gurpsbassi
Comment Utility
Too many questions wrapped in one post.
0
 
LVL 7

Author Comment

by:gudii9
Comment Utility
how to build? is install same as build?
To build a Maven project you would probably use the "package" goal. That will compile the source code into class files and package those class files into a JAR/WAR. The install will do all that, but will also then copy that packaged file to the local Maven repository, usually a directory called ".m2" in your user directory or a root directory.

how .m2 in user directory and root directory are related or different?
0
 
LVL 7

Author Comment

by:gudii9
Comment Utility
clean install

what it does?

when i give like below

build
it says unknow command

goal commands that we give using elipse edit configuration and other way from coomand prompt both are same? which one is preferred when?


how to add one other project(say xyz) as plugin into existing project (say abc)

how to do this?


i have to change below to war instead of jar inside the xyz pom file?
<packaging>war</packaging>
this i know as above simply change war to jar or vice versa

when i change package to war then refresh i see Deployment Descripot created for that project.
when i right on above say generate stubs looks like stubs generaed. wonder why we need stubs?
not clear on create stub part similar to web services?
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now