You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2003/01/09 16:52:15 UTC
cvs commit: jakarta-turbine-maven/src/plugins-build/plexus/src/java/org/apache/maven/plexus/jelly PlexusRoleFinderTag.java PlexusTagLibrary.java
jvanzyl 2003/01/09 07:52:15
Added: src/plugins-build/plexus/src/java/org/apache/maven/plexus/jelly
PlexusRoleFinderTag.java PlexusTagLibrary.java
Log:
o Jelly tags for finding roles in a plexus configuration.
Revision Changes Path
1.1 jakarta-turbine-maven/src/plugins-build/plexus/src/java/org/apache/maven/plexus/jelly/PlexusRoleFinderTag.java
Index: PlexusRoleFinderTag.java
===================================================================
package org.apache.maven.plexus.jelly;
import java.io.File;
import org.apache.commons.jelly.MissingAttributeException;
import org.apache.commons.jelly.TagSupport;
import org.apache.commons.jelly.XMLOutput;
import org.apache.maven.plexus.PlexusRoleFinder;
/**
* @author <a href="mailto:jason@zenplex.com">Jason van Zyl</a>
* @version: $Id: PlexusRoleFinderTag.java,v 1.1 2003/01/09 15:52:15 jvanzyl Exp $
*/
public class PlexusRoleFinderTag
extends TagSupport
{
/** Id of this pipeline. */
private File configuration;
private String var;
public void setConfiguration( File configuration )
{
this.configuration = configuration;
}
public File getConfiguration()
{
return configuration;
}
public void setVar( String var )
{
this.var = var;
}
public String getVar()
{
return var;
}
/** Execute the tag. */
public void doTag(XMLOutput output)
throws Exception
{
// Create a new pipeline and set the id.
PlexusRoleFinder finder = new PlexusRoleFinder();
finder.setConfiguration( getConfiguration() );
finder.parse();
// Place the pipeline in the context.
context.setVariable( getVar(), finder.getRoles() );
}
}
1.1 jakarta-turbine-maven/src/plugins-build/plexus/src/java/org/apache/maven/plexus/jelly/PlexusTagLibrary.java
Index: PlexusTagLibrary.java
===================================================================
package org.apache.maven.plexus.jelly;
import org.apache.commons.jelly.tags.core.CoreTagLibrary;
/**
* MavenSession tag library for use in Jelly scripts.
*
* @author <a href="jason@zenplex.com">Jason van Zyl</a>
* @version $Id: PlexusTagLibrary.java,v 1.1 2003/01/09 15:52:15 jvanzyl Exp $
*/
public class PlexusTagLibrary
extends CoreTagLibrary
{
/**
* Create an instance of the {@link PlexusTagLibrary}, registering related
* tag libraries
*/
public PlexusTagLibrary()
{
registerTag( "find-roles", PlexusRoleFinderTag.class );
}
}