Could not resolve archetype when creating a Maven Project

This topic contains 7 replies, has 4 voices, and was last updated by Profile photo of support-swapna support-swapna 4 days, 4 hours ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #350842 Reply
    Profile photo of psmith2234
    psmith2234
    Member

    When attempting to create a Maven project I’m getting a could not resolve archetype.

    Here is the Detail of the error message:
    Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of the configured repositories.
    Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE
    Failed to resolve version for org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-webapp/maven-metadata.xml in local (C:\Users\smpatric\.m2\repository)
    Failed to resolve version for org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-webapp/maven-metadata.xml in local (C:\Users\smpatric\.m2\repository)

    What do I have to do to get by this error?

    #350849 Reply
    Profile photo of support-swapna
    support-swapna
    Moderator

    Smith,

    Sorry that you are seeing this issue.

    Can you please answer some more questions for us ?

    1. Are you behind a firewall or proxy?

    If yes, then :

    a) You should create a file called settings.xml in [user]/.m2 directory with the proxy information defined. Here is the reference : http://maven.apache.org/settings.html#Proxies

    b) Go to Window > Preferences > MyEclipse > Maven4MyEclipse > User Settings. Make sure the User Settings points to the correct path of settings.xml file. Click on ‘Update Settings’ and ‘Reindex’. Apply the changes.

    c) While Maven is downloading the files, it will take time to update indexes.You will see an updating indexes message at the corner of MyEclipse IDE. Only when this process is success, try to create a maven project.

    2. You could also rename / delete the .m2 folder itself and force MyEclipse to re-download all dependencies on startup. Go to Window > Preferences > MyEclipse > Maven4MyEclipse. Make sure the ‘Download repository index updates on startup’ is checked. Close the IDE. Rename/delete the .m2 folder and start the IDE. Wait till the Maven finishes downloading the files and then try creating a new Maven project.

    3. If you are still seeing issues, please share the MyEclipse Version and Build id from Help > About.

    Let us know how it works for you.

    #540702 Reply
    Profile photo of sak123
    sak123
    Participant

    Hi Swapna, i tried above solution but i am still not able create maven project. Below is the error i get “Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.” Kindly help

    #540705 Reply
    Profile photo of support-swapna
    support-swapna
    Moderator

    sak123,

    Sorry that you are seeing issues with maven project creation.

    Can you please clarify if you are behind a firewall or proxy and you have set up the proxy details in MyEclipse here : Window > Preferences > General > Network Connections ?

    Please let us know what exact solution did you try. Did you also try renaming/deleting the .m2 folder as suggested in the above response?

    If the settings.xml is pointing to the correct proxy server and none of the suggestions in the above response worked, then please share with us the .log file located at workspace dir/.metadata/.log along with the MyEclipse Build Id and Version details from Help > About MyEclipse section.

    Apologies for inconvenience caused.

    –Swapna
    MyEclipse Support

    #540709 Reply
    Profile photo of sak123
    sak123
    Participant

    Hi,

    I tried deleting M2 folder but could not get success in it.Please find below screenshots for log file and Network Connections.

    Attachments:
    You must be logged in to view attached files.
    #540713 Reply
    Profile photo of support-swapna
    support-swapna
    Moderator

    sak123,

    Thank you for the screenshots. In addition to setting the correct proxy details in the Network Connections page, you should also define them in the settings.xml file as suggested in my previous response.

    Please refer to the links and check if the suggestions work for you :
    https://stackoverflow.com/questions/15506043/create-a-maven-project-in-eclipse-complains-could-not-resolve-archetype
    https://stackoverflow.com/questions/18499931/eclipse-java-ee-new-maven-project-could-not-resolve-archetype

    I am afraid we cannot provide further support as you are working with Eclipse and not MyEclipse. I suggest you check with Eclipse forums or development related forums like stackoverflow.com for better support from the developer community.

    Hope this helps.

    –Swapna
    MyEclipse Support

    #543181 Reply
    Profile photo of harithareddy
    harithareddy
    Participant

    [INFO] Scanning for projects…
    [INFO]
    [INFO] ————————————————————————
    [INFO] Building hello 0.0.1-SNAPSHOT
    [INFO] ————————————————————————
    [INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
    [INFO] ————————————————————————
    [INFO] BUILD FAILURE
    [INFO] ————————————————————————
    [INFO] Total time: 2.187 s
    [INFO] Finished at: 2017-11-20T11:28:16+05:30
    [INFO] Final Memory: 11M/111M
    [INFO] ————————————————————————
    [ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Connect to 10.219.40.60:80 [/10.219.40.60] failed: Connection refused: connect -> [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’m getting the above error when I try to run the maven project
    I’m attaching the screen shot of my settings.xml. I’m using office proxy.Please help me out.

    Attachments:
    You must be logged in to view attached files.
    #543240 Reply
    Profile photo of support-swapna
    support-swapna
    Moderator

    Haritha,

    Sorry that you are seeing this issue.

    1. Can you please clarify if you have set up Network Connections (Window > Preferences > General > Network Connections) in MyEclipse IDE?

    2. Can you please go to Window>Preferences>MyEclipse>Maven4MyEclipse>User Settings and check if it points to the correct settings.xml?

    3. Can you please check if you can access the repo from your browser? If the proxy settings are right in the settings.xml, then please right click on the maven project > Maven > Update Project and check the option “Force update of Snapshots/Releases”.

    4. If the issue persists, then do a Maven clean and install the project and check. Also share with us the MyEclipse version details you are working with.

    Please let us know how it works for you.

    –Swapna
    MyEclipse Support

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Could not resolve archetype when creating a Maven Project