java - Maven build error - Connection to maven central repository refused even though I am not in proxy network -
when created new maven project , clean , build error message.
scanning projects... ------------------------------------------------------------------------ building mavenproject6 1.0-snapshot ------------------------------------------------------------------------ downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.pom ------------------------------------------------------------------------ build failure ------------------------------------------------------------------------ total time: 22.506s finished at: wed jan 27 12:26:55 ist 2016 final memory: 7m/123m ------------------------------------------------------------------------ plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or 1 of dependencies not resolved: failed read artifact descriptor org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2: not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 from/to central (http://repo.maven.apache.org/maven2): connection http://repo.maven.apache.org refused: connection timed out: connect -> [help 1] see full stack trace of errors, re-run maven -e switch. re-run maven using -x switch enable full debug logging. more information errors , possible solutions, please read following articles: [help 1] http://cwiki.apache.org/confluence/display/maven/pluginresolutionexception
i tried add maven-resources-plugin-2.5.jar
, maven-resources-plugin-2.5
, maven-surefire-plugin-2.10.jar
, maven-install-plugin-2.3.1.jar
c:\users\mi synergy.m2\repository\org\apache\maven\plugins\maven-resources-plugin\2.5 , enter command mvn compile through cmd.
but doesn't work.
there missing pom file there already.
please me this. i'm trying days , tried do..
thank you.
edit pom.xml
<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/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>com.exm</groupid> <artifactid>mavenproject6</artifactid> <version>1.0-snapshot</version> <packaging>war</packaging> <name>mavenproject6</name> <properties> <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir> <project.build.sourceencoding>utf-8</project.build.sourceencoding> </properties> <dependencies> <dependency> <groupid>javax</groupid> <artifactid>javaee-web-api</artifactid> <version>6.0</version> <scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> <compilerarguments> <endorseddirs>${endorsed.dir}</endorseddirs> </compilerarguments> </configuration> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-war-plugin</artifactid> <version>2.1.1</version> <configuration> <failonmissingwebxml>false</failonmissingwebxml> </configuration> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-dependency-plugin</artifactid> <version>2.1</version> <executions> <execution> <phase>validate</phase> <goals> <goal>copy</goal> </goals> <configuration> <outputdirectory>${endorsed.dir}</outputdirectory> <silent>true</silent> <artifactitems> <artifactitem> <groupid>javax</groupid> <artifactid>javaee-endorsed-api</artifactid> <version>6.0</version> <type>jar</type> </artifactitem> </artifactitems> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
i not facing issue, getting build success when clean install
pom.xml
<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/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>com.exm</groupid> <artifactid>mavenproject6</artifactid> <version>1.0-snapshot</version> <packaging>war</packaging> <name>mavenproject6</name> <properties> <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir> <project.build.sourceencoding>utf-8</project.build.sourceencoding> </properties> <dependencies> <dependency> <groupid>javax</groupid> <artifactid>javaee-web-api</artifactid> <version>6.0</version> <scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> <compilerarguments> <endorseddirs>${endorsed.dir}</endorseddirs> </compilerarguments> </configuration> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-war-plugin</artifactid> <version>2.1.1</version> <configuration> <failonmissingwebxml>false</failonmissingwebxml> </configuration> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-dependency-plugin</artifactid> <version>2.1</version> <executions> <execution> <phase>validate</phase> <goals> <goal>copy</goal> </goals> <configuration> <outputdirectory>${endorsed.dir}</outputdirectory> <silent>true</silent> <artifactitems> <artifactitem> <groupid>javax</groupid> <artifactid>javaee-endorsed-api</artifactid> <version>6.0</version> <type>jar</type> </artifactitem> </artifactitems> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
add below pom.xml
<repository> <id>central</id> <name>central</name> <url>http://repo1.maven.org/maven2</url> </repository>
similar error resolved here...
Comments
Post a Comment