use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class InvalidProjectImportingTest method testUnresolvedParent.
public void testUnresolvedParent() throws Exception {
importProject("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<version>1</version>" + "<parent>" + " <groupId>test</groupId>" + " <artifactId>parent</artifactId>" + " <version>1</version>" + "</parent>");
assertModules("project");
MavenProject root = getRootProjects().get(0);
assertProblems(root, "Parent 'test:parent:1' not found");
}
use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class InvalidProjectImportingTest method testUnresolvedPomTypeDependency.
@Bombed(user = "Vladislav.Soroka", year = 2020, month = Calendar.APRIL, day = 1, description = "temporary disabled")
public void testUnresolvedPomTypeDependency() throws Exception {
createProjectPom("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<version>1</version>" + "<dependencies>" + " <dependency>" + " <groupId>xxx</groupId>" + " <artifactId>yyy</artifactId>" + " <version>4.0</version>" + " <type>pom</type>" + " </dependency>" + "</dependencies>");
importProject();
assertModuleLibDeps("project");
MavenProject root = getRootProjects().get(0);
assertProblems(root, "Unresolved dependency: 'xxx:yyy:pom:4.0'");
}
use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class InvalidProjectImportingTest method testUnknownProblemWithEmptyFile.
public void testUnknownProblemWithEmptyFile() throws Exception {
createProjectPom("");
new WriteAction() {
@Override
protected void run(@NotNull Result result) throws Throwable {
myProjectPom.setBinaryContent(new byte[0]);
}
}.execute().throwException();
importProject();
assertModules("project");
MavenProject root = getRootProjects().get(0);
assertProblems(root, "'pom.xml' has syntax errors");
}
use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class InvalidProjectImportingTest method testInvalidSettingsXml.
public void testInvalidSettingsXml() throws Exception {
updateSettingsXml("<localRepo<<");
importProject("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<version>1</version>");
assertModules("project");
MavenProject root = getRootProjects().get(0);
assertProblems(root, "'settings.xml' has syntax errors");
}
use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class InvalidProjectImportingTest method testInvalidModuleModel.
public void testInvalidModuleModel() throws Exception {
createProjectPom("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<version>1</version>" + "<packaging>pom</packaging>" + "<modules>" + " <module>foo</module>" + "</modules>");
createModulePom("foo", "<groupId>test</groupId>" + "<artifactId>foo</artifactId>" + // invalid tag
"<version>1");
importProject();
assertModules("project", "foo");
MavenProject root = getRootProjects().get(0);
assertProblems(root);
assertProblems(getModules(root).get(0), "'pom.xml' has syntax errors");
}
Aggregations