![](/img/trans.png)
[英]IDEA JetBrains IntelliJ - Compile error on 'make' but fine when compiled using Maven and no errors reported by IntelliJ in the class file
[英]Exclude folder in intellij idea using Maven
我們正在使用maven來管理我們的想法項目,但是我在排除想法項目中的目錄時遇到了問題。
使用idea,我只想進入Project Settings | 模塊| 來源並選擇我想要排除的文件夾,然后單擊“排除”按鈕。 從pom加載項目時,會自動排除目標。 我也想排除日志文件夾。
在maven我正在使用一個想法maven插件,它說我可以排除文件夾。 我正在使用此代碼,但它似乎不起作用:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-idea-plugin</artifactId>
<version>2.3-atlassian-1</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
<exclude>
${project.basedir}/logs
</exclude>
</configuration>
</plugin>
我嘗試了不同的格式以及放入完全限定的路徑(作為測試),但似乎沒有任何東西從我的想法項目中排除日志目錄。
任何有關如何使這個工作的想法?
謝謝,尼克。
我剛做了一個小測試,並使用以下代碼片段:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-idea-plugin</artifactId>
<configuration>
<exclude>test-output,.clover,logs</exclude>
</configuration>
</plugin>
生成的.iml
文件包含以下條目:
<excludeFolder url="file://$MODULE_DIR$/.clover"/>
<excludeFolder url="file://$MODULE_DIR$/logs"/>
<excludeFolder url="file://$MODULE_DIR$/target"/>
<excludeFolder url="file://$MODULE_DIR$/test-output"/>
據我所知,這是預期的結果。
你有不同的東西嗎? 你還在期待其他什么嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.