Open Maven project in LightPlatformCodeInsightFixtureTestCase
已回答
Hello,
I'm trying to make a test for my plugin. My plugin works with Maven pom.xml dependencies. As I understand for test plugin functionality I need to open or import the Maven project in the test case.
I tried
MavenProjectsTree.read(myProject, Paths.get("pom.xml"))
but no success.
Also, I tried something like
val myProjectsManager = MavenProjectsManager.getInstance(myProject)
val virtualFile = LocalFileSystem.getInstance().findFileByIoFile(new File("pom.xml"))
val files = util.Arrays.asList(virtualFile)
myProjectsManager.addManagedFiles(files)
Maybe someone can help me with this issue. In any case, thank you!
Best regards,
Alex.
请先登录再写评论。
Please see org.jetbrains.idea.maven.MavenImportingTestCase and related from Maven plugin sources (bundled in IJ Community)
Thank you, Yann! This is useful information.