2015-06-16 3 views
0

В командной строке приводятся следующие команды. Как вы можете видеть, произошла ошибка, время соединения завершено. Я установить переменные окружения, как:PluginResolutionException при запуске mvn-теста по проекту

M2_HOME=C:\app\apache-maven-3.3.3 
M2= %M2_HOME%\bin 
MAVEN_OPTS=-Xms256m -Xmx512m 
C:\Users\user1\Desktop\SQLToNoSQLImporter-master\SQLToNoSQLImporter-maste 
r>mvn test -DimportConf=/Users/sathis/Desktop/data-import.properties -DdbConf=/U 
sers/sathis/Desktop/data-config.xml 
[INFO] Scanning for projects... 
[INFO] 
[INFO] ------------------------------------------------------------------------ 
[INFO] Building SQLToNoSQLImporter 1.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven 
-resources-plugin/2.6/maven-resources-plugin-2.6.pom 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 22.282 s 
[INFO] Finished at: 2015-06-16T12:30:31+05:30 
[INFO] Final Memory: 8M/245M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its 
dependencies could not be resolved: Failed to read artifact descriptor for org. 
apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact 
org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (https: 
//repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.mave 
n.apache.org/23.235.44.215] failed: Connection timed out: connect -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit 
ch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please rea 
d the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti 
onException 

Здесь детали ПОМ файла:

<?xml version="1.0" encoding="UTF-8"?> 

-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"> 

<modelVersion>4.0.0</modelVersion> 

<groupId>org.sathis</groupId> 

<artifactId>SQLToNoSQLImporter</artifactId> 

<version>1.0-SNAPSHOT</version> 


-<dependencies> 


-<dependency> 

<groupId>commons-io</groupId> 

<artifactId>commons-io</artifactId> 

<version>2.4</version> 

</dependency> 


-<dependency> 

<groupId>commons-logging</groupId> 

<artifactId>commons-logging</artifactId> 

<version>1.1</version> 

</dependency> 


-<dependency> 

<groupId>commons-dbutils</groupId> 

<artifactId>commons-dbutils</artifactId> 

<version>1.5</version> 

</dependency> 


-<dependency> 

<groupId>commons-lang</groupId> 

<artifactId>commons-lang</artifactId> 

<version>2.6</version> 

</dependency> 


-<dependency> 

<groupId>net.sf.json-lib</groupId> 

<artifactId>json-lib</artifactId> 

<version>2.4</version> 

<classifier>jdk15</classifier> 

</dependency> 


-<dependency> 

<groupId>org.apache.httpcomponents</groupId> 

<artifactId>httpclient</artifactId> 

<version>4.3.5</version> 

</dependency> 


-<dependency> 

<groupId>org.mongodb</groupId> 

<artifactId>mongo-java-driver</artifactId> 

<version>2.12.3</version> 

</dependency> 


-<dependency> 

<groupId>org.elasticsearch</groupId> 

<artifactId>elasticsearch</artifactId> 

<version>1.3.1</version> 

</dependency> 

<!--- Optional Dependencies --> 


<!-- PostgreSQL driver. comment this if you are not using --> 



-<dependency> 

<groupId>postgresql</groupId> 

<artifactId>postgresql</artifactId> 

<version>9.1-901.jdbc4</version> 

</dependency> 

<!-- MySQL driver. comment this if you are not using --> 



-<dependency> 

<groupId>mysql</groupId> 

<artifactId>mysql-connector-java</artifactId> 

<version>5.1.31</version> 

</dependency> 

<!-- Oracle driver not available in maven. Please put the jar in libs folder. --> 


</dependencies> 


-<build> 


-<plugins> 


-<plugin> 

<groupId>org.codehaus.mojo</groupId> 

<artifactId>exec-maven-plugin</artifactId> 

<version>1.2.1</version> 


-<executions> 


-<execution> 

<phase>test</phase> 


-<goals> 

<goal>java</goal> 

</goals> 


-<configuration> 

<mainClass>net.sathis.export.sql.SQLToNoSQLImporter</mainClass> 


-<arguments> 

<argument>${importConf}</argument> 

<argument>${dbConf}</argument> 

</arguments> 

</configuration> 

</execution> 

</executions> 

</plugin> 

</plugins> 

</build> 

</project> 

Попросить любые другие детали, если required.Any помощь приветствуется.

ответ

0

Я думаю, что путь M2_HOME не правильно ... M2_HOME = C: \ Users \ user1 \ Desktop \ SQLToNoSQLImporter-мастер \ SQLToNoSQLImporater-мастер .. M2_HOME должен указывать на Maven двоичную как

M2_HOME = C : \ апач-Maven-3.2.5 \

+0

Это был copyin g, я редактировал сценарий. – Akshat

+0

Единственное, что нужно для запуска maven, это то, что папка bin дистрибутива находится на вашем пути, и, конечно же, JAVA_HOME установлен правильно ... – khmarbaise

+0

Попробуйте следующие версии зависимостей –

0

Попробуйте следующие версии зависимостей

<dependency> 
 
\t <groupId>commons-logging</groupId> 
 
\t <artifactId>commons-logging</artifactId> 
 
\t <version>1.2</version> 
 
</dependency> 
 

 

 
<dependency> 
 
<groupId>net.sf.json-lib</groupId> 
 
<artifactId>json-lib</artifactId> 
 
<version>2.4</version> 
 
</dependency> 
 

 
<dependency> 
 
<groupId>org.apache.httpcomponents</groupId> 
 
<artifactId>httpclient</artifactId> 
 
<version>4.5</version> 
 
</dependency> 
 

 
<dependency> 
 
\t <groupId>org.mongodb</groupId> 
 
\t <artifactId>mongo-java-driver</artifactId> 
 
\t <version>3.0.2</version> 
 
</dependency> 
 

 
<dependency> 
 
\t <groupId>org.elasticsearch</groupId> 
 
\t <artifactId>elasticsearch</artifactId> 
 
\t <version>1.6.0</version> 
 
</dependency> 
 

 
<dependency> 
 
\t <groupId>postgresql</groupId> 
 
\t <artifactId>postgresql</artifactId> 
 
\t <version>9.1-901.jdbc4</version> 
 
</dependency> 
 

 
<dependency> 
 
\t <groupId>mysql</groupId> 
 
\t <artifactId>mysql-connector-java</artifactId> 
 
\t <version>5.1.35</version> 
 
</dependency>

Смежные вопросы