From 9b712d83e2ed3f8544e2acf867302974ac860884 Mon Sep 17 00:00:00 2001 From: mindthegab Date: Fri, 29 Aug 2014 10:30:04 -0400 Subject: [PATCH] 2nd pass on issue #188 --- .../alfresco/maven/plugin/ValidateMojo.java | 29 ++++++++++++++-- poms/alfresco-sdk-parent/pom.xml | 33 ++++++++++++++++--- 2 files changed, 56 insertions(+), 6 deletions(-) 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 index 50c12fa0..c8aa268a 100644 --- 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 @@ -29,10 +29,35 @@ 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" + * @parameter property="maven.alfresco.validation.skip" default-value="true" * @required */ protected boolean skip; + // + + /** + * The directory where the source project is stored. Should not include /target otherwise checks will be duplicated. + * + * @parameter property="maven.alfresco.validation.sourceLocation" default-value="${project.build.directory}/${project.build.finalName}-src" + * @required + */ + protected String sourceLocation; + + /** + * The directory where the binary AMP package is to be found + * + * @parameter property="maven.alfresco.validation.binaryLocation" default-value="${project.build.directory}/${project.build.finalName}.amp" + * @required + */ + protected String binaryLocation; + + /** + * The directory where the binary AMP package is to be found + * + * @parameter property="maven.alfresco.validation.neo4jUrl" default-value="http://localhost:7474/db/data/" + * @required + */ + protected String neo4jUrl; /** * [Read Only] The Maven project. @@ -49,7 +74,7 @@ public class ValidateMojo extends AbstractMojo { 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"); + atv.validate(sourceLocation, binaryLocation, neo4jUrl); } } } diff --git a/poms/alfresco-sdk-parent/pom.xml b/poms/alfresco-sdk-parent/pom.xml index 79bd4e78..623ab816 100644 --- a/poms/alfresco-sdk-parent/pom.xml +++ b/poms/alfresco-sdk-parent/pom.xml @@ -56,7 +56,7 @@ alf_dev alfresco alfresco - MODE=PostgreSQL;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=TRUE + MODE=PostgreSQL;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=FALSE;LOCK_MODE=0 jdbc:h2:./${alfresco.data.location}/h2_data/${alfresco.db.name};${alfresco.db.params} org.h2.jdbcx.JdbcDataSource @@ -655,7 +655,7 @@ run - integration-test + pre-integration-test false true @@ -760,14 +760,39 @@ - + atv - false + false + ${project.build.directory}/${project.build.finalName}-src + + maven-resources-plugin + + + isolate-project-src + generate-resources + + copy-resources + + + ${maven.alfresco.validation.sourceLocation} + + + ${project.basedir} + + target + + ${app.filtering.enabled} + + + + + + org.alfresco.maven.plugin alfresco-maven-plugin