Wil*_*ill 2 eclipse maven-2 eclipse-plugin maven-plugin
使用maven2eclipse插件,问题是零文档.当我在eclipse中右键单击项目时,它给了我一个选择'启用依赖关系管理'我尝试了它但是除了以下控制台输出之外还给了我一个相当稀疏的POM.xml:
04/05/11 14:57:54 BST: Generating sources /BenCode/pom.xml
04/05/11 14:57:54 BST: Build error for /BenCode/pom.xml; org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3
04/05/11 14:57:54 BST: Failed to determine compiler source setting, assuming default
04/05/11 14:57:54 BST: Failed to determine compiler target setting, assuming default
04/05/11 14:57:54 BST: Failed to determine compiler source setting, assuming default
04/05/11 14:57:54 BST: Failed to determine compiler target setting, assuming default
04/05/11 14:57:54 BST: Failed to determine compiler test inclusions, assuming defaults
04/05/11 14:57:54 BST: Failed to determine compiler test exclusions, assuming defaults
04/05/11 14:57:54 BST: Failed to determine compiler inclusions, assuming defaults
04/05/11 14:57:54 BST: Failed to determine compiler exclusions, assuming defaults
04/05/11 14:57:54 BST: Refreshing [/BenCode/pom.xml]
Run Code Online (Sandbox Code Playgroud)
在尝试弄清楚要做什么之前没有使用过Maven是一个难题.我的印象是,maven应该使用该信息扫描类路径依赖关系来管理项目,但没有这样的运气:(
Maven只管理POM中指定的依赖项(以及任何传递依赖项(即您直接定义的依赖项的依赖项).例如,下面将JUnit作为依赖项添加到测试范围内
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<!-- ... -->
</dependencies>
Run Code Online (Sandbox Code Playgroud)
如果右键单击pom.xml,则可以选择Maven - > Add dependency - 这将搜索默认存储库.
另请阅读依赖机制简介
| 归档时间: |
|
| 查看次数: |
8449 次 |
| 最近记录: |