Package org.objectstyle.woproject.maven2

Examples of org.objectstyle.woproject.maven2.JApplicationMojo


    if (locator != null) {
      return;
    }

    if (webObjectsLibFolder != null && webObjectsVersion != null) {
      locator = new CustomWebObjectsLocator(webObjectsLibFolder);
    } else if (illegalSetOfParameters()) {
      throw new MojoExecutionException("You must provide both webObjectsLibFolder and webObjectsVersion to use a custom locator for WebObjects libraries");
    } else if (SystemUtils.IS_OS_MAC_OSX) {
      locator = new MacOsWebObjectsLocator();
    } else if (SystemUtils.IS_OS_WINDOWS) {
View Full Code Here


    if (webObjectsLibFolder != null && webObjectsVersion != null) {
      locator = new CustomWebObjectsLocator(webObjectsLibFolder);
    } else if (illegalSetOfParameters()) {
      throw new MojoExecutionException("You must provide both webObjectsLibFolder and webObjectsVersion to use a custom locator for WebObjects libraries");
    } else if (SystemUtils.IS_OS_MAC_OSX) {
      locator = new MacOsWebObjectsLocator();
    } else if (SystemUtils.IS_OS_WINDOWS) {
      locator = new WindowsWebObjectsLocator();
    } else if (SystemUtils.IS_OS_UNIX) {
      locator = new UnixWebObjectsLocator();
    } else {
View Full Code Here

    } else if (SystemUtils.IS_OS_MAC_OSX) {
      locator = new MacOsWebObjectsLocator();
    } else if (SystemUtils.IS_OS_WINDOWS) {
      locator = new WindowsWebObjectsLocator();
    } else if (SystemUtils.IS_OS_UNIX) {
      locator = new UnixWebObjectsLocator();
    } else {
      throw new MojoExecutionException("Unsupported OS platform.");
    }
  }
View Full Code Here

public class AbstractBootstrapTestCase {
  protected AbstractBootstrapMojo mojo;

  public WebObjectsLocator getMockLocator() {
    WebObjectsLocator mockLocator = EasyMock.createMock(WebObjectsLocator.class);

    File versionFile = FileUtils.toFile(getClass().getResource("/version.plist"));

    EasyMock.expect(mockLocator.getWebObjectsVersionFile()).andReturn(versionFile);

    EasyMock.replay(new Object[] { mockLocator });

    return mockLocator;
  }
View Full Code Here

    output = new String[] { "JavaDirectToWeb", "JavaFoundation", "javaeoutil", "JavaXML" };

    File versionFile = FileUtils.toFile(getClass().getResource("/version.plist"));

    WebObjectsLocator mockLocator = EasyMock.createMock(WebObjectsLocator.class);

    EasyMock.expect(mockLocator.getWebObjectsVersionFile()).andReturn(versionFile);

    EasyMock.replay(new Object[] { mockLocator });

    mojo = new MockBootstrapMojo(mockLocator);
  }
View Full Code Here

    assertNull(mojo.getArtifactIdForJar(null));
    assertNull(mojo.fillProperties(null));
  }

  public void testWarningForNotMappedArtifact() throws Exception {
    WebObjectsLocator mockLocator = EasyMock.createMock(WebObjectsLocator.class);

    File versionFile = FileUtils.toFile(getClass().getResource("/version.plist"));

    EasyMock.expect(mockLocator.getWebObjectsVersionFile()).andReturn(versionFile);

    File file = FileUtils.toFile(getClass().getResource("/mock-jar1.jar")).getParentFile();

    EasyMock.expect(mockLocator.getWebObjectsLibFolder()).andReturn(file);

    EasyMock.replay(mockLocator);

    mojo.locator = mockLocator;
    mojo.nullFillProperties = true;
View Full Code Here

    assertThat(mojo.getLog().warningCount, is(2));
    assertThat(mojo.executeGoalCount, is(0));
  }

  public void testWebObjectsNotInstalled() throws Exception {
    WebObjectsLocator mockLocator = EasyMock.createMock(WebObjectsLocator.class);

    EasyMock.expect(mockLocator.getWebObjectsVersionFile()).andReturn(null);

    mojo.locator = mockLocator;

    EasyMock.replay(new Object[] { mockLocator });
View Full Code Here

    } else if (illegalSetOfParameters()) {
      throw new MojoExecutionException("You must provide both webObjectsLibFolder and webObjectsVersion to use a custom locator for WebObjects libraries");
    } else if (SystemUtils.IS_OS_MAC_OSX) {
      locator = new MacOsWebObjectsLocator();
    } else if (SystemUtils.IS_OS_WINDOWS) {
      locator = new WindowsWebObjectsLocator();
    } else if (SystemUtils.IS_OS_UNIX) {
      locator = new UnixWebObjectsLocator();
    } else {
      throw new MojoExecutionException("Unsupported OS platform.");
    }
View Full Code Here

    try {
      File tempPom = File.createTempFile("pom-", ".xml");

      tempPom.deleteOnExit();

      PomGenerator generator = new PomGenerator(artifactProperties);

      generator.writeModel(tempPom);

      artifactProperties.setProperty("pomFile", tempPom.getAbsolutePath());
    } catch (IOException exception) {
      getLog().info("Cannot create a pom file for " + artifactId);
    }
View Full Code Here

TOP

Related Classes of org.objectstyle.woproject.maven2.JApplicationMojo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.