You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Maven项目创建及依赖添加权限错误求助

Hey there, let's work through these Maven issues you're facing step by step:

Issue 1: Failed to resolve org.apache.maven.archetypes:maven-archetype-quickstart:1.1 + Permission denied when creating Maven project directly in Eclipse

Here are targeted fixes for both problems:

  • Fix the permission denied error
    This usually happens because Eclipse doesn't have write access to its installation directory or your workspace folder. Try these:

    • Right-click the Eclipse icon and select Run as administrator to get elevated permissions.
    • Move your Eclipse workspace to a non-system drive (e.g., from C: to D:), since system directories often have strict permission restrictions.
  • Fix archetype resolution failure
    The most common cause is network issues accessing the default Maven Central Repository. Here's how to fix it:

    1. Add a domestic Maven mirror (like Alibaba Cloud) to your settings.xml file (located in ~/.m2/ or your Maven installation's conf folder). Insert this inside the <mirrors> node:
      <mirror>
        <id>aliyunmaven</id>
        <mirrorOf>central</mirrorOf>
        <url>https://maven.aliyun.com/repository/public</url>
      </mirror>
      
    2. If the mirror doesn't work, manually download the archetype:
      Locate org.apache.maven.archetypes:maven-archetype-quickstart:1.1 in Maven Central, download the .jar and .pom files, and place them in your local repository path: ~/.m2/repository/org/apache/maven/archetypes/maven-archetype-quickstart/1.1.
    3. Alternatively, skip archetype selection temporarily: When creating the Maven project, check Create a simple project (skip archetype selection) to create a basic project first, then add necessary configurations later.

Issue 2: Failed to read artifact descriptor for selenium-java:3.12.0 after converting a regular project to Maven

Try these troubleshooting steps:

  • Verify Maven mirror configuration
    Make sure the mirror you added in settings.xml covers Selenium dependencies (the Alibaba Cloud mirror we mentioned earlier does this by default).
  • Clear local repository cache
    Corrupted cache files often cause this error. Delete the folder ~/.m2/repository/org/seleniumhq/selenium/selenium-java/3.12.0, then right-click your project in Eclipse → Maven → Update Project, check Force Update of Snapshots/Releases, and click OK to re-download the dependency.
  • Ensure Eclipse uses your external Maven installation
    Sometimes Eclipse defaults to its built-in Maven instead of your configured 3.5.3 version. Go to Window → Preferences → Maven → Installations, add your Apache Maven 3.5.3 directory, and set it as the default.
  • Check JDK compatibility
    Selenium 3.12.0 is compatible with JDK 1.8, but confirm your project uses the correct JDK: Right-click the project → Properties → Java Build Path → Libraries, ensure the JRE System Library is set to JDK 1.8.0_171.

内容的提问来源于stack exchange,提问作者vanibhat

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 07:30:30