`

Maven simple usage

阅读更多

----------------------------------------------------------------------------------------------------------------------------------

 

Start up steps:

 

Step 1) download maven from http://maven.apache.org onto your local drive

 

Step 2) setup environment variable M2_HOME=C:\apache-maven-2.0.9

 

Step 3) update environment varialbe path=%path%;%M2_HOME%\bin

 

Step 4) enter dos cmd

 

Step 5) go to some newly-created folder. issue command "mvn--version"  to check maven version

 

Step 6) issue command "mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app" to create a new sample project

----------------------------------------------------------------------------------------------------------------------------------

 

Command list:

 

For some of them, to issue a command, you need to first go to any folder which contains pom.xml.

 

creat sample application: mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app

build using maven: mvn package

check maven verion:  mvn --version

create project site: mvn site

 

----------------------------------------------------------------------------------------------------------------------------------

 

About phase:

 

Phase is a sequence list. The sequence list is:

validate, compile, test, package, integration-test, verify, install, deploy

 

if you issue: mvn validate, it will run mvn validate

if you issue: mvn compile, it will run mvn validate, and then, mvn compile

if you issue: mvn deploy, it will run all of them, in sequence.

 

Except the above sequence, there are another 2 : clean and site.

----------------------------------------------------------------------------------------------------------------------------------

Usful site:

 

Maven in 5 minutes: http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html

Maven getting started Guide: http://maven.apache.org/guides/getting-started/index.html

----------------------------------------------------------------------------------------------------------------------------------

分享到:
评论

相关推荐

    Android代码-具有内置搜索选项的强大且可自定义的搜索对话框。

    search-dialog An awesome and customizable search dialog with built-...Simple usage if you just want to use the simple search dialog first you need to provide searchable items. to achieve this you should

    Android代码-Simple Android SharedPreferences wrapper

    Simple Android SharedPreferences wrapper. Repository Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ... maven { url ...

    Android代码-SimpleTagImageView

    Usage Quick Start Gradle compile 'net.wujingchao.android.view:simple-tag-imageview:1.0.1' Maven <!-- you should configure jcenter repository--> net.wujingchao.android.view simple-tag-...

    Android代码-camera-touch-button

    Simple component to capture photo Keep the button pressed to open the camera release the button to capture the photo :) This library uses CameraKit-Android Demo Install Add the dependecy in build....

    Android代码-Droppy

    Usage (Maven) com.shehabic.droppy Droppy 0.6.0 Usage (Gradle) compile 'com.shehabic.droppy:Droppy:0.6.0@aar' Generate Programmatically // Assume we have a button in our Layout as follows Buttton ...

    Android代码-QingtingBannerView

    A simple banner has infinite loop and animated line. Demo Feature Infinite loop Animated line in bottom Auto scroll Import Add it in your project's build.gradle at the end of repositories: ...

    Android代码-Android 画板 View,随心所欲的画画。

    Draw anything you like in your Android device from simple view. Customize draw settings like draw color, draw width or draw tools. Undo or redo actions it is possible with DrawView. View ...

    Android代码-CacheFileProvider

    This is a minimal library with a few lines of code and without dependencies that offers a simple cache file provider (simple read only access for sharing files with other apps). Gradle (via JitPack.io...

    Android代码-A simple library to add carousel view in android app.

    A simple yet flexible library to add carousel view in your android application. Download Gradle: compile 'com.synnapps:carouselview:0.1.5' Maven: com.synnapps carouselview 0.1.5 pom Usage ...

    Android代码-Parrot

    then provides you a simple function to tame all your needs: ImageView.load This function has the following parameters: url, optional string with current remote image url placeholder, optional bitmap ...

    Android代码-fadingIndicator

    A simple indicator with fading animation for ViewPager in Android. Most of the existing indicators don’t provide a smooth transition, this library fades indicators in and out when pager flipped. ...

    Android代码-自定义View组织机构图 和层次图

    A Simple Realization of OrgView Because I cannot find a valid solution unless Google OrgChart and some OrgChart.js. 中文版 Installation Gradle Step 1. Add it in your root build.gradle at the end of ...

    Android代码-Quicktoast

    Quicktoast ...Usage Create a object of library class private Quicktoast toast = new Quicktoast(this); There are three types of toast that you can use. Simple Toast 1. ```toast.ltoast("Simp

    Android代码-WaveProgressView

    a simple progress view. gradle /build.gradle jitpack.io repositories { maven { url "https://jitpack.io" } } /app/build.gradle compile 'com.github.zeng1990java:WaveProgressView:1.0.5' usage ...

    Android代码-PermissionHelper

    PermissionHelper Android Library to help you with your runtime Permissions. Demo Android M Watch it in action. Pre M Watch it in action. ...>The answer is simple: (Educating UI) that explains

    Android代码-SplashScreen

    Android library for getting a nice and simple SlashScreen into your Android app. Installation Up to now, the library is only available in JitPack. Please add this code to your build.gradle file on ...

    Android代码-Range-Time-Picker-Dialog

    Simple Android Library that provide you a custom dialog that allow you to set a start time and end time. Screenshot Install Add this to your project build.gradle allprojects { ...

    Android代码-LowPoly

    2.LowPoly is available in the MavenCentral, so getting it as simple as adding it as a dependency compile 'com.uniquestudio:lowpoly:1.0.2' Usage Bitmap out = LowPoly.generate(Bitmap bitmap, int ...

    Android代码-rx-java-extensions

    This library allow simple implementation for some tasks in android Usage Add library to project dependencies. repositories { maven { url "https://jitpack.io" } } dependencies { // snapshot ...

    Android代码-一个简单的滑动开关

    A simple, yet awesome sliding button for Android. Preview Get the sample apk here Setup Gradle Add this to your project level build.gradle: allprojects { repositories { jcenter() maven { url ...

Global site tag (gtag.js) - Google Analytics