【问题标题】:package structure is changed in eclipseeclipse中的包结构改变了
【发布时间】:2015-02-11 15:30:58
【问题描述】:

我有一个运行良好的动态网络项目。然后我尝试使用mvn eclipse:eclipse -Dwtpversion=2.0 命令将其更改为 mvn web 项目,然后我的包结构被更改。 main.java 包已添加到我的包中。我试图通过添加

来更改 .classpath 文件
<classpathentry kind="src" output="target/classes" path="src/main/java">
        <attributes>
            <attribute name="optional" value="true"/>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
        <attributes>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>

但项目包没有改变。 下面是我更改的项目结构。我怎样才能让它恢复正常(从包中删除 main.java) 提前致谢

编辑:

当我尝试编辑源文件夹时,它显示以下错误:

【问题讨论】:

    标签: eclipse maven configuration


    【解决方案1】:

    您必须在 Java 构建路径下更改项目配置中的源文件夹

    【讨论】:

      猜你喜欢
      • 2014-10-19
      • 2015-08-26
      • 2014-05-27
      • 2018-06-05
      • 2013-07-11
      • 1970-01-01
      • 2012-01-09
      • 2015-04-12
      • 1970-01-01
      相关资源
      最近更新 更多