简体   繁体   中英

Maven error “Cannot resolve project dependencies:” — “org.eclipse.jst.web_sdk.feature.feature.group”

I was following the instructions at Import into Eclipse and Set up Development Environment when I got to the step that says

  1. Run the setup.sh script if you havn't created the target platform: sh setup.sh.

It is to be run in terminal on macOS.

I received the following error messages:

[ERROR] Cannot resolve project dependencies:

[ERROR] Software being installed: com.amazonaws.eclipse.devide raw:1.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.0-SNAPSHOT

[ERROR] Missing requirement: com.amazonaws.eclipse.devide raw:1.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.0-SNAPSHOT requires 'org.eclipse.jst.web_sdk.feature.feature.group 0.0.0' but it could not be found

[ERROR]

[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.

[ERROR] Cannot resolve dependencies of MavenProject: com.amazonaws.eclipse:com.amazonaws.eclipse.devide:1.0.0-SNAPSHOT @ /Users/shinehah/git/aws-toolkit-eclipse-java-ee-and-report/releng/com.amazonaws.eclipse.devide/pom.xml: See log for details -> [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/MavenExecutionException

It looks like I need to add "org.eclipse.jst.web_sdk.feature.feature.group" as a dependency, but I'm not able to find that module to download.

This is what is in the pom.xml file originally:

<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.amazonaws.eclipse</groupId>
    <artifactId>com.amazonaws.eclipse.releng</artifactId>
    <version>1.0.0-SNAPSHOT</version>
  </parent>
  <artifactId>com.amazonaws.eclipse.devide</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <packaging>eclipse-repository</packaging>

  <build>
    <plugins>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-p2-repository-plugin</artifactId>
        <version>${tycho.version}</version>
        <configuration>
          <includeAllDependencies>true</includeAllDependencies>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

This is the pom.xml file after I added content to it:

<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.amazonaws.eclipse</groupId>
    <artifactId>com.amazonaws.eclipse.releng</artifactId>
    <version>1.0.0-SNAPSHOT</version>
  </parent>
  <artifactId>com.amazonaws.eclipse.devide</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <packaging>eclipse-repository</packaging>

  <dependencies>
    <dependency>
      <groupId>com.amazonaws.eclipse</groupId>
      <artifactId>org.eclipse.jst.web_sdk.feature.feature.group</artifactId>
      <version>1.0.0</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-p2-repository-plugin</artifactId>
        <version>${tycho.version}</version>
        <configuration>
          <includeAllDependencies>true</includeAllDependencies>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

This is a screenshot of the Project Explorer in Eclipse. I don't have any projects, just this workspace.

项目浏览器窗格

This is the pane titled "Markers" at the bottom of the Eclipse IDE:

标记窗格 What do I need to do to successfully run "sh setup.sh" as the step instructs?

This project is different from other project. it is an eclipse plugin project. First of all, after cloning this project, go to command prompt pointing to the directory of this plugin project and run the following command.

mvn clean package .

Once the build is successful, import as plugin project in eclipse. This is the normal way of importing eclipse plugin project. It is recommended to go through the ReadMe.md file in the github link. https://github.com/aws/aws-toolkit-eclipse

I will suggest, first go through the following helpful links about tycho and how to configure and develop eclipse plugin.

https://wiki.eclipse.org/Developing_Tycho https://www.vogella.com/tutorials/EclipseTycho/article.html

You can also refer to the following stackoverflow link.

Dependencies from pom.xml not considered by Eclipse in Tycho Project

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM