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 Eclipse documentation.

Author(s):
Wilfred Springer
public abstract class AbstractEclipseMojo extends AbstractTransformerMojo {

    
This implementation will set the root.filename property, based on the targetFile's name. It will also set the manifest.in.base.dir to a value different than '0', in order to make sure that the Eclipse files are not getting generated to Maven's basedir, but to the target directory instead.
    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()
                + .);
        transformer.setParameter("manifest.in.base.dir""1");
    }
New to GrepCode? Check out our FAQ X