android - Cling how to install from github? -
i trying include project cling, before never used manually install maven.
on page instructions is:
install maven 3.2.3 or newer.
install android sdk , set android_home environment variable sdk install directory.
clone cling source:
git clone https://github.com/4thline/cling.gitchange cling/ directory.
install local ~/.m2 maven repository (this take few minutes if dependencies have downloaded first time).
mvn clean install
if build fails android/dex packaging errors, forgot clean.
- use cling in pom.xml with:
don't know why, pom.xml not insert here
you can see pom.xml on github page
i have done 1,2,3,4 steps, "install everything" in step 5, how ?
, last step pom.xml
, need put it?
step 5 comes down running command mvn clean install
command line.
maven configured of file, called pom file. xml file named pom.xml
. file contains maven during build. 1 of things compile java sources final artifact. compile source code, needs resolve dependencies; is, other libraries cling depends on. of required libraries declared in pom file.
maven automatically download every dependency of project. store them (or install them in maven jargon) local repository. repository directory structure on local drive contain every jar , pom maven have downloaded internet (more precisely remote repositories configured project).
maven process once. when dependencies installed in local repository, won't download them again (by default). why first build longer subsequent builds.
so, go through step 5, need to:
- open command prompt
- go directory checked out cling command
git clone https://github.com/4thline/cling.git
@ step 3. - go
cling
subdirectory. - there should
pom.xml
file here. main entry point maven. run commandmvn clean install
location.
step 6 targets project building. when steps 1 5 done, have compiled , installed latest version of cling. time use then!
well use it, need create maven project (there facilities every major ide eclipse or intellij) , declare project have dependency on cling. declaration done bit of xml in pom file of project.
<dependencies> <dependency> <groupid>org.fourthline.cling</groupid> <artifactid>cling-core</artifactid> <version>2.1.1-snapshot</version> </dependency> </dependencies>
i suggest read maven book sonatype acquainted using maven.
Comments
Post a Comment