facebook

Could not resolve archetype when creating a Maven Project

  1. MyEclipse IDE
  2.  > 
  3. Maven for MyEclipse (Maven4MyEclipse)
Viewing 15 posts - 1 through 15 (of 31 total)
  • Author
    Posts
  • #350842 Reply

    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

    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

    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

    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

    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

    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

    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

    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

    #612170 Reply

    ayyaj
    Participant

    Hello @support-swapna
    Can you help me?

    I am getting this error while plugin MVEN with Eclipse

    Microsoft Windows [Version 10.0.17134.648]
    (c) 2018 Microsoft Corporation. All rights reserved.

    C:\Users\ajamadar>mvn -v
    Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T00:11:47+05:30)
    Maven home: C:\work\Maven\apache-maven-3.6.0\bin\..
    Java version: 10.0.2, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-10.0.2
    Default locale: en_US, platform encoding: Cp1252
    OS name: “windows 10”, version: “10.0”, arch: “amd64”, family: “windows”

    C:\Users\ajamadar>mvn archetype:generate “DgroupId=qaclickacademy” “DartifactId=Mavenjava” “DarchetypeArtifactId=maven-archetype-quickstart” “DinteractiveMode=false”
    [INFO] Scanning for projects…
    [INFO] ————————————————————————
    [INFO] BUILD FAILURE
    [INFO] ————————————————————————
    [INFO] Total time: 0.084 s
    [INFO] Finished at: 2019-04-06T13:54:59+05:30
    [INFO] ————————————————————————
    [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\ajamadar). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException

    #612255 Reply

    Brian Fernandes
    Moderator

    ayaaj,

    mvn archetype:generate “DgroupId=qaclickacademy” “DartifactId=Mavenjava” “DarchetypeArtifactId=maven-archetype-quickstart” “DinteractiveMode=false”
    Your command is incorrectly specified as you are placing your switches within quotes, it should be something like
    mvn archetype:generate -DgroupId=qaclickacademy ..

    See this link for more information. Hope this helps.

    #612342 Reply

    bhupesh-yedla
    Participant

    Hi Swapna,

    I have done all the below steps as suggested but still getting the same issue regarding archetype as below:

    “Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories”

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

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

    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”.- Done

    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.- Done

    Please find the details of eclipse version and build :
    Eclipse IDE for Java Developers
    Version: Oxygen.3a Release (4.7.3a)
    Build id: 20180405-1200

    Kindly please help me to get this resolved. I really have no idea what cuold be the potential issue here stopping me to create a maven project.

    Thanks,
    Bhupesh Yedla.

    #612346 Reply

    Brian Fernandes
    Moderator

    Bhupesh,

    1) There are several people on this thread, since you haven’t posted earlier, I’m not sure what your starting state is, and where and how you are executing the commands. Are you using a wizard (if so, which one) or are you executing these commands on the command line?

    2) It would appear that you’re using a regular Eclipse install (Eclipse IDE for Java Developers), not MyEclipse, so the interface, options and capabilities are a bit different. If this really is the case, you might be better served by asking on stackoverflow. If you are using MyEclipse, do provide more context, and send in your workspace error log, which you can find at [workspace_location]/.metadata/.log

    #615851 Reply

    priytam92
    Participant

    HI I am facing below problem while creating a maven project:

    Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.
    Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1
    Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central (https://repo.maven.apache.org/maven2): connect timed out
    Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central (https://repo.maven.apache.org/maven2): connect timed out

    Attachments:
    You must be logged in to view attached files.
    #615853 Reply

    support-swapna
    Moderator

    priytam92,

    Sorry that you are seeing this issue.

    From the screenshot, it looks like you are working with Eclipse. Have you installed any of our plugins (CodeMix/Angular IDE/DevStyle) to Eclipse?

    There seems to be a problem reaching the Maven repository.Are you behind a firewall or proxy? If yes, then 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

    In addition to the settings.xml, you should also setup the proxy information in Eclipse here : Window > Preferences > General > Network Connections.

    If you are not behind a firewall or proxy and if you can access https://repo.maven.apache.org/maven2 this link from your browser, then go to the .m2 folder located in your user home directory and delete the 1.1 folder located here : .m2\repository\org\apache\maven\archetypes\maven-archetype-quickstart. Restart Eclipse and try creating the project. This should download it again.

    Hope this helps.

    –Swapna
    Genuitec Support

    #617616 Reply

    ramyasandeep
    Participant

    I was unable to create maven project
    err message shown is:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.
    Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1
    Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

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

You must be logged in to post in the forum log in