Skip to content

Commit

Permalink
Ported ProjectFacet APIs from Forge 1
Browse files Browse the repository at this point in the history
  • Loading branch information
lincolnthree committed Mar 7, 2013
1 parent 7429b5b commit b059750
Show file tree
Hide file tree
Showing 7 changed files with 558 additions and 0 deletions.
5 changes: 5 additions & 0 deletions projects/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
<artifactId>resources-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.forge</groupId>
<artifactId>dependencies-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.forge</groupId>
<artifactId>ui-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright 2012 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Eclipse Public License version 1.0, available at
* http://www.eclipse.org/legal/epl-v10.html
*/

package org.jboss.forge.projects.building;

/**
* Represents an exception during project building.
*
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
*
*/
public class BuildException extends RuntimeException
{
private static final long serialVersionUID = 7523197340850216859L;

public BuildException()
{
super();
}

public BuildException(final String message, final Throwable cause)
{
super(message, cause);
}

public BuildException(final String message)
{
super(message);
}

public BuildException(final Throwable cause)
{
super(cause);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright 2012 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Eclipse Public License version 1.0, available at
* http://www.eclipse.org/legal/epl-v10.html
*/

package org.jboss.forge.projects.building;

import org.jboss.forge.resource.Resource;

/**
* Used to configure and execute the project build system.
*
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
*/
public interface ProjectBuilder
{
/**
* Manually add an argument to be passed to the underlying build system.
*/
ProjectBuilder addArguments(String... args);

/**
* Enable or disable test execution during build.
*/
ProjectBuilder runTests(boolean test);

/**
* Execute the build, returning the final product as a {@link Resource}.
*/
Resource<?> build() throws BuildException;

}
Loading

0 comments on commit b059750

Please sign in to comment.