first take at intgration of the ATV. Getting 'Divide by Zero' exception so stopping for now

This commit is contained in:
mindthegab
2014-08-27 01:09:40 -04:00
parent a4f932de0c
commit 495820dbc1
3 changed files with 116 additions and 0 deletions

View File

@@ -81,6 +81,11 @@
<artifactId>alfresco-mmt</artifactId> <artifactId>alfresco-mmt</artifactId>
<version>5.0.a</version> <version>5.0.a</version>
</dependency> </dependency>
<dependency>
<groupId>org.alfrescolabs.alfresco-technical-validation</groupId>
<artifactId>org.alfrescolabs.alfresco-technical-validation</artifactId>
<version>0.4.0</version>
</dependency>
</dependencies> </dependencies>
<reporting> <reporting>
@@ -92,4 +97,12 @@
</plugin> </plugin>
</plugins> </plugins>
</reporting> </reporting>
<repositories>
<!-- Used for the ATV donwload -->
<repository>
<id>clojars.org</id>
<url>http://clojars.org/repo</url>
</repository>
</repositories>
</project> </project>

View File

@@ -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");
}
}
}

View File

@@ -760,5 +760,53 @@
</plugins> </plugins>
</build> </build>
</profile> </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> </profiles>
</project> </project>