Search in sources :

Example 11 with SoutMavenConsole

use of org.jetbrains.idea.maven.execution.SoutMavenConsole in project intellij-community by JetBrains.

the class MavenServerEmbedderTest method _testExecutionGoals.

public void _testExecutionGoals() throws Exception {
    createProjectSubFile("src/main/java/A.java", "public class A {}");
    createProjectPom("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<version>1</version>");
    myEmbedder.customizeForResolve(new SoutMavenConsole(), EMPTY_MAVEN_PROCESS);
    MavenServerExecutionResult result = myEmbedder.execute(myProjectPom, Collections.<String>emptyList(), Collections.<String>emptyList(), Arrays.asList("compile"));
    assertNotNull(result.projectData);
    assertNotNull(new File(getProjectPath(), "target").exists());
    assertOrderedElementsAreEqual(result.unresolvedArtifacts);
    MavenModel project = result.projectData.mavenModel;
    assertNotNull(project);
    assertEquals("project", project.getMavenId().getArtifactId());
}
Also used : MavenServerExecutionResult(org.jetbrains.idea.maven.server.MavenServerExecutionResult) MavenModel(org.jetbrains.idea.maven.model.MavenModel) SoutMavenConsole(org.jetbrains.idea.maven.execution.SoutMavenConsole) VirtualFile(com.intellij.openapi.vfs.VirtualFile) File(java.io.File)

Aggregations

SoutMavenConsole (org.jetbrains.idea.maven.execution.SoutMavenConsole)11 MavenServerExecutionResult (org.jetbrains.idea.maven.server.MavenServerExecutionResult)9 MavenModel (org.jetbrains.idea.maven.model.MavenModel)5 MavenId (org.jetbrains.idea.maven.model.MavenId)4 VirtualFile (com.intellij.openapi.vfs.VirtualFile)3 File (java.io.File)3 Notification (com.intellij.notification.Notification)2 CommonBundle (com.intellij.CommonBundle)1 NotificationType (com.intellij.notification.NotificationType)1 Notifications (com.intellij.notification.Notifications)1 ApplicationManager (com.intellij.openapi.application.ApplicationManager)1 WriteAction (com.intellij.openapi.application.WriteAction)1 ProgressIndicator (com.intellij.openapi.progress.ProgressIndicator)1 ProgressManager (com.intellij.openapi.progress.ProgressManager)1 Task (com.intellij.openapi.progress.Task)1 Project (com.intellij.openapi.project.Project)1 JavadocOrderRootType (com.intellij.openapi.roots.JavadocOrderRootType)1 OrderRootType (com.intellij.openapi.roots.OrderRootType)1 NewLibraryConfiguration (com.intellij.openapi.roots.libraries.NewLibraryConfiguration)1 OrderRoot (com.intellij.openapi.roots.libraries.ui.OrderRoot)1