Loading plugins/alfresco-maven-plugin/pom.xml +13 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,11 @@ <artifactId>alfresco-mmt</artifactId> <version>5.0.a</version> </dependency> <dependency> <groupId>org.alfrescolabs.alfresco-technical-validation</groupId> <artifactId>org.alfrescolabs.alfresco-technical-validation</artifactId> <version>0.4.0</version> </dependency> </dependencies> <reporting> Loading @@ -92,4 +97,12 @@ </plugin> </plugins> </reporting> <repositories> <!-- Used for the ATV donwload --> <repository> <id>clojars.org</id> <url>http://clojars.org/repo</url> </repository> </repositories> </project> plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/ValidateMojo.java 0 → 100644 +55 −0 Original line number Diff line number Diff line 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"); } } } poms/alfresco-sdk-parent/pom.xml +48 −0 Original line number Diff line number Diff line Loading @@ -760,5 +760,53 @@ </plugins> </build> </profile> <!-- Invokes the Alfresco Technical Validation tool at https://github.com/AlfrescoLabs/technical-validation --> <profile> <id>atv</id> <properties> <maven.alfresco.skipValidation>false</maven.alfresco.skipValidation> </properties> <build> <plugins> <plugin> <groupId>org.alfresco.maven.plugin</groupId> <artifactId>alfresco-maven-plugin</artifactId> <executions> <execution> <id>run-atv</id> <phase>verify</phase> <goals> <goal>validate</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>de.herschke</groupId> <artifactId>neo4j-maven-plugin</artifactId> <version>2.0.2-20140827</version> <executions> <execution> <id>start-neo4j-server</id> <phase>post-integration-test</phase> <goals> <goal>start-server</goal> </goals> </execution> <execution> <id>stop-neo4j-server</id> <phase>verify</phase> <goals> <goal>stop-server</goal> </goals> </execution> </executions> <configuration> <port>7474</port> </configuration> </plugin> </plugins> </build> </profile> </profiles> </project> Loading
plugins/alfresco-maven-plugin/pom.xml +13 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,11 @@ <artifactId>alfresco-mmt</artifactId> <version>5.0.a</version> </dependency> <dependency> <groupId>org.alfrescolabs.alfresco-technical-validation</groupId> <artifactId>org.alfrescolabs.alfresco-technical-validation</artifactId> <version>0.4.0</version> </dependency> </dependencies> <reporting> Loading @@ -92,4 +97,12 @@ </plugin> </plugins> </reporting> <repositories> <!-- Used for the ATV donwload --> <repository> <id>clojars.org</id> <url>http://clojars.org/repo</url> </repository> </repositories> </project>
plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/ValidateMojo.java 0 → 100644 +55 −0 Original line number Diff line number Diff line 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"); } } }
poms/alfresco-sdk-parent/pom.xml +48 −0 Original line number Diff line number Diff line Loading @@ -760,5 +760,53 @@ </plugins> </build> </profile> <!-- Invokes the Alfresco Technical Validation tool at https://github.com/AlfrescoLabs/technical-validation --> <profile> <id>atv</id> <properties> <maven.alfresco.skipValidation>false</maven.alfresco.skipValidation> </properties> <build> <plugins> <plugin> <groupId>org.alfresco.maven.plugin</groupId> <artifactId>alfresco-maven-plugin</artifactId> <executions> <execution> <id>run-atv</id> <phase>verify</phase> <goals> <goal>validate</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>de.herschke</groupId> <artifactId>neo4j-maven-plugin</artifactId> <version>2.0.2-20140827</version> <executions> <execution> <id>start-neo4j-server</id> <phase>post-integration-test</phase> <goals> <goal>start-server</goal> </goals> </execution> <execution> <id>stop-neo4j-server</id> <phase>verify</phase> <goals> <goal>stop-server</goal> </goals> </execution> </executions> <configuration> <port>7474</port> </configuration> </plugin> </plugins> </build> </profile> </profiles> </project>