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

com.isomorphic.maven.mojo.reify.ValidateTask Maven / Gradle / Ivy

Go to download

An officially supported collection of goals useful for using SmartClient / SmartGWT products in a Maven environment.

There is a newer version: 1.4.5
Show newest version
package com.isomorphic.maven.mojo.reify;

import java.io.File;

import org.apache.tools.ant.BuildException;

import com.isomorphic.maven.util.AntProjectLogger;

/**
 * An Ant task allowing the Reify {@link ValidateMojo} to be run from Ant builds.  Note that
 * default values have been changed to accomodate a typical Ant project structure, otherwise
 * functionality is unchanged.
 * 
 * @see ValidateMojo
 */
public class ValidateTask extends ImportTask {

	@Override
	public void execute() throws BuildException {
		ValidateMojo mojo = new ValidateMojo();

		mojo.setLog(new AntProjectLogger(getProject()));
		
		mojo.setWebappDir(webappDir != null ? new File(webappDir) : new File(getProject().getBaseDir(), webappDir));
		mojo.setSmartclientRuntimeDir(smartclientRuntimeDir != null ? new File(smartclientRuntimeDir) : new File(getProject().getBaseDir(), "war/isomorphic"));
		mojo.setDataSourcesDir(dataSourcesDir);
		mojo.setMockDataSourcesDir(mockDataSourcesDir);
		mojo.setValidationFailureThreshold(validationFailureThreshold);
		
		try {
			mojo.execute();
		} catch (Exception e) {
			throw new BuildException(e);
		}
		
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy