Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.agilejava.docbkx.maven;
 
 import java.io.File;
 
The base class of a Mojo generating JavaHelp documentation.

Author(s):
Cedric Pronzato
public abstract class AbstractJavahelpMojo extends AbstractTransformerMojo {

    
This implementation will set the root.filename property, based on the targetFile's name.
    public void adjustTransformer(Transformer transformer,
            String sourceFilenameFile targetFile) {
        super.adjustTransformer(transformersourceFilenametargetFile);
        String rootFilename = targetFile.getName();
        rootFilename = rootFilename.substring(0, rootFilename.lastIndexOf('.'));
        transformer.setParameter("root.filename"rootFilename);
        transformer.setParameter("base.dir"targetFile.getParent()
                + .);
    }
New to GrepCode? Check out our FAQ X