mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-50429 Maven: properties usages are not resolved in filtered test resources
This commit is contained in:
@@ -327,7 +327,7 @@ public class MavenDomUtil {
|
||||
if (cachedValue == null || cachedValue.first != VirtualFileManager.getInstance().getModificationCount()) {
|
||||
Set<VirtualFile> set = null;
|
||||
|
||||
for (MavenResource resource : mavenProject.getResources()) {
|
||||
for (MavenResource resource : ContainerUtil.concat(mavenProject.getResources(), mavenProject.getTestResources())) {
|
||||
if (!resource.isFiltered()) continue;
|
||||
|
||||
VirtualFile resourceDir = LocalFileSystem.getInstance().findFileByPath(resource.getDirectory());
|
||||
|
||||
+22
@@ -48,6 +48,28 @@ public class MavenFilteredPropertiesCompletionAndResolutionTest extends MavenDom
|
||||
assertResolved(f, findTag("project.version"));
|
||||
}
|
||||
|
||||
public void testTestResourceProperties() throws Exception {
|
||||
createProjectSubDir("res");
|
||||
|
||||
importProject("<groupId>test</groupId>" +
|
||||
"<artifactId>project</artifactId>" +
|
||||
"<version>1</version>" +
|
||||
|
||||
"<build>" +
|
||||
" <testResources>" +
|
||||
" <testResource>" +
|
||||
" <directory>res</directory>" +
|
||||
" <filtering>true</filtering>" +
|
||||
" </testResource>" +
|
||||
" </testResources>" +
|
||||
"</build>");
|
||||
|
||||
VirtualFile f = createProjectSubFile("res/foo.properties",
|
||||
"foo=abc${project<caret>.version}abc");
|
||||
|
||||
assertResolved(f, findTag("project.version"));
|
||||
}
|
||||
|
||||
public void testBasicAt() throws Exception {
|
||||
createProjectSubDir("res");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user