use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class InvalidProjectImportingTest method testUnresolvedPlugins.
@Bombed(user = "Vladislav.Soroka", year = 2020, month = Calendar.APRIL, day = 1, description = "temporary disabled")
public void testUnresolvedPlugins() throws Exception {
importProject("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<version>1</version>" + "<build>" + " <plugins>" + " <plugin>" + " <groupId>xxx</groupId>" + " <artifactId>yyy</artifactId>" + " <version>1</version>" + " </plugin>" + " </plugins>" + "</build>");
MavenProject root = getRootProjects().get(0);
assertProblems(root, "Unresolved plugin: 'xxx:yyy:1'");
}
use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class MavenModuleBuilderTest method testCreatingBlank.
public void testCreatingBlank() throws Exception {
if (!hasMavenInstallation())
return;
MavenId id = new MavenId("org.foo", "module", "1.0");
createNewModule(id);
List<MavenProject> projects = MavenProjectsManager.getInstance(myProject).getProjects();
assertEquals(1, projects.size());
MavenProject project = projects.get(0);
assertEquals(id, project.getMavenId());
assertModules("module");
MavenProjectsManager.getInstance(myProject).isMavenizedModule(getModule("module"));
assertSame(project, MavenProjectsManager.getInstance(myProject).findProject(getModule("module")));
assertNotNull(myProjectRoot.findFileByRelativePath("src/main/java"));
assertNotNull(myProjectRoot.findFileByRelativePath("src/test/java"));
assertSources("module", "src/main/java");
assertTestSources("module", "src/test/java");
}
use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class MavenModuleBuilderTest method testCreatingFromArchetype.
public void testCreatingFromArchetype() throws Exception {
if (!hasMavenInstallation())
return;
setArchetype(new MavenArchetype("org.apache.maven.archetypes", "maven-archetype-quickstart", "1.0", null, null));
MavenId id = new MavenId("org.foo", "module", "1.0");
createNewModule(id);
List<MavenProject> projects = MavenProjectsManager.getInstance(myProject).getProjects();
assertEquals(1, projects.size());
MavenProject project = projects.get(0);
assertEquals(id, project.getMavenId());
assertNotNull(myProjectRoot.findFileByRelativePath("src/main/java/org/foo/App.java"));
assertNotNull(myProjectRoot.findFileByRelativePath("src/test/java/org/foo/AppTest.java"));
assertSources("module", "src/main/java");
assertTestSources("module", "src/test/java");
}
use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class MavenProjectTest method testMavenModelMap.
public void testMavenModelMap() throws Exception {
importProject("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<version>1</version>" + "<build>" + " <finalName>foo</finalName>" + " <plugins>" + " <plugin>" + " <groupId>group1</groupId>" + " <artifactId>id1</artifactId>" + " <version>1</version>" + " </plugin>" + " </plugins>" + "</build>");
MavenProject p = getMavenProject();
Map<String, String> map = p.getModelMap();
assertEquals("test", map.get("groupId"));
assertEquals("foo", map.get("build.finalName"));
assertEquals(new File(p.getDirectory(), "target").toString(), map.get("build.directory"));
assertEquals(null, map.get("build.plugins"));
assertEquals(null, map.get("build.pluginMap"));
}
use of org.jetbrains.idea.maven.project.MavenProject in project intellij-community by JetBrains.
the class InvalidProjectImportingTest method testUnresolvedExtensionsAfterResolve.
@Bombed(user = "Vladislav.Soroka", year = 2020, month = Calendar.APRIL, day = 1, description = "temporary disabled")
public void testUnresolvedExtensionsAfterResolve() 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>");
resolveDependenciesAndImport();
MavenProject root = getRootProjects().get(0);
assertProblems(root, "Unresolved build extension: 'xxx:yyy:1'");
}
Aggregations