All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.maxifier.mxcache.mavenplugin.AbstractInstrumentatorMojo Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2008-2014 Maxifier Ltd. All Rights Reserved.
 */
package com.maxifier.mxcache.mavenplugin;

import com.maxifier.mxcache.instrumentation.ClassfileInstrumentator;
import org.apache.maven.plugin.MojoExecutionException;

import java.io.File;

/**
 * @author Alexander Kochurov ([email protected])
 */
public abstract class AbstractInstrumentatorMojo extends AbstractInstrumentator {
    protected void instrumentClasses(File path) throws MojoExecutionException {
        try {
            String resultLog = ClassfileInstrumentator.instrumentClasses(path);
            getLog().info(resultLog);
        } catch (Exception e) {
            MojoExecutionException exception = new MojoExecutionException(e.getMessage(), e.getCause());
            getLog().error(exception);
            throw exception;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy