Eclipse Neon + Maven =所选操作不可用 [英] Eclipse Neon + Maven = The chosen operation is not available

查看:68
本文介绍了Eclipse Neon + Maven =所选操作不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个Maven项目,直到今天我决定将Spring版本从3升级到4时,一切都按预期进行.单击Maven-> update项目,出现此消息:

I am working on a maven project and everything was working as expected until today when I decided to upgrade the spring version from 3 to 4. Clicked on Maven->update project and this message arised:

所选操作当前不可用

The chosen operation is not currently available

不确定这是否相关,但这是我的pom.xml:

Not sure if this is relevant but here is my pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.train</groupId>
<artifactId>TrainingApp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>

<dependencies>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${spring.version}</version>
        <exclusions>
            <exclusion>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-expression</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aop</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${spring.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <artifactId>hibernate-jpa-2.0-api</artifactId>
        <groupId>org.hibernate.javax.persistence</groupId>
        <version>1.0.1.Final</version>
    </dependency>

    <dependency>
        <groupId>org.javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.18.1-GA</version>
    </dependency>

    <!-- Hibernate -->
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>${hibernate.version}</version>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>${hibernate.version}</version>
        <scope>runtime</scope>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>${hibernate.validator.version}</version>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-ehcache</artifactId>
        <version>${hibernate.version}</version>
        <scope>runtime</scope>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-search-orm</artifactId>
        <version>${hibernate.search.version}</version>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-search-engine</artifactId>
        <version>${hibernate.search.version}</version>
    </dependency>

    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>${mysql.connector.version}</version>
    </dependency>
</dependencies>

<properties>
    <spring.version>4.2.3.RELEASE</spring.version>
    <hibernate.version>4.2.15.Final</hibernate.version>
    <hibernate.search.version>4.3.0.Final</hibernate.search.version>
    <hibernate.validator.version>4.3.2.Final</hibernate.validator.version>
    <mysql.connector.version>5.1.6</mysql.connector.version>
</properties>

有什么想法吗?

推荐答案

我知道问题很老,但是由于我仍然遇到相同的错误:尝试删除

I know question is old, but since I am still getting the same error: Try deleting

C:\ Users \您的名字\ workspace \ .metadata \ .plugins \ org.eclipse.e4.workbench \ workbench.xmi

C:\Users\yourname\workspace\.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi

对我来说,每次都有效.如果问题仍然存在,请避免以良好的方式关闭Eclipse,而只是终止该过程.

For me this works every time. If problem persists, avoid shutting Eclipse down the nice way but rather just kill the process.

我知道,我知道..虽然不是最好的解决方案,但还是一个快速的解决方案.Neon并未引入此错误,但旧版本中也存在此错误.因此,我猜想它与Maven有关,而不是与Eclipse有关.

I know, I know.. not the best solution, but a quick solution nonetheless. This error was not introduced with Neon, but was here in older versions, too. So I am guessing it has something to do with Maven rather than Eclipse.

这篇关于Eclipse Neon + Maven =所选操作不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆