Skip to content

Commit

Permalink
FORGE-681
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Sep 25, 2012
1 parent bb80d4e commit 7e67483
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.jboss.forge.project.facets.BaseFacet;
import org.jboss.forge.project.facets.DependencyFacet;
import org.jboss.forge.project.facets.PackagingFacet;
import org.jboss.forge.project.facets.ResourceFacet;
import org.jboss.forge.project.packaging.PackagingType;
import org.jboss.forge.shell.Shell;
import org.jboss.forge.shell.plugins.Alias;
Expand All @@ -29,7 +30,7 @@
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
*/
@Alias("forge.api")
@RequiresFacet({ DependencyFacet.class, PackagingFacet.class, CDIFacet.class })
@RequiresFacet({ DependencyFacet.class, PackagingFacet.class, CDIFacet.class, ResourceFacet.class })
@RequiresPackagingType(PackagingType.JAR)
public class ForgeAPIFacet extends BaseFacet
{
Expand Down Expand Up @@ -58,6 +59,9 @@ public boolean install()
installer.install(project, apiDep);
installer.install(project, testDep);
installer.install(project, testShellDep);

project.getFacet(ResourceFacet.class).createResource("<forge/>".toCharArray(), "META-INF/forge.xml");

return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,6 @@ else if (type.equals(PackagingType.WAR))
packaging.setFinalName(name);
}

if (project.hasFacet(ResourceFacet.class))
{
project.getFacet(ResourceFacet.class).createResource("<forge/>".toCharArray(), "META-INF/forge.xml");
}
/*
* Only change the environment after success!
*/
Expand Down

0 comments on commit 7e67483

Please sign in to comment.