Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion modello-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
<maven>${mavenVersion}</maven>
</prerequisites>

<properties>
<!-- the features site checked and copied by the reporting profile is produced by the run-its profile,
so only enforce its presence when the integration tests were actually requested -->
<verifyFeaturesSite>false</verifyFeaturesSite>
</properties>

<dependencies>
<dependency>
<groupId>org.codehaus.modello</groupId>
Expand Down Expand Up @@ -172,6 +178,9 @@
<profiles>
<profile>
<id>run-its</id>
<properties>
<verifyFeaturesSite>true</verifyFeaturesSite>
</properties>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -221,13 +230,15 @@
<executions>
<execution>
<id>features</id>
<!-- check that run-its profile has generated features site -->
<!-- check that the run-its profile has generated the features site, but fail only when
run-its is active: a site build that did not ask for the ITs must not fail here -->
<goals>
<goal>verify</goal>
</goals>
<phase>pre-site</phase>
<configuration>
<verificationFile>${basedir}/src/test/verifier/site-verifications.xml</verificationFile>
<failOnError>${verifyFeaturesSite}</failOnError>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/verifications/1.0.0 http://maven.apache.org/xsd/verifications-1.0.0.xsd">
<files>
<file><!-- should be available, require mvn run with -Prun-its -->
<file><!-- produced by the run-its profile; enforced only when run-its is active, see verifyFeaturesSite -->
<location>target/it/features/target/site/index.html</location>
</file>
</files>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,6 @@ public void verifyWriter()
String actualXml = buffer.toString();
actualXml = actualXml.replaceAll( "(\r\n)|(\r)", "\n" );

// System.out.println( expectedXml );
//
// System.err.println( actualXml );

Assertions.assertEquals( expectedXml.trim(), actualXml.trim() );

MavenDom4jReader reader = new MavenDom4jReader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ public void testJacksonGenerator() throws Throwable {

compileGeneratedSources(8);

// TODO: see why without this, version system property is set to "2.4.1" value after verify
System.setProperty("version", getModelloVersion());

verifyCompiledGeneratedSources("org.codehaus.modello.generator.jackson.JacksonVerifier");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ public void testXpp3Generator() throws Throwable {

compileGeneratedSources();

// TODO: see why without this, version system property is set to "2.4.1" value after verify
System.setProperty("version", getModelloVersion());

verifyCompiledGeneratedSources("org.codehaus.modello.generator.xml.sax.SaxVerifier");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ public void testJavaGenerator() throws Throwable {

compileGeneratedSources(8);

// TODO: see why without this, version system property is set to "2.4.1" value after verify
System.setProperty("version", getModelloVersion());

verifyCompiledGeneratedSources("org.codehaus.modello.generator.xml.stax.StaxFeaturesDomVerifier");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ public void testJavaGenerator() throws Throwable {

compileGeneratedSources(8);

// TODO: see why without this, version system property is set to "2.4.1" value after verify
System.setProperty("version", getModelloVersion());

verifyCompiledGeneratedSources("org.codehaus.modello.generator.xml.stax.StaxFeaturesVerifier");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,6 @@ public void verifyWriter()

String actualXml = buffer.toString();

// System.out.println( expectedXml );
//
// System.out.println( actualXml );

Assertions.assertEquals( cleanLineEndings( expectedXml.trim() ), scrubXmlDeclQuotes( actualXml.trim() ) );

MavenStaxReader reader = new MavenStaxReader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ private void checkMavenXdocGenerator() throws Exception {
Map<String, Object> parameters = getModelloParameters("4.0.0");

modello.generate(model, "xdoc", parameters);

// addDependency( "modello", "modello-core", "1.0-SNAPSHOT" );

// verify( "org.codehaus.modello.generator.xml.cdoc.XdocVerifier", "xdoc" );
checkInternalLinks("maven.xml");

String content = FileUtils.fileRead(new File(getOutputDirectory(), "maven.xml"), "UTF-8");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,5 @@ public void testAbstract() throws Throwable {
modello.generate(model, "java", parameters);
modello.generate(model, "xpp3-writer", parameters);
modello.generate(model, "xpp3-reader", parameters);

// addDependency( "org.codehaus.modello", "modello-core", getModelloVersion() );

// compile( generatedSources, classes );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ public void testXpp3Generator() throws Throwable {

compileGeneratedSources(8);

// TODO: see why without this, version system property is set to "2.4.1" value after verify
System.setProperty("version", getModelloVersion());

verifyCompiledGeneratedSources("org.codehaus.modello.generator.xml.xpp3.Xpp3Verifier");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ public void testXsdGenerator() throws Throwable {

modello.generate(model, "xsd", parameters);

// addDependency( "modello", "modello-core", "1.0-SNAPSHOT" );

// TODO write verifier that compiles generated schema: use jaxp

// verify( "org.codehaus.modello.generator.xml.xsd.XsdVerifier", "xsd" );

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ public void testXsdGenerator() throws Throwable {

modello.generate(model, "xsd", parameters);

// addDependency( "modello", "modello-core", "1.0-SNAPSHOT" );

// TODO write verfier which compile generated schema : use jaxp

// verify( "org.codehaus.modello.generator.xml.xsd.XsdVerifier", "xsd" );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
Expand All @@ -45,7 +44,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
import java.util.jar.Attributes;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
Expand Down Expand Up @@ -97,21 +95,6 @@ protected File getOutputClasses() {
return new File(super.getOutputDirectory(), "classes");
}

protected String getModelloVersion() throws IOException {
Properties properties = new Properties(System.getProperties());

if (properties.getProperty("version") == null) {
InputStream is = this.getClass()
.getResourceAsStream("/META-INF/maven/org.codehaus.modello/modello-test/pom.properties");

if (is != null) {
properties.load(is);
}
}

return properties.getProperty("version");
}

protected void compileGeneratedSources() throws IOException {
compileGeneratedSources(getName(), 8);
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
<plugin>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
<version>2.4.0</version>
<version>2.8.0</version>
<configuration>
<models>
<model>src/main/mdo/modello.mdo</model>
Expand Down
Loading