NetBeans:使用-e开关重新运行Maven / PluginResolutionException [英] NetBeans: Re-run Maven with the -e switch on / PluginResolutionException
问题描述
i更新了我的netbeans,现在我的测试不再工作了:
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5或其一个依赖关系无法解析:无法读取org.apache.maven.plugins的工件描述符:maven-resources-plugin:jar: 2.5:无法传输工件org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from / to central(http://repo1.maven.org/maven2):pr-dfs-bank- 00.emea .isn.corpintra.net:未知主机pr-dfs-bank-00.emea.isn.corpintra.net - > [帮助1]
要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。
使用-X开关重新运行Maven以启用完整的调试日志记录。
有关错误和可能的解决方案的更多信息,请阅读以下文章:
[帮助1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
如何使用netbeans激活-e或-X开关,我看到很多例子,mvn clean 等等,但是我通过Netbeans安装了Maven,所以我没有在命令行的文件夹。
我没有收到错误消息,想查看一个更详细的日志。
我搜索了我的这个pr-dfs-bank-00.emea的代码。 isn.corpintra.net在错误消息中提到,但它不是我的源代码的一部分。
我的pom.xml,它应该是Maven2和Selenium
<?xml version =1.0encoding =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/xsd/maven-4.0.0.xsd\">
< modelVersion> 4.0.0< / modelVersion>
< version> 1.0< / version>
< repositoryories>
< repository>
< id> central< / id>
< name> Maven Repository Switchboard< / name>
< layout> default< / layout>
< url> http://repo1.maven.org/maven2< / url>
< snapshots>
< enabled> false< / enabled>
< / snapshots>
< / repository>
< / repositories>
< pluginRepositories>
< pluginRepository>
< id> central< / id>
< name> Maven Plugin Repository< / name>
< url> http://repo1.maven.org/maven2< / url>
< layout> default< / layout>
< snapshots>
< enabled> false< / enabled>
< / snapshots>
< releases>
< updatePolicy>从不< / updatePolicy>
< / releases>
< / pluginRepository>
< / pluginRepositories>
< properties>
< maven.build.timestamp.format> yyMMdd-HHmm< /maven.build.timestamp.format>
< project.build.sourceEncoding> windows-1252< /project.build.sourceEncoding>
< lfadapter> $ {project.basedir} /../ lib / lf_CAdapter-4.0.jar< / lfadapter>
< / properties>
<依赖关系>
< dependency>
< groupId> org.testng< / groupId>
< artifactId> testng< / artifactId>
< version> 6.3.1< / version>
< scope> test< / scope>
< type> jar< / type>
< / dependency>
< dependency>
< groupId> org.seleniumhq.selenium< / groupId>
< artifactId> selenium-java< / artifactId>
< version> 2.17.0< / version>
< / dependency>
< dependency>
< groupId> org.seleniumhq.selenium< / groupId>
< artifactId> selenium-ie-driver< / artifactId>
< version> 2.17.0< / version>
< / dependency>
< dependency>
< groupId> org.apache.poi< / groupId>
< artifactId> poi-ooxml< / artifactId>
< version> 3.8-beta5< / version>
< / dependency>
< dependency>
< groupId> org.hamcrest< / groupId>
< artifactId> hamcrest-all< / artifactId>
< version> 1.1< / version>
< scope> test< / scope>
< / dependency>
< / dependencies>
< build>
< testSourceDirectory> src /< / testSourceDirectory>
< plugins>
< plugin>
< groupId> org.apache.maven.plugins< / groupId>
< artifactId> maven-compiler-plugin< / artifactId>
< version> 2.3.2< / version>
< configuration>
< source> 1.7< / source>
< target> 1.7< / target>
< failOnError> false< / failOnError>
< debug> true< / debug>
< verbose> true< / verbose>
< showWarnings> true< / showWarnings>
< showDeprecation> true< / showDeprecation>
< encoding> $ {project.build.sourceEncoding}< / encoding>
< / configuration>
< / plugin>
< plugin>
< groupId> org.apache.maven.plugins< / groupId>
< artifactId> maven-site-plugin< / artifactId>
< version> 3.0< / version>
< configuration>
< source> 1.7< / source>
< target> 1.7< / target>
< showDeprecation> true< / showDeprecation>
< encoding> $ {project.build.sourceEncoding}< / encoding>
< / configuration>
< / plugin>
< plugin>
< groupId> org.apache.maven.plugins< / groupId>
< artifactId> maven-surefire-plugin< / artifactId>
< version> 2.12< / version>
< configuration>
< disableXmlReport> false< / disableXmlReport>
< forkMode> always< / forkMode>
< redirectTestOutputToFile> true< / redirectTestOutputToFile>
< failIfNoTests> false< / failIfNoTests>
< redirectTestOutputToFile> true< / redirectTestOutputToFile>
< workingDirectory> reports / $ {maven.build.timestamp} /< / workingDirectory>
< reportsDirectory> reports / surefire /< / reportsDirectory>
< reporting>
< plugins>
< plugin>
< groupId> org.apache.maven.plugins< / groupId>
< artifactId> maven-surefire-report-plugin< / artifactId>
< version> 2.12< / version>
< / plugin>
< / plugins>
< / reporting>
< properties>
< property>
< name> showSuccess< / name>
< value> true< / value>
< / property>
< / properties>
< suiteXmlFiles>
< suiteXmlFile> testng-suite.xml< / suiteXmlFile>
< / suiteXmlFiles>
< / configuration>
<执行>
< execution>
< phase> test< / phase>
< goals>
< goal> test< / goal>
< / goals>
< / execution>
< / executions>
< / plugin>
< plugin>
< groupId> org.apache.maven.plugins< / groupId>
< artifactId> maven-resources-plugin< / artifactId>
< version> 2.5< / version>
< configuration>
< encoding> $ {project.build.sourceEncoding}< / encoding>
< / configuration>
< / plugin>
< / plugins>
< / build>
<个人资料>
<个人资料>
< id> netbeans-private-testng< / id>
< activation>
< activeByDefault> true< / activeByDefault>
< property>
< name> netbeans.testng.action< / name>
< / property>
< / activation>
< / profile>
< / profiles>
< / project>
我认为我的pom.xml不是真的应该是这样的:(
任何帮助不胜感激:)
很可能你有一个镜像或代理在一个maven的settings.xml文件中定义(例如在〜/ .m2 / settings.xml中),定义是错误的?像指向错误的服务器?
i have no clue about Maven and Netbeans, i updated my netbeans and now my test is not working anymore:
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to central (http://repo1.maven.org/maven2): pr-dfs-bank- 00.emea.isn.corpintra.net: Unknown host pr-dfs-bank-00.emea.isn.corpintra.net -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
How can i activate the -e or -X switch using netbeans, i saw many examples with "mvn clean" and so on, but I installed Maven via Netbeans so i dont have it on a folder for command line. I dont get the error message and wanna check out a more detailed log.
I searched my code for this pr-dfs-bank-00.emea.isn.corpintra.net mentioned in the error message, but it is not part of my source code.
My pom.xml, its supposed to be Maven2 and Selenium
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>1.0</version>
<repositories>
<repository>
<id>central</id>
<name>Maven Repository Switchboard</name>
<layout>default</layout>
<url>http://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Maven Plugin Repository</name>
<url>http://repo1.maven.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
</pluginRepository>
</pluginRepositories>
<properties>
<maven.build.timestamp.format>yyMMdd-HHmm</maven.build.timestamp.format>
<project.build.sourceEncoding>windows-1252</project.build.sourceEncoding>
<lfadapter>${project.basedir}/../lib/lf_CAdapter-4.0.jar</lfadapter>
</properties>
<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.3.1</version>
<scope>test</scope>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-ie-driver</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.8-beta5</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testSourceDirectory>src/</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<failOnError>false</failOnError>
<debug>true</debug>
<verbose>true</verbose>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<showDeprecation>true</showDeprecation>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<disableXmlReport>false</disableXmlReport>
<forkMode>always</forkMode>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<failIfNoTests>false</failIfNoTests>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<workingDirectory>reports/${maven.build.timestamp}/</workingDirectory>
<reportsDirectory>reports/surefire/</reportsDirectory>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.12</version>
</plugin>
</plugins>
</reporting>
<properties>
<property>
<name>showSuccess</name>
<value>true</value>
</property>
</properties>
<suiteXmlFiles>
<suiteXmlFile>testng-suite.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>netbeans-private-testng</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>netbeans.testng.action</name>
</property>
</activation>
</profile>
</profiles>
</project>
I think my pom.xml is not really the way its supposed to be :(
Any help is appreciated :)
most likely you have a mirror or proxy defined in one of the maven's settings.xml files (eg. in ~/.m2/settings.xml) and the definition is wrong? like pointing to a wrong server?
这篇关于NetBeans:使用-e开关重新运行Maven / PluginResolutionException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!