-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
1,246 additions
and
881 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions
6
src/it/example/verify.groovy → src/it/d2xml-example/verify.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<fsm-maven-plugin> | ||
<modules> | ||
<module> | ||
<!-- use dependencies from this Maven project (../pom.xml) --> | ||
<id>${project.groupId}:${project.artifactId}:${project.version}</id> | ||
|
||
<!-- This matches the tag in prototype.module.xml --> | ||
<dependencyTagValueInXml>xmlresolver</dependencyTagValueInXml> | ||
</module> | ||
</modules> | ||
</fsm-maven-plugin> |
16 changes: 16 additions & 0 deletions
16
src/it/prepare-dependency-with-classifier/fsm/prototype.module.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<module> | ||
|
||
<name>Monday XML Resovler</name> | ||
<version>${project.version}</version> | ||
|
||
<components> | ||
<web-app> | ||
<name>XML Resolver</name> | ||
<version>${project.version}</version> | ||
<web-resources> | ||
<!-- Tag from plugin.xml --> | ||
<dependencies>xmlresolver</dependencies> | ||
</web-resources> | ||
</web-app> | ||
</components> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.monday-consulting.maven.plugins</groupId> | ||
<artifactId>dependency-with-classifier</artifactId> | ||
<version>11</version> | ||
<packaging>pom</packaging> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<xmlresolver.version>5.2.0</xmlresolver.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.xmlresolver</groupId> | ||
<artifactId>xmlresolver</artifactId> | ||
<version>${xmlresolver.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.xmlresolver</groupId> | ||
<artifactId>xmlresolver</artifactId> | ||
<classifier>data</classifier> | ||
<version>${xmlresolver.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<resources> | ||
<resource> | ||
<directory>fsm</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>3.1.0</version> | ||
<executions> | ||
<execution> | ||
<id>copy-resources</id> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${basedir}/target/extra-resources</outputDirectory> | ||
<resources> | ||
<resource> | ||
<directory>fsm</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>com.monday-consulting.maven.plugins</groupId> | ||
<artifactId>fsm-maven-plugin</artifactId> | ||
<version>@project.version@</version> | ||
<configuration> | ||
<configXml>${basedir}/target/extra-resources/plugin.xml</configXml> | ||
<prototypeXml>${basedir}/target/extra-resources/prototype.module.xml</prototypeXml> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>prepare-module</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>prepare</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import groovy.xml.XmlSlurper | ||
|
||
def fsmDir = new File(basedir, 'target/fsm-root') | ||
assert fsmDir.exists() : "The FSM root directory was not created" | ||
|
||
def moduleXmlFile = new File(fsmDir, 'META-INF/module.xml') | ||
assert moduleXmlFile.exists() : "The module.xml descriptor was not created" | ||
def moduleIsolatedXmlFile = new File(fsmDir, 'META-INF/module-isolated.xml') | ||
assert moduleIsolatedXmlFile.exists() : "The module-isolated.xml descriptor was not created" | ||
|
||
def doc = new XmlSlurper().parse(moduleXmlFile) | ||
assert doc.version == 11 : "The module.xml version was not filtered" | ||
|
||
// verify commons-math3 is under <components> -> <web-app> -> <web-resources> and has the correct version | ||
def resource = doc.components.'web-app'.'web-resources'.childNodes().find { it.attributes().name = "org.xmlresolver:xmlresolver" } | ||
assert resource != null : "org.xmlresolver:xmlresolver (no classifier) resource must exist in module.xml" | ||
def resourceWithClassifier = doc.components.'web-app'.'web-resources'.childNodes().find { it.attributes().name = "org.xmlresolver:xmlresolver:data" } | ||
assert resourceWithClassifier != null : "org.xmlresolver:xmlresolver:data (with classifier) resource must exist in module.xml" | ||
|
||
// verify dependency has been copied to <fsm-root>/lib/ | ||
def libDir = new File(fsmDir, 'lib'); | ||
assert libDir.exists() : "The lib directory was not created" | ||
assert (new File(libDir, 'xmlresolver-5.2.0.jar').exists()) : "The resource lib 'xmlresolver-5.2.0.jar' was not copied to the lib/ directory" | ||
assert (new File(libDir, 'xmlresolver-5.2.0-data.jar').exists()) : "The resource lib 'xmlresolver-5.2.0.jar-data' was not copied to the lib/ directory" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd"> | ||
<id>fsm</id> | ||
<formats> | ||
<format>zip</format> | ||
</formats> | ||
<includeBaseDirectory>false</includeBaseDirectory> | ||
|
||
<fileSets> | ||
<fileSet> | ||
<directory>${basedir}/target/fsm-root</directory> | ||
<outputDirectory>/</outputDirectory> | ||
</fileSet> | ||
</fileSets> | ||
|
||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<fsm-maven-plugin> | ||
<modules> | ||
<module> | ||
<id>org.apache.commons:commons-math3:jar:${commons.math.version}</id> | ||
<!-- This matches the tag in prototype.module.xml --> | ||
<dependencyTagValueInXml>math</dependencyTagValueInXml> | ||
</module> | ||
</modules> | ||
</fsm-maven-plugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<module> | ||
|
||
<name>Monday Math</name> | ||
<version>${project.version}</version> | ||
|
||
<components> | ||
<web-app> | ||
<name>Math</name> | ||
<version>${project.version}</version> | ||
<web-resources> | ||
<!-- Tag from plugin.xml --> | ||
<dependencies>math</dependencies> | ||
</web-resources> | ||
</web-app> | ||
</components> | ||
</module> |
Oops, something went wrong.