android - How to include maven dependencies in Cordova command line build? -
i have cordova project uses maven manage dependencies, when "cordova build" in command line, cannot find maven depencencies causing compile fail.
how include maven dependencies in cordova command line build? pointer appreciated.thanks
you can .gradle
files cordovalib/cordova.gradle
, cordovalib/build.gradle
via gradle
in maven found different approach efficient.
git clone http://github.com/my_maven_repo
cd
, pom.xml
file
go <build><plugins>
tags , existing plugins add these 2:
<plugin> <artifactid>maven-assembly-plugin</artifactid> <configuration> <archive> <manifest> <mainclass>fully.qualified.mainclass</mainclass> </manifest> </archive> <descriptorrefs> <descriptorref>jar-with-dependencies</descriptorref> </descriptorrefs> </configuration> </plugin> <plugin> <artifactid>maven-assembly-plugin</artifactid> <configuration> <archive> <manifest> <mainclass>fully.qualified.mainclass</mainclass> </manifest> </archive> <descriptorrefs> <descriptorref>jar-with-dependencies</descriptorref> </descriptorrefs> </configuration> <executions> <execution> <id>make-assembly</id><phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin>
now, go terminal , type command mvn clean compile assembly:single
. you'll see new jar
dependencies in /packagename/target/
compiled jar
- import cordova or android/java project.
hope helps
Comments
Post a Comment