Skip to content

Commit

Permalink
Moved MuleAppArchetype it the integration test folder. Optimized buil…
Browse files Browse the repository at this point in the history
…d time just a bit.
  • Loading branch information
3miliano committed Feb 4, 2012
1 parent a27af2e commit c25915d
Show file tree
Hide file tree
Showing 16 changed files with 72 additions and 48 deletions.
Expand Up @@ -91,7 +91,7 @@
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
Expand Down
Expand Up @@ -91,7 +91,7 @@
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
Expand Down
1 change: 0 additions & 1 deletion archetypes/mule-app/pom.xml
Expand Up @@ -5,7 +5,6 @@
<artifactId>mule-devkit-archetypes</artifactId>
<groupId>org.mule.tools.devkit</groupId>
<version>3.3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>mule-devkit-archetype-mule-app</artifactId>
<name>Mule DevKit Archetype for Mule Application</name>
Expand Down

This file was deleted.

This file was deleted.

Expand Up @@ -91,7 +91,7 @@
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
Expand Down
4 changes: 3 additions & 1 deletion core/annotations/pom.xml
Expand Up @@ -55,11 +55,12 @@
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down Expand Up @@ -90,6 +91,7 @@
<additionalJOption>-J-Xmx1024m</additionalJOption>
</configuration>
</plugin>
-->
</plugins>
</build>
</project>
23 changes: 10 additions & 13 deletions integration-tests/pom.xml
Expand Up @@ -55,6 +55,8 @@
<include>target/integration-tests/**/pom.xml</include>
<include>target/test-classes/**/cloud-connector-archetype.properties</include>
<include>target/test-classes/**/transformer-archetype.properties</include>
<include>target/test-classes/**/generic-archetype.properties</include>
<include>target/test-classes/**/mule-app-archetype.properties</include>
<include>target/classes/**/*OAuth*</include>
</includes>
<replacements>
Expand Down Expand Up @@ -91,7 +93,7 @@
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.7.2</version>
<configuration>
<forkMode>none</forkMode>
<forkMode>never</forkMode>
<systemPropertyVariables>
<archetypeVersion>${project.version}</archetypeVersion>
</systemPropertyVariables>
Expand Down Expand Up @@ -132,6 +134,12 @@
</build>

<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -147,19 +155,8 @@
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-verifier</artifactId>
<version>1.2</version>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mule.dsl</groupId>
<artifactId>dsl-api</artifactId>
<version>0.7</version>
<exclusions>
<exclusion>
<groupId>org.mule</groupId>
<artifactId>core</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
Expand Up @@ -17,15 +17,17 @@

package org.mule.devkit.it;

import org.apache.commons.io.IOUtils;
import org.apache.maven.it.VerificationException;
import org.apache.maven.it.Verifier;
import org.junit.Before;
import org.junit.Test;
import org.mule.util.IOUtils;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

public abstract class AbstractMavenIT {
Expand Down Expand Up @@ -55,12 +57,15 @@ public void setUp() throws VerificationException, IOException {
@SuppressWarnings("unchecked")
public void buildExecutable() throws Exception {
try {
Verifier verifier = new Verifier(getRoot().getAbsolutePath(), null, DEBUG);
verifier.setAutoclean(false);
Verifier verifier = new Verifier(getRoot().getAbsolutePath(), null, DEBUG, true);
verifier.setAutoclean(true);

setSystemProperties(verifier);
verifier.executeGoal("clean");
verifier.executeGoal("package");

Map<String, String> envVars = new HashMap<String, String>();
envVars.put("MAVEN_OPTS", "-Xmx512m -XX:MaxPermSize=256m");

verifier.executeGoal("package", envVars);

verifier.verifyErrorFreeLog();
} catch (IOException ioe) {
Expand Down
Expand Up @@ -42,7 +42,7 @@ public void setUp() throws VerificationException, IOException {
archetypeProperties.load(stream);

verifierProperties = new Properties();
verifierProperties.setProperty("use.mavenRepoLocal", "false");
verifierProperties.setProperty("use.mavenRepoLocal", "true");

Verifier verifier = new Verifier(ROOT.getAbsolutePath());

Expand Down Expand Up @@ -71,8 +71,8 @@ public void testGenerateArchetype() throws VerificationException {
verifier.setSystemProperties(archetypeProperties);
verifier.setVerifierProperties(verifierProperties);
verifier.setAutoclean(false);
verifier.setMavenDebug(true);
verifier.setDebug(true);
verifier.setMavenDebug(false);
verifier.setDebug(false);

verifier.executeGoal("archetype:generate");

Expand Down
Expand Up @@ -42,7 +42,7 @@ public void setUp() throws VerificationException, IOException {
archetypeProperties.load(stream);

verifierProperties = new Properties();
verifierProperties.setProperty("use.mavenRepoLocal", "false");
verifierProperties.setProperty("use.mavenRepoLocal", "true");

Verifier verifier = new Verifier(ROOT.getAbsolutePath());

Expand Down
Expand Up @@ -30,7 +30,7 @@
public class MuleAppArchetypeIT {

private static final File ROOT = new File("target/integration-tests/");
private static final String ARCHETYPE_PROPERTIES = "/archetype.properties";
private static final String ARCHETYPE_PROPERTIES = "/mule-app-archetype.properties";

private Properties archetypeProperties;
private Properties verifierProperties;
Expand All @@ -42,7 +42,7 @@ public void setUp() throws VerificationException, IOException {
archetypeProperties.load(stream);

verifierProperties = new Properties();
verifierProperties.setProperty("use.mavenRepoLocal", "false");
verifierProperties.setProperty("use.mavenRepoLocal", "true");

Verifier verifier = new Verifier(ROOT.getAbsolutePath());

Expand Down Expand Up @@ -71,6 +71,8 @@ public void testGenerateArchetype() throws VerificationException {
verifier.setSystemProperties(archetypeProperties);
verifier.setVerifierProperties(verifierProperties);
verifier.setAutoclean(false);
verifier.setMavenDebug(false);
verifier.setDebug(false);

verifier.executeGoal("archetype:generate");

Expand All @@ -79,9 +81,8 @@ public void testGenerateArchetype() throws VerificationException {
verifier = new Verifier(ROOT.getAbsolutePath() + "/" + getArtifactId());
verifier.setAutoclean(true);
verifier.executeGoal("package");
verifier.executeGoal("eclipse:eclipse");

verifier.verifyErrorFreeLog();

// verifier.verifyTextInLog("generate-sources");
}
}
}
Expand Up @@ -42,7 +42,7 @@ public void setUp() throws VerificationException, IOException {
archetypeProperties.load(stream);

verifierProperties = new Properties();
verifierProperties.setProperty("use.mavenRepoLocal", "false");
verifierProperties.setProperty("use.mavenRepoLocal", "true");

Verifier verifier = new Verifier(ROOT.getAbsolutePath());

Expand Down
3 changes: 2 additions & 1 deletion integration-tests/src/test/resources/maven.properties
@@ -1,4 +1,5 @@
http.port=9099
fullDomain=localhost
devkit.javadoc.check.skip=true
devkit.studio.package.skip=true
devkit.studio.package.skip=true
use.mavenRepoLocal=true
32 changes: 32 additions & 0 deletions integration-tests/src/test/resources/mule-app-archetype.properties
@@ -0,0 +1,32 @@
#
# Mule Development Kit
# Copyright 2010-2011 (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#Fri Jan 13 11:09:15 GMT-03:00 2012
archetypeGroupId=org.mule.tools.devkit
archetypeArtifactId=mule-devkit-archetype-mule-app
archetypeVersion=3.3-SNAPSHOT
artifactId=test-case
description=
muleVersion=3.2.1
package=com.myCompany
forgeProject=n
transports=file,http,jdbc,jms,vm
modules=client,cxf,management,scripting,sxc,xml,context
version=1.0-SNAPSHOT
groupId=com.mulesoft.support
addAppToClasspath=false
studioNature=true
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -121,7 +121,7 @@
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
Expand Down

0 comments on commit c25915d

Please sign in to comment.