diff --git a/plugins/alfresco-maven-plugin/pom.xml b/plugins/alfresco-maven-plugin/pom.xml index 3d3c92c0..f165a5bf 100644 --- a/plugins/alfresco-maven-plugin/pom.xml +++ b/plugins/alfresco-maven-plugin/pom.xml @@ -81,6 +81,11 @@ alfresco-mmt 5.0.a + + org.alfrescolabs.alfresco-technical-validation + org.alfrescolabs.alfresco-technical-validation + 0.4.0 + @@ -92,4 +97,12 @@ + + + + + clojars.org + http://clojars.org/repo + + diff --git a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/ValidateMojo.java b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/ValidateMojo.java new file mode 100644 index 00000000..50c12fa0 --- /dev/null +++ b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/ValidateMojo.java @@ -0,0 +1,55 @@ +package org.alfresco.maven.plugin; + +import java.io.File; + +import org.alfrescolabs.technical.validation.AlfrescoTechnicalValidation; +import org.alfrescolabs.technical.validation.impl.AlfrescoTechnicalValidationImpl; +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.project.MavenProject; + +/** + * This goal provides the EXPERIMENTAL feature of validating your AMP module (source and binaries) + * against Alfresco (Repository and Share) development best practices, providing validation and + * alerts that can be used to improve quality, longevity and supportability of your code. + * + * It uses the ATV (Alfresco Technical Validation https://github.com/AlfrescoLabs/technical-validation) + * + * @version $Id:$ + * @goal validate + * @phase verify + * @requiresProject + * @since 2.0.0-beta-2 + * @threadSafe + * @description Invokes the Alfresco Technical Validation (https://github.com/AlfrescoLabs/technical-validation) of your customization + */ +public class ValidateMojo extends AbstractMojo { + + /** + * This parameter skips validation (the feature is experimental so disabled by default) + * + * @parameter property="maven.alfresco.skipValidation" default-value="true" + * @required + */ + protected boolean skip; + + /** + * [Read Only] The Maven project. + * + * @parameter default-value="${project}" + * @required + * @readonly + */ + protected MavenProject project; + + + @Override + public void execute() throws MojoExecutionException, MojoFailureException { + if(!skip) + { + AlfrescoTechnicalValidation atv = new AlfrescoTechnicalValidationImpl(); + atv.validate(project.getBuild().getSourceDirectory(), project.getBuild().getDirectory() + File.separator + project.getBuild().getFinalName() + ".amp", "http://localhost:7474/db/data"); + } + } +} diff --git a/poms/alfresco-sdk-parent/pom.xml b/poms/alfresco-sdk-parent/pom.xml index 63f09a3b..79bd4e78 100644 --- a/poms/alfresco-sdk-parent/pom.xml +++ b/poms/alfresco-sdk-parent/pom.xml @@ -760,5 +760,53 @@ + + + atv + + false + + + + + org.alfresco.maven.plugin + alfresco-maven-plugin + + + run-atv + verify + + validate + + + + + + de.herschke + neo4j-maven-plugin + 2.0.2-20140827 + + + start-neo4j-server + post-integration-test + + start-server + + + + stop-neo4j-server + verify + + stop-server + + + + + 7474 + + + + +