use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class InvalidProjectImportingTest method testUnresolvedExtensionsAfterImport.
@Bombed(user = "Vladislav.Soroka", year = 2020, month = Calendar.APRIL, day = 1, description = "temporary disabled")
public void testUnresolvedExtensionsAfterImport() throws Exception {
importProject("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<version>1</version>" + "<build>" + " <extensions>" + " <extension>" + " <groupId>xxx</groupId>" + " <artifactId>yyy</artifactId>" + " <version>1</version>" + " </extension>" + " </extensions>" + "</build>");
MavenProject root = getRootProjects().get(0);
assertProblems(root, "Unresolved build extension: 'xxx:yyy:1'");
}
use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class DependenciesImportingTest method testInterModuleDependenciesWithLatestVersionAreBeingSetupForSnapshots.
public void testInterModuleDependenciesWithLatestVersionAreBeingSetupForSnapshots() throws Exception {
createProjectPom("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<packaging>pom</packaging>" + "<version>1</version>" + "<modules>" + " <module>m1</module>" + " <module>m2</module>" + "</modules>");
createModulePom("m1", "<groupId>test</groupId>" + "<artifactId>m1</artifactId>" + "<version>1</version>" + "<dependencies>" + " <dependency>" + " <groupId>test</groupId>" + " <artifactId>m2</artifactId>" + " <version>LATEST</version>" + " </dependency>" + "</dependencies>");
createModulePom("m2", "<groupId>test</groupId>" + "<artifactId>m2</artifactId>" + "<version>1-SNAPSHOT</version>");
importProject();
assertModules("project", "m1", "m2");
assertModuleModuleDeps("m1", "m2");
assertModuleLibDeps("m1");
MavenProject p = myProjectsTree.findProject(new MavenId("test", "m1", "1"));
assertEquals(new MavenId("test", "m2", "1-SNAPSHOT"), p.getDependencies().get(0).getMavenId());
}
use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class DependenciesImportingTest method testPropertyInTheManagedModuleDependencyVersionOfPomType.
public void testPropertyInTheManagedModuleDependencyVersionOfPomType() throws Exception {
createProjectPom("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<version>1</version>" + "<packaging>pom</packaging>" + "<properties>" + " <version>1</version>" + "</properties>" + "<dependencyManagement>" + " <dependencies>" + " <dependency>" + " <groupId>xxx</groupId>" + " <artifactId>yyy</artifactId>" + " <version>${version}</version>" + " <type>pom</type>" + " </dependency>" + " </dependencies>" + "</dependencyManagement>" + "<modules>" + " <module>m</module>" + "</modules>");
createModulePom("m", "<groupId>test</groupId>" + "<artifactId>m</artifactId>" + "<parent>" + " <groupId>test</groupId>" + " <artifactId>project</artifactId>" + " <version>1</version>" + "</parent>" + "<dependencies>" + " <dependency>" + " <groupId>xxx</groupId>" + " <artifactId>yyy</artifactId>" + " <type>pom</type>" + " </dependency>" + "</dependencies>");
importProject();
assertModules("project", "m");
assertModuleLibDeps("m");
if (ignore())
return;
MavenProject root = myProjectsTree.getRootProjects().get(0);
List<MavenProject> modules = myProjectsTree.getModules(root);
assertOrderedElementsAreEqual(root.getProblems());
assertOrderedElementsAreEqual(modules.get(0).getProblems(), "Unresolved dependency: xxx:yyy:pom:1:compile");
}
use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class InvalidProjectImportingTest method testDoesNotReportInterModuleDependenciesAsUnresolved.
public void testDoesNotReportInterModuleDependenciesAsUnresolved() throws Exception {
createProjectPom("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<packaging>pom</packaging>" + "<version>1</version>" + "<modules>" + " <module>m1</module>" + " <module>m2</module>" + "</modules>");
createModulePom("m1", "<groupId>test</groupId>" + "<artifactId>m1</artifactId>" + "<version>1</version>" + "<dependencies>" + " <dependency>" + " <groupId>test</groupId>" + " <artifactId>m2</artifactId>" + " <version>1</version>" + " </dependency>" + "</dependencies>");
createModulePom("m2", "<groupId>test</groupId>" + "<artifactId>m2</artifactId>" + "<version>1</version>");
importProject();
MavenProject root = getRootProjects().get(0);
assertProblems(root);
assertProblems(getModules(root).get(0));
assertProblems(getModules(root).get(1));
}
use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class InvalidProjectImportingTest method testMissingModules.
public void testMissingModules() throws Exception {
importProject("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<version>1</version>" + "<packaging>pom</packaging>" + "<modules>" + " <module>foo</module>" + "</modules>");
assertModules("project");
MavenProject root = getRootProjects().get(0);
assertProblems(root, "Module 'foo' not found");
}
Aggregations