Results 1 to 10 of 10

Thread: Spring MVC template - Error

  1. #1
    Join Date
    Jan 2010
    Posts
    10

    Default Spring MVC template - Error

    I use eclipse 3.7 64 bit on ubuntu 12.04 64bit and install Spring IDE from eclipse market.
    I have install maven 3.0.4, this is out put to check maven version install on os
    Code:
    Apache Maven 3.0.4
    Maven home: /usr/share/maven
    Java version: 1.6.0_34, vendor: Sun Microsystems Inc.
    Java home: /usr/lib/jvm/jdk1.6.0_34/jre
    Default locale: en_US, platform encoding: UTF-8
    OS name: "linux", version: "3.2.0-31-generic", arch: "amd64", family: "unix"
    I have create an project name OnesPrice, after finishing creation. POM file has error at
    HTML Code:
            <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>
                        <compilerArgument>-Xlint:all</compilerArgument>
                        <showWarnings>true</showWarnings>
                        <showDeprecation>true</showDeprecation>
                    </configuration>
                </plugin>
    when i run maven install , the output of console is
    Code:
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building OnesPrice 1.0.0-BUILD-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
    Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.pom
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 41.976s
    [INFO] Finished at: Mon Oct 01 00:35:18 ICT 2012
    [INFO] Final Memory: 5M/70M
    [INFO] ------------------------------------------------------------------------
    [ERROR] 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: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from/to central (http://repo1.maven.org/maven2): Connect times out -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [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 read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
    I have search in our forum and google but can not resolve,please help me thanks

  2. #2
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hey!

    I have two suggestions/questions here:

    - are you behind a proxy maybe? It looks like Maven is not able to download the artifacts and the reason could be a proxy server in between that you haven't configured in your Maven configuration (settings.xml, see also: http://maven.apache.org/guides/mini/guide-proxies.html).

    - second question: would you like to use the Maven Integration for Eclipse? It handles all the Maven things from within Eclipse for you, but it isn't part of Eclipse 3.7 by default. Since the Spring MVC template project is defined to use this Maven integration, having that installed could make things easier for you. Look at the Eclipse Marketplace for Maven integration (m2e).

    HTH,
    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  3. #3
    Join Date
    Jan 2010
    Posts
    10

    Default

    first question, i am not behind a proxy
    second question: i think it hás been installed, I saw in help/about eclipse
    Pls help me thanks

  4. #4
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hey!

    So does the project look ok from with STS? Can you see all the required dependencies under the Maven classpath container in your package or project explorer? It looks very much like Maven has trouble accessing the libraries...

    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  5. #5
    Join Date
    Jan 2010
    Posts
    10

    Default

    you are correct, no equired dependencies under the Maven classpath container in your package or project explorer. But i don't know why and maven install always fail, i don't know maven hás problem or project or eclipse
    Please help me thanks

  6. #6
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hey!

    Just for investigating this issue: can you try to download the full STS distribution and give that a try? You can download that from here:

    http://www.springsource.org/sts

    Would like to find out whether it is an installation issue with your setup or something else.

    Thanks for trying that out!
    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  7. #7
    Join Date
    Jan 2010
    Posts
    10

    Default

    I have tried STS zip version, it has the same problem.

  8. #8
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hey!

    In this case I would try to wipe out the local maven repository at .m2/repository and then try again. That should trigger Maven to download the necessary artifacts again. Maybe something went wrong with that in the first place.

    HTH,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  9. #9
    Join Date
    Jan 2010
    Posts
    10

    Default

    thank you, i have resolve it. To fix this error
    1. uninstall maven by ubuntu software center
    2. delete ocal maven repository at .m2/repository
    3. Run maven pom file in eclipse again

  10. #10
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hey!

    Glad to hear that you got it working. And thanks for sharing your solution with us!!!

    Cheers,
    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •