java - Maven build timeout issues when added some dependencies to pom -
when executing command mvn install
i'm getting build failure exceptions:
this error stack strace
[info] scanning projects... [warning] [warning] problems encountered while building effective model com.filter.jersey.selectable:selectablefiltering:war:1.0 [warning] 'build.plugins.plugin.version' org.apache.maven.plugins:maven-compiler-plugin missing. @ line 73, column 12 [warning] [warning] highly recommended fix these problems because threaten stability of build. [warning] [warning] reason, future maven versions might no longer support building such malformed projects. [warning] [info] [info] ------------------------------------------------------------------------ [info] building selectablefiltering 1.0 [info] ------------------------------------------------------------------------ [info] downloading: https://repo.maven.apache.org/maven2/org/glassfish/jersey/ext/jersey-entity-filtering/2.23.1/jersey-entity-filtering-2.23.1.pom [info] downloading: https://repo.maven.apache.org/maven2/org/glassfish/jersey/media/jersey-media-moxy/2.23.1/jersey-media-moxy-2.23.1.pom [info] downloading: https://repo.maven.apache.org/maven2/org/glassfish/jersey/media/jersey-media-json-jackson/2.23.1/jersey-media-json-jackson-2.23.1.pom [info] downloading: https://repo.maven.apache.org/maven2/org/glassfish/jersey/test-framework/providers/jersey-test-framework-provider-bundle/2.23.1/jersey-test-framework-provider-bundle-2.23.1.pom [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 41.070 s [info] finished at: 2016-07-28t14:15:24+05:30 [info] final memory: 10m/150m [info] ------------------------------------------------------------------------ [error] failed execute goal on project selectablefiltering: not resolve dependencies project com.filter.jersey.selectable:selectablefiltering:war:1.0: failed collect dependencies @ org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.23.1: failed read artifact descriptor org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.23.1: not transfer artifact org.glassfish.jersey.ext:jersey-entity-filtering:pom:2.23.1 from/to central (https://repo.maven.apache.org/maven2): connect timed out -> [help 1] [error] [error] see full stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable full debug logging. [error] [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/dependencyresolutionexception
only following dependencies added pom cause build failure:
<dependency> <groupid>org.glassfish.jersey.ext</groupid> <artifactid>jersey-entity-filtering</artifactid> <version>${jersey2.version}</version> </dependency> <dependency> <groupid>org.glassfish.jersey.media</groupid> <artifactid>jersey-media-moxy</artifactid> <version>${jersey2.version}</version> </dependency> <dependency> <groupid>org.glassfish.jersey.media</groupid> <artifactid>jersey-media-json-jackson</artifactid> <version>${jersey2.version}</version> </dependency> <dependency> <groupid>org.glassfish.jersey.test-framework.providers</groupid> <artifactid>jersey-test-framework-provider-bundle</artifactid> <version>${jersey2.version}</version> <type>pom</type> <scope>test</scope> </dependency>
i'm using maven version 3.3.9 windows 7.
below project pom file:
<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> <groupid>com.filter.jersey.selectable</groupid> <artifactid>selectablefiltering</artifactid> <version>1.0</version> <packaging>war</packaging> <repositories> </repositories> <properties> <jersey2.version>2.23.1</jersey2.version> <jaxrs.version>2.0.1</jaxrs.version> </properties> <dependencies> <!-- jax-rs --> <dependency> <groupid>javax.ws.rs</groupid> <artifactid>javax.ws.rs-api</artifactid> <version>${jaxrs.version}</version> </dependency> <!-- jersey 2.23.1 --> <!-- https://mvnrepository.com/artifact/org.glassfish.jersey.containers/jersey-container-servlet-core --> <dependency> <groupid>org.glassfish.jersey.containers</groupid> <artifactid>jersey-container-servlet-core</artifactid> <version>${jersey2.version}</version> </dependency> <dependency> <groupid>org.glassfish.jersey.core</groupid> <artifactid>jersey-server</artifactid> <version>${jersey2.version}</version> </dependency> <dependency> <groupid>org.glassfish.jersey.core</groupid> <artifactid>jersey-client</artifactid> <version>${jersey2.version}</version> </dependency> <!-- https://mvnrepository.com/artifact/org.glassfish.jersey.ext/jersey-entity-filtering --> <dependency> <groupid>org.glassfish.jersey.ext</groupid> <artifactid>jersey-entity-filtering</artifactid> <version>${jersey2.version}</version> </dependency> <dependency> <groupid>org.glassfish.jersey.media</groupid> <artifactid>jersey-media-moxy</artifactid> <version>${jersey2.version}</version> </dependency> <dependency> <groupid>org.glassfish.jersey.media</groupid> <artifactid>jersey-media-json-jackson</artifactid> <version>${jersey2.version}</version> </dependency> <dependency> <groupid>org.glassfish.jersey.test-framework.providers</groupid> <artifactid>jersey-test-framework-provider-bundle</artifactid> <version>${jersey2.version}</version> <type>pom</type> <scope>test</scope> </dependency> </dependencies> <build> <finalname>jerseydemos</finalname> <plugins> <plugin> <artifactid>maven-compiler-plugin</artifactid> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> </build> </project>
find below settings.xml
<?xml version="1.0" encoding="utf-8"?> <!-- licensed apache software foundation (asf) under 1 or more contributor license agreements. see notice file distributed work additional information regarding copyright ownership. asf licenses file under apache license, version 2.0 (the "license"); may not use file except in compliance license. may obtain copy of license @ http://www.apache.org/licenses/license-2.0 unless required applicable law or agreed in writing, software distributed under license distributed on "as is" basis, without warranties or conditions of kind, either express or implied. see license specific language governing permissions , limitations under license. --> <!-- | configuration file maven. can specified @ 2 levels: | | 1. user level. settings.xml file provides configuration single user, | , provided in ${user.home}/.m2/settings.xml. | | note: location can overridden cli option: | | -s /path/to/user/settings.xml | | 2. global level. settings.xml file provides configuration maven | users on machine (assuming they're using same maven | installation). it's provided in | ${maven.home}/conf/settings.xml. | | note: location can overridden cli option: | | -gs /path/to/global/settings.xml | | sections in sample file intended give running start @ | getting out of maven installation. appropriate, default | values (values used when setting not specified) provided. | |--> <settings xmlns="http://maven.apache.org/settings/1.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/settings/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <!-- localrepository | path local repository maven use store artifacts. | | default: ${user.home}/.m2/repository <localrepository>/path/to/local/repo</localrepository> --> <!-- interactivemode | determine whether maven prompts when needs input. if set false, | maven use sensible default value, perhaps based on other setting, | parameter in question. | | default: true <interactivemode>true</interactivemode> --> <!-- offline | determines whether maven should attempt connect network when executing build. | have effect on artifact downloads, artifact deployment, , others. | | default: false <offline>false</offline> --> <!-- plugingroups | list of additional group identifiers searched when resolving plugins prefix, i.e. | when invoking command line "mvn prefix:goal". maven automatically add group identifiers | "org.apache.maven.plugins" , "org.codehaus.mojo" if these not contained in list. |--> <plugingroups> <!-- plugingroup | specifies further group identifier use plugin lookup. <plugingroup>com.your.plugins</plugingroup> --> </plugingroups> <!-- proxies | list of proxies can used on machine connect network. | unless otherwise specified (by system property or command-line switch), first proxy | specification in list marked active used. |--> <proxies> <!-- proxy | specification 1 proxy, used in connecting network. | <proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <username>proxyuser</username> <password>proxypass</password> <host>proxy.host.net</host> <port>80</port> <nonproxyhosts>local.net|some.host.com</nonproxyhosts> </proxy> --> </proxies> <!-- servers | list of authentication profiles, keyed server-id used within system. | authentication profiles can used whenever maven must make connection remote server. |--> <servers> <!-- server | specifies authentication information use when connecting particular server, identified | unique name within system (referred 'id' attribute below). | | note: should either specify username/password or privatekey/passphrase, since these pairings | used together. | <server> <id>deploymentrepo</id> <username>repouser</username> <password>repopwd</password> </server> --> <!-- sample, using keys authenticate. <server> <id>siteserver</id> <privatekey>/path/to/private/key</privatekey> <passphrase>optional; leave empty if not used.</passphrase> </server> --> </servers> <!-- mirrors | list of mirrors used in downloading artifacts remote repositories. | | works this: pom may declare repository use in resolving artifacts. | however, repository may have problems heavy traffic @ times, people have mirrored | several places. | | repository definition have unique id, can create mirror reference | repository, used alternate download site. mirror site preferred | server repository. |--> <mirrors> <!-- mirror | specifies repository mirror site use instead of given repository. repository | mirror serves has id matches mirrorof element of mirror. ids used | inheritance , direct lookup purposes, , must unique across set of mirrors. | <mirror> <id>mirrorid</id> <mirrorof>repositoryid</mirrorof> <name>human readable name mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> --> </mirrors> <!-- profiles | list of profiles can activated in variety of ways, , can modify | build process. profiles provided in settings.xml intended provide local machine- | specific paths , repository locations allow build work in local environment. | | example, if have integration testing plugin - cactus - needs know | tomcat instance installed, can provide variable here such variable | dereferenced during build process configure cactus plugin. | | noted above, profiles can activated in variety of ways. 1 way - activeprofiles | section of document (settings.xml) - discussed later. way | relies on detection of system property, either matching particular value property, | or merely testing existence. profiles can activated jdk version prefix, | value of '1.4' might activate profile when build executed on jdk version of '1.4.2_07'. | finally, list of active profiles can specified directly command line. | | note: profiles defined in settings.xml, restricted specifying artifact | repositories, plugin repositories, , free-form properties used configuration | variables plugins in pom. | |--> <profiles> <!-- profile | specifies set of introductions build process, activated using 1 or more of | mechanisms described above. inheritance purposes, , activate profiles via <activatedprofiles/> | or command line, profiles have have id unique. | | encouraged best practice profile identification use consistent naming convention | profiles, such 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc. | make more intuitive understand set of introduced profiles attempting | accomplish, particularly when have list of profile id's debug. | | profile example uses jdk version trigger activation, , provides jdk-specific repo. <profile> <id>jdk-1.4</id> <activation> <jdk>1.4</jdk> </activation> <repositories> <repository> <id>jdk14</id> <name>repository jdk 1.4 builds</name> <url>http://www.myhost.com/maven/jdk14</url> <layout>default</layout> <snapshotpolicy>always</snapshotpolicy> </repository> </repositories> </profile> --> <!-- | here profile, activated system property 'target-env' value of 'dev', | provides specific path tomcat instance. use this, plugin configuration | might hypothetically like: | | ... | <plugin> | <groupid>org.myco.myplugins</groupid> | <artifactid>myplugin</artifactid> | | <configuration> | <tomcatlocation>${tomcatpath}</tomcatlocation> | </configuration> | </plugin> | ... | | note: if wanted inject configuration whenever set 'target-env' | anything, leave off <value/> inside activation-property. | <profile> <id>env-dev</id> <activation> <property> <name>target-env</name> <value>dev</value> </property> </activation> <properties> <tomcatpath>/path/to/tomcat/instance</tomcatpath> </properties> </profile> --> </profiles> <!-- activeprofiles | list of profiles active builds. | <activeprofiles> <activeprofile>alwaysactiveprofile</activeprofile> <activeprofile>anotheralwaysactiveprofile</activeprofile> </activeprofiles> --> </settings>
can please me missing
you don't have mirror defined in repository. can explicitly define below:
<mirrors> <mirror> <id>internal-repo</id> <name>internal</name> <url>http://repo.maven.apache.org/maven2</url> <mirrorof>repo</mirrorof> </mirror> </mirrors>
also, if using proxy server define below:
<proxies> <proxy> <id>my_http_proxy</id> <active>true</active> <protocol>http</protocol> <host>your.proxy.server</host> <port>port</port> <username>username</username> <password>password</password> <nonproxyhosts>*.nonproxyhosts.com</nonproxyhosts> </proxy> <proxy> <id>my_https_proxy</id> <active>true</active> <protocol>https</protocol> <host>your.proxy.server</host> <port>port</port> <username>username</username> <password>password</password> <nonproxyhosts>*.nonproxyhosts.com</nonproxyhosts> </proxy> </proxies>
hope helps.
Comments
Post a Comment