Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#299] update test JT-194 to test effective success of scanDep... #352

Merged
merged 1 commit into from
Aug 31, 2023
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
63 changes: 63 additions & 0 deletions maven-plugin/tests/jt-194/main/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>jaxb-maven-plugin-tests-194-main</artifactId>
<parent>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin-tests-194</artifactId>
<version>2.0.6-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<name>JAXB Tools :: Maven Plugin :: Test [JAXB-TOOLS 194:main]</name>
<dependencies>
<dependency>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin-tests-194-xjb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin-tests-194-xsd</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin-testing</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin</artifactId>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemas>
<schema>
<url>maven:org.jvnet.jaxb:jaxb-maven-plugin-tests-194-xsd!/purchaseorder.xsd</url>
</schema>
</schemas>
<scanDependenciesForBindings>true</scanDependenciesForBindings>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.jvnet.jaxb.test;

import org.junit.Assert;
import org.junit.Test;

public class JT194Test {

@Test
public void testBindingOK() throws Exception {
// With bindings we don't have PurchaseOrderType but PurchaseOrder and PurchaseOrderImpl
Assert.assertEquals(true, generated.PurchaseOrder.class.isInterface());
Assert.assertEquals(false, generated.impl.PurchaseOrderImpl.class.isInterface());
}
}
46 changes: 7 additions & 39 deletions maven-plugin/tests/jt-194/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,14 @@
<artifactId>jaxb-maven-plugin-tests</artifactId>
<version>2.0.6-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<packaging>pom</packaging>
<name>JAXB Tools :: Maven Plugin :: Test [JAXB-TOOLS 194]</name>
<description>
This project tests pom artifacts filtering that may cause scanDependenciesForBindings fails on dependency of type pom.
This project tests pom artifacts filtering that may cause scanDependenciesForBindings fails on dependency of type pom.
</description>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin-testing</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin</artifactId>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<scanDependenciesForBindings>true</scanDependenciesForBindings>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<modules>
<module>xjb</module>
<module>xsd</module>
<module>main</module>
</modules>
</project>
12 changes: 12 additions & 0 deletions maven-plugin/tests/jt-194/xjb/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>jaxb-maven-plugin-tests-194-xjb</artifactId>
<parent>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin-tests-194</artifactId>
<version>2.0.6-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<name>JAXB Tools :: Maven Plugin :: Test [JAXB-TOOLS 194:xjb]</name>
</project>
11 changes: 11 additions & 0 deletions maven-plugin/tests/jt-194/xsd/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>jaxb-maven-plugin-tests-194-xsd</artifactId>
<parent>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin-tests-194</artifactId>
<version>2.0.6-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<name>JAXB Tools :: Maven Plugin :: Test [JAXB-TOOLS 194:xsd]</name>
</project>
5 changes: 4 additions & 1 deletion maven-plugin/tests/jt-40/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
<version>2.0.6-SNAPSHOT</version>
</parent>
<packaging>pom</packaging>
<name>JAXB Tools :: Maven Plugin :: Test [jt-40]</name>
<name>JAXB Tools :: Maven Plugin :: Test [JAXB-TOOLS 40]</name>
<description>
This project tests the generate-test goal and check it is only included as test sources with default options.
</description>
<modules>
<module>generate</module>
<module>test</module>
Expand Down