1

我在尝试从“Drools JBoss Rules 5.0 Developer's Guide”构建示例时遇到了一些奇怪的麻烦。我尝试从自述文件中逐步运行此示例(类似的说明位于:http ://code.google.com/p/droolsbook/ )

我得到以下日志:

命令: mvn eclipse:eclipse -DdownloadSources=true

[INFO] Scanning for projects...                                                                                                                                                                                                              
[INFO] Reactor build order:                                                                                                                                                                                                                  
[INFO]   Drools Book Parent                                                                                                                                                                                                                  
[INFO]   Banking Core                                                                                                                                                                                                                        
[INFO]   Validation                                                                                                                                                                                                                          
[INFO]   ETL with iBatis                                                                                                                                                                                                                     
[INFO]   DSL                                                                                                                                                                                                                                 
[INFO]   Decision Tables                                                                                                                                                                                                                     
[INFO]   Ruleflow                                                                                                                                                                                                                            
[INFO]   Stateful Rules                                                                                                                                                                                                                      
[INFO]   Complex Event Processing                                                                                                                                                                                                            
[INFO]   Drools Flow                                                                                                                                                                                                                         
[INFO]   Integration                                                                                                                                                                                                                         
[INFO]   Sample Application                                                                                                                                                                                                                  
[INFO]   Testing                                                                                                                                                                                                                             
[INFO]   Performance                                                                                                                                                                                                                         
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.pom                                                                                                              
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-compiler-plugin:pom:2.0.2' from repository central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org                                                
Downloading: http://repository.jboss.com/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.pom                                                                                                         
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-compiler-plugin:pom:2.0.2' from repository repository.jboss.com (http://repository.jboss.com/maven2): Authorization failed: Access denied to: http://repository.jboss.com/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.pom                                                                                                                                                    
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.pom                                                                                                              
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-compiler-plugin:pom:2.0.2' from repository central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org                                                
[INFO] ------------------------------------------------------------------------                                                                                                                                                              
[ERROR] BUILD ERROR                                                                                                                                                                                                                          
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.apache.maven.plugins:maven-compiler-plugin

Reason: POM 'org.apache.maven.plugins:maven-compiler-plugin' not found in repository: Unable to download the artifact from any repository

  org.apache.maven.plugins:maven-compiler-plugin:pom:2.0.2

from the specified remote repositories:
  repository.jboss.com (http://repository.jboss.com/maven2),
  central (http://repo1.maven.org/maven2)

 for project org.apache.maven.plugins:maven-compiler-plugin


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21 seconds
[INFO] Finished at: Fri Apr 26 14:41:02 CEST 2013
[INFO] Final Memory: 6M/119M
[INFO] ------------------------------------------------------------------------

当我运行“mvn clean install”(http://pastebin.com/FHQ4QqBH)时遇到类似的错误

谢谢你的建议,加登。

4

2 回答 2

0

我认为您的问题与 Drools 无关,而是与您与 Maven 中央存储库的连接配置有关。如您所见,它无法下载 maven 编译器插件。请检查您的连接。

于 2013-05-11T20:37:18.053 回答
0

好的,已经过去了一段时间,对于其他人在运行书中的示例应用程序时遇到问题(因为缺乏经验,比如我),遵循简短的教程。

  1. 使用 maven >= 3.0.4。
  2. 按照自述文件中的步骤操作。
  3. 下载 spring 框架并从中复制 spring-form.tld 到 WEB-INF\
  4. 添加到构建路径 jstl jar。
  5. 将 jstl jar 复制到 WEB-INF\lib
  6. 在 tomcat 服务器上运行应用程序。

希望这可以帮助。

于 2013-10-04T21:35:02.240 回答