Commit 9b712d83 authored by mindthegab's avatar mindthegab
Browse files

2nd pass on issue #188

parent 4a6c98d2
Loading
Loading
Loading
Loading
+27 −2
Original line number Diff line number Diff line
@@ -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);
    	}
    }
}
+29 −4
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@
    <alfresco.db.name>alf_dev</alfresco.db.name>
    <alfresco.db.username>alfresco</alfresco.db.username>
    <alfresco.db.password>alfresco</alfresco.db.password>
    <alfresco.db.params>MODE=PostgreSQL;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=TRUE</alfresco.db.params>
    <alfresco.db.params>MODE=PostgreSQL;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=FALSE;LOCK_MODE=0</alfresco.db.params>
    <!-- By default the H2 embedded database datafile is created under the alfresco.data.location folder -->
    <alfresco.db.url>jdbc:h2:./${alfresco.data.location}/h2_data/${alfresco.db.name};${alfresco.db.params}</alfresco.db.url>
    <alfresco.db.datasource.class>org.h2.jdbcx.JdbcDataSource</alfresco.db.datasource.class>
@@ -655,7 +655,7 @@
                    <goals>
                        <goal>run</goal>
                    </goals>
                    <phase>integration-test</phase>
                    <phase>pre-integration-test</phase>
                    <configuration>
                          <useTestClasspath>false</useTestClasspath>
                          <ignorePackaging>true</ignorePackaging>
@@ -764,10 +764,35 @@
    <profile>
        <id>atv</id>
        <properties>
            <maven.alfresco.skipValidation>false</maven.alfresco.skipValidation>
            <maven.alfresco.validation.skip>false</maven.alfresco.validation.skip>
            <maven.alfresco.validation.sourceLocation>${project.build.directory}/${project.build.finalName}-src</maven.alfresco.validation.sourceLocation>
        </properties>
        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>isolate-project-src</id>
                            <phase>generate-resources</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                              <outputDirectory>${maven.alfresco.validation.sourceLocation}</outputDirectory>
                              <resources>
                                  <resource>
                                      <directory>${project.basedir}</directory>
                                      <excludes>
                                          <exclude>target</exclude>
                                      </excludes>
                                      <filtering>${app.filtering.enabled}</filtering>
                                  </resource>
                              </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.alfresco.maven.plugin</groupId>
                    <artifactId>alfresco-maven-plugin</artifactId>