微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

设置<sourceDirectory>时,Maven POM <testResources>不起作用

如何解决设置<sourceDirectory>时,Maven POM <testResources>不起作用

我正在使用IntellIJ IDE,我试图从POM设置项目结构,因为每次我直接从IntellIJ下载项目时,这种设置都是一种烦人的设置,因此我在在build标签下的POM几乎可以正常工作

<build>
    <testSourceDirectory>${project.basedir}/src/main/java</testSourceDirectory>
    <testResources>
        <testResource>
            <directory>${project.basedir}/src/test/resources</directory>
        </testResource>
    </testResources>
    <sourceDirectory>${project.basedir}/src/test</sourceDirectory>
</build>

缺少的部分是“ testResources”,当标签“ sourceDirectory”不在POM中时,此方法工作正常,但是当我将所有这些设置在一起时,此方法不起作用,这里有什么想法或建议吗?

enter image description here

预期:

enter image description here

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。