2012-07-02 24 views
10

मैं Maven का उपयोग कर एक युद्ध फ़ाइल उत्पन्न करने के लिए कोशिश कर रहा हूँ, लेकिन मैं इस त्रुटि हो रही है (लॉग उत्पादन को डाउनलोड करने का सबसे अधिक स्पष्ट लॉग ऑन करने के लिए छोड़ दिया जाता है):org.apache.maven.plugins लक्ष्य निष्पादन के विफल

<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/maven- 
v4_0_0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>selenium</groupId> 
    <artifactId>tn.talan.selenium</artifactId> 
    <packaging>war</packaging> 
    <version>0.0.1-SNAPSHOT</version> 
    <name>tn.talan.selenium Maven Webapp</name> 
    <url>http://maven.apache.org</url> 
    <dependencies> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>3.8.1</version> 
     <scope>test</scope> 
    </dependency> 
    </dependencies> 

    <build> 
    <finalName>tn.talan.selenium</finalName> 

    <plugins> 
     <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-war-plugin</artifactId> 
     </plugin> 

     <plugin> 
     <groupId>org.codehaus.mojo</groupId> 
     <artifactId>tomcat-maven-plugin</artifactId> 
     <version>1.0-beta-1</version> 
     </plugin> 

    </plugins> 

    </build> 

</project> 

क्या मेरी पोम साथ कुछ गड़बड़ है:

Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.1.1/maven-war-plugin-2.1.1.pom 
Downloaded: 
... 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building tn.talan.selenium Maven Webapp 0.0.1-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ tn.talan.selenium --- 
... 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ tn.talan.selenium --- 
... 
[INFO] --- maven-war-plugin:2.1.1:war (default-cli) @ tn.talan.selenium --- 
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-archiver/2.4.1/maven-archiver-2.4.1.pom 
Downloaded: 
... 
[INFO] BUILD FAILURE 
... 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-cli) on project tn.talan.selenium: Execution default-cli of goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war failed: Plugin org.apache.maven.plugins:maven-war-plugin:2.1.1 or one of its dependencies could not be resolved: Could not transfer artifact org.codehaus.plexus:plexus-io:jar:1.0.1 from/to central (http://repo.maven.apache.org/maven2): GET request of: org/codehaus/plexus/plexus-io/1.0.1/plexus-io-1.0.1.jar from central failed: Read timed out -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
... 

यहाँ मेरी pom.xml फ़ाइल कोड है? कोई विचार कृपया?

+1

यहाँ एक नज़र: http://stackoverflow.com/q/5817980/102937 –

+0

और यहाँ: http://stackoverflow.com/questions/10680467 –

उत्तर

16

maven-war-plugin के लिए संस्करण निर्दिष्ट करें, उदा।

<plugin> 
    <groupId>org.apache.maven.plugins</groupId> 
    <artifactId>maven-war-plugin</artifactId> 
    <version>2.2</version> 
</plugin> 
+0

धन्यवाद इतना !! –

संबंधित मुद्दे

 संबंधित मुद्दे