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
71 changes: 0 additions & 71 deletions modello-maven-plugin/src/it/dom4j-no-plexus-utils/pom.xml

This file was deleted.

13 changes: 0 additions & 13 deletions modello-maven-plugin/src/it/dom4j-no-plexus-utils/verify.groovy

This file was deleted.

70 changes: 0 additions & 70 deletions modello-maven-plugin/src/it/jdom-no-plexus-utils/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,29 @@
<modelVersion>4.0.0</modelVersion>

<groupId>org.codehaus.modello.its</groupId>
<artifactId>stax-no-plexus-utils</artifactId>
<artifactId>no-plexus-utils</artifactId>
<version>0.1-SNAPSHOT</version>

<name>StAX IT</name>
<name>No plexus-utils IT</name>
<description>
Test that the StAX based readers/writers do not have a dependency on plexus-utils' Xpp3Dom if the model
does not use DOM fields.
Test that the DOM4J, JDOM and StAX based readers/writers do not have a dependency on plexus-utils' Xpp3Dom if
the model does not use DOM fields.
</description>

<dependencies>
<!-- NOTE: This must compile without plexus-utils -->
<dependency>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.1.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<version>@jdom.version@</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId>
Expand Down Expand Up @@ -66,6 +78,9 @@
<id>standard</id>
<goals>
<goal>java</goal>
<goal>dom4j-reader</goal>
<goal>dom4j-writer</goal>
<goal>jdom-writer</goal>
<goal>stax-reader</goal>
<goal>stax-writer</goal>
</goals>
Expand Down
26 changes: 26 additions & 0 deletions modello-maven-plugin/src/it/no-plexus-utils/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import java.io.*;

// every generator must have produced its classes, and all of them compile without plexus-utils;
// the classes of one XML library must not refer to the others, as when a project uses only that library
def others = [
"dom4j" : [ "org/jdom/", "org/codehaus/stax2/", "javax/xml/stream/" ],
"jdom" : [ "org/dom4j/", "org/codehaus/stax2/", "javax/xml/stream/" ],
"stax" : [ "org/dom4j/", "org/jdom/" ] ]
for ( String name : [
"test/io/dom4j/ThingDom4jReader.class",
"test/io/dom4j/ThingDom4jWriter.class",
"test/io/jdom/ThingJDOMWriter.class",
"test/io/stax/ThingStaxReader.class",
"test/io/stax/ThingStaxWriter.class" ] )
{
File clazz = new File( basedir, "target/classes/" + name );
if ( !clazz.isFile() )
{
throw new FileNotFoundException( "Missing " + clazz );
}
String constants = new String( clazz.bytes, "ISO-8859-1" );
for ( String other : others[name.split( "/" )[2]] )
{
assert !constants.contains( other ) : name + " refers to " + other;
}
}
Loading
Loading