pom.xml - Including a jar in maven local repository -
i want include jar in local repository(google-api-java-client 1.6.0-beta). include need write in pom.xml, while try include , not getting included in local repository. below pom.xml of project:
<?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelversion>4.0.0</modelversion> <!-- basics --> <groupid>com.google.trypredictionjava</groupid> <artifactid>gae-java</artifactid> <version>1.0-snapshot</version> <packaging>war</packaging> <name>try-prediction-java</name> <pluginrepositories> <pluginrepository> <id>maven-gae-plugin-repo</id> <name>maven-gae-plugin repository</name> <url>http://maven-gae-plugin.googlecode.com/svn/repository</url> </pluginrepository> </pluginrepositories> <repositories> <repository> <id>google-api-services</id> <url>http://mavenrepo.google-api-java-client.googlecode.com/hg</url> </repository> <repository> <id>maven-gae-plugin-repo</id> <name>maven-gae-plugin repository</name> <url>http://maven-gae-plugin.googlecode.com/svn/repository</url> </repository> </repositories> <dependencies> <!-- 8th apr <dependency> <groupid>com.google.api-client</groupid> <artifactid>google-api-client</artifactid> <version>1.13.2-beta</version> </dependency> --> <dependency> <groupid>com.google.api-client</groupid> <artifactid>google-api-client</artifactid> <version>1.14.1-beta</version> </dependency> <dependency> <groupid>com.google.api-client</groupid> <artifactid>google-api-client</artifactid> <version>1.6.0-beta</version> </dependency> <!-- <dependency> <groupid>com.google.api-client</groupid> <artifactid>google-api-client</artifactid> <version>1.4.0-beta</version> </dependency> --> <!-- 8th apr <dependency> <groupid>com.google.oauth-client</groupid> <artifactid>google-oauth-client</artifactid> <version>1.13.1-beta</version> </dependency> <dependency> <groupid>com.google.oauth-client</groupid> <artifactid>google-oauth-client-servlet</artifactid> <version>1.13.1-beta</version> </dependency> <dependency> <groupid>com.google.api.client</groupid> <artifactid>google-api-client-http</artifactid> <version>1.2.3-alpha</version> </dependency> <dependency> <groupid>com.google.api-client</groupid> <artifactid>google-api-client</artifactid> <version>1.13.2-beta</version> </dependency> <dependency> <groupid>com.google.http-client</groupid> <artifactid>google-http-client-jackson2</artifactid> <version>1.13.0-beta</version> </dependency> --> <dependency> <groupid>com.google.oauth-client</groupid> <artifactid>google-oauth-client</artifactid> <version>1.14.1-beta</version> </dependency> <dependency> <groupid>com.google.oauth-client</groupid> <artifactid>google-oauth-client-servlet</artifactid> <version>1.14.1-beta</version> </dependency> <dependency> <groupid>com.google.api.client</groupid> <artifactid>google-api-client-http</artifactid> <version>1.2.3-alpha</version> </dependency> <dependency> <groupid>com.google.api-client</groupid> <artifactid>google-api-client</artifactid> <version>1.14.1-beta</version> </dependency> <dependency> <groupid>com.google.http-client</groupid> <artifactid>google-http-client-jackson2</artifactid> <version>1.14.1-beta</version> </dependency> <!-- <dependency> <groupid>com.google.http-client</groupid> <artifactid>google-http-client-jackson2</artifactid> <version>1.13.0-beta</version> </dependency> <dependency> <groupid>com.google.oauth-client</groupid> <artifactid>google-oauth-client-jetty</artifactid> <version>1.13.0-beta</version> </dependency> --> <dependency> <groupid>com.google.oauth-client</groupid> <artifactid>google-oauth-client-jetty</artifactid> <version>1.14.1-beta</version> </dependency> <!-- --> <dependency> <groupid>com.google.http-client</groupid> <artifactid>google-http-client-jackson</artifactid> <version>1.13.1-beta</version> </dependency> <!-- --> <!-- google app engine meta-package --> <dependency> <groupid>net.kindleit</groupid> <artifactid>gae-runtime</artifactid> <version>${gae.version}</version> <type>pom</type> </dependency> <dependency> <groupid>org.datanucleus</groupid> <artifactid>datanucleus-core</artifactid> <version>${datanucleus.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupid>javax.transaction</groupid> <artifactid>jta</artifactid> <version>1.1</version> </dependency> <!-- java ee servlet api. need compile indexservlet class. can remove it, if don't explicitly use servlets --> <dependency> <groupid>org.apache.geronimo.specs</groupid> <artifactid>geronimo-servlet_2.5_spec</artifactid> <version>1.2</version> <scope>provided</scope> </dependency> <!-- make use of jsp tags. remove, if don't use jsps --> <dependency> <artifactid>standard</artifactid> <groupid>taglibs</groupid> <version>1.1.2</version> <type>jar</type> <scope>runtime</scope> </dependency> <!-- these dependencies here enabling logging --> <dependency> <groupid>org.slf4j</groupid> <artifactid>slf4j-api</artifactid> <version>1.6.1</version> </dependency> <dependency> <groupid>ch.qos.logback</groupid> <artifactid>logback-classic</artifactid> <version>0.9.24</version> </dependency> <!-- test scope --> <dependency> <groupid>junit</groupid> <artifactid>junit</artifactid> <version>4.5</version> <scope>test</scope> </dependency> <!-- gae libraries local testing described here: http://code.google.com/appengine/docs/java/howto/unittesting.html --> <dependency> <groupid>com.google.appengine</groupid> <artifactid>appengine-api-stubs</artifactid> <version>${gae.version}</version> <scope>test</scope> </dependency> <dependency> <groupid>com.google.appengine</groupid> <artifactid>appengine-testing</artifactid> <version>${gae.version}</version> <scope>test</scope> </dependency> <!-- <dependency> <groupid>com.google.api-client</groupid> <artifactid>google-api-client</artifactid> <version>1.4.1-beta</version> </dependency> --> <!-- 8th apr <dependency> <groupid>com.google.api-client</groupid> <artifactid>google-api-client</artifactid> <version>1.13.2-beta</version> </dependency> --> <dependency> <groupid>com.google.api-client</groupid> <artifactid>google-api-client</artifactid> <version>1.14.1-beta</version> </dependency> <dependency> <groupid>com.google.apis</groupid> <artifactid>google-api-services-prediction</artifactid> <version>v1.4-1.3.0-beta</version> </dependency> <!--<dependency> <groupid>com.google.apis</groupid> <artifactid>google-api-services-plus</artifactid> <version>v1-rev22-1.8.0-beta</version> </dependency> --> <dependency> <groupid>com.google.apis</groupid> <artifactid>google-api-services-plus</artifactid> <version>v1-rev62-1.14.1-beta</version> </dependency> <dependency> <groupid>javax.jdo</groupid> <artifactid>jdo2-api</artifactid> <version>2.3-eb</version> <exclusions> <exclusion> <groupid>javax.transaction</groupid> <artifactid>transaction-api</artifactid> </exclusion> </exclusions> </dependency> <dependency> <groupid>com.google.appengine</groupid> <artifactid>appengine-api-1.0-sdk</artifactid> <version>${gae.version}</version> </dependency> <dependency> <groupid>com.google.appengine</groupid> <artifactid>appengine-api-labs</artifactid> <version>${gae.version}</version> <scope>compile</scope> </dependency> <dependency> <groupid>com.google.http-client</groupid> <artifactid>google-http-client-jackson2</artifactid> <version>1.14.1-beta</version> </dependency> <dependency> <groupid>com.google.oauth-client</groupid> <artifactid>google-oauth-client-jetty</artifactid> <version>1.14.1-beta</version> </dependency> <!--<dependency> 8th apr <groupid>com.google.http-client</groupid> <artifactid>google-http-client-jackson2</artifactid> <version>1.13.0-beta</version> </dependency> <dependency> <groupid>com.google.oauth-client</groupid> <artifactid>google-oauth-client-jetty</artifactid> <version>1.13.0-beta</version> </dependency> --> </dependencies> <build> <plugins> <plugin> <groupid>net.kindleit</groupid> <artifactid>maven-gae-plugin</artifactid> <version>0.8.4</version> <configuration> <port>8080</port> <address>127.0.0.1</address> </configuration> <executions> <execution> <id>start-gae</id> <goals> <goal>stop</goal> <goal>unpack</goal> <goal>start</goal> </goals> </execution> <execution> <id>stop-gae</id> <goals> <goal>stop</goal> </goals> </execution> </executions> </plugin> <!-- plug-in "enhances" domain model objects (i.e. makes them persistent datanucleus) --> <plugin> <groupid>org.datanucleus</groupid> <artifactid>maven-datanucleus-plugin</artifactid> <version>1.1.4</version> <configuration> <!-- make sure path contains persistent classes! --> <mappingincludes>**/model/*.class</mappingincludes> <verbose>true</verbose> <enhancername>asm</enhancername> <api>jdo</api> </configuration> <executions> <execution> <phase>compile</phase> <goals> <goal>enhance</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupid>org.datanucleus</groupid> <artifactid>datanucleus-core</artifactid> <version>${datanucleus.version}</version> <exclusions> <exclusion> <groupid>javax.transaction</groupid> <artifactid>transaction-api</artifactid> </exclusion> </exclusions> </dependency> <dependency> <groupid>org.datanucleus</groupid> <artifactid>datanucleus-rdbms</artifactid> <version>${datanucleus.version}</version> </dependency> <dependency> <groupid>org.datanucleus</groupid> <artifactid>datanucleus-enhancer</artifactid> <version>1.1.4</version> </dependency> <dependency> <groupid>javax.jdo</groupid> <artifactid>jdo2-api</artifactid> <version>2.3-ec</version> <scope>runtime</scope> </dependency> </dependencies> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-war-plugin</artifactid> <version>2.1-beta-1</version> <configuration> <webresources> <resource> <directory>src/main/webapp</directory> <filtering>true</filtering> <includes> <include>**/appengine-web.xml</include> </includes> </resource> </webresources> </configuration> </plugin> <!-- actual maven-gae-plugin. type "mvn gae:run" run project, "mvn gae:deploy" upload gae. --> <plugin> <groupid>net.kindleit</groupid> <artifactid>maven-gae-plugin</artifactid> <version>0.9.0</version> <dependencies> <dependency> <groupid>net.kindleit</groupid> <artifactid>gae-runtime</artifactid> <version>${gae.version}</version> <type>pom</type> </dependency> </dependencies> </plugin> <!-- upload application appspot automatically, during release:perform --> <plugin> <artifactid>maven-release-plugin</artifactid> <configuration> <goals>gae:deploy</goals> </configuration> </plugin> <!-- java compiler version --> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>2.0</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build> <!-- specify hard-coded project properties here --> <properties> <!-- sets project's default encoding. http://docs.codehaus.org/display/mavenuser/pom+element+for+source+file+encoding --> <project.build.sourceencoding>utf-8</project.build.sourceencoding> <!-- "eclipse:eclipse" goal attempt downloading sources --> <downloadsources>true</downloadsources> <!-- specify appengine version project. should match sdk version pointed ${gae.home} property (typically, 1 used eclipse plug-in) <gae.version>1.6.1</gae.version> --> <gae.version>1.6.3</gae.version> <!-- upload http://test.latest.<applicationname>.appspot.com default --> <gae.application.version>test</gae.application.version> <datanucleus.version>1.1.5</datanucleus.version> </properties> <profiles> <!-- can configure our integration server activate profile , perform gae:deploy, uploading latest snapshot http://1.latest.<applicationname>.appspot.com automatically --> <profile> <id>integration-build</id> <properties> <gae.application.version>stage</gae.application.version> </properties> </profile> <!-- profile activate automatically during release , upload application http://2.latest.<applicationname>.appspot.com (we might want set 2nd version our applications default version accessible @ http://<applicationname>.appspot.com) --> <profile> <id>release-build</id> <activation> <property> <name>performrelease</name> <value>true</value> </property> </activation> <properties> <!-- during release, set application version in appengine-web.xml 2 --> <gae.application.version>release</gae.application.version> </properties> </profile> </profiles>
latest version in central repo 1.4.1-beta
<dependency> <groupid>com.google.api.client</groupid> <artifactid>google-api-client</artifactid> <version>1.4.1-beta</version> </dependency>
download newest jar , install in local repository
mvn install:install-file -dfile=google-api-client.jar -dgroupid=com.google.api.client \ -dartifactid=google-api-client -dversion=1.6.0-beta -dpackaging=jar