Solved

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

Posted on 2016-09-23
4
47 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
ID: 41813404
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
ID: 41813721
Too many questions wrapped in one post.
0
 
LVL 7

Author Comment

by:gudii9
ID: 41813882
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
ID: 41813885
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

863 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

20 Experts available now in Live!

Get 1:1 Help Now