Skip to content

Commit c2d3193

Browse files
committed
Add the classpath to the exec-maven-plugin
1 parent 1a52e5f commit c2d3193

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

pom.xml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
~ limitations under the License.
1616
-->
1717

18-
<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">
18+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
19+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1920

2021
<parent>
2122
<groupId>net.openhft</groupId>
2223
<artifactId>java-parent-pom</artifactId>
2324
<version>1.1.23</version>
25+
<relativePath/>
2426
</parent>
2527

2628
<modelVersion>4.0.0</modelVersion>
@@ -83,11 +85,37 @@
8385
<plugin>
8486
<groupId>org.apache.maven.plugins</groupId>
8587
<artifactId>maven-compiler-plugin</artifactId>
88+
<version>3.8.1</version>
8689
<configuration>
8790
<source>1.8</source>
8891
<target>1.8</target>
8992
</configuration>
9093
</plugin>
94+
95+
<plugin>
96+
<groupId>org.codehaus.mojo</groupId>
97+
<artifactId>exec-maven-plugin</artifactId>
98+
<version>1.6.0</version>
99+
<executions>
100+
<execution>
101+
<id>compiler-test</id>
102+
<phase>integration-test</phase>
103+
<goals>
104+
<goal>exec</goal>
105+
</goals>
106+
</execution>
107+
</executions>
108+
<configuration>
109+
<classpathScope>test</classpathScope>
110+
<executable>java</executable>
111+
<arguments>
112+
<argument>-classpath</argument>
113+
<classpath/>
114+
<argument>net.openhft.compiler.CompilerTest</argument>
115+
</arguments>
116+
</configuration>
117+
</plugin>
118+
91119
<!--
92120
generate maven dependencies versions file that can be used later
93121
to install the right bundle in test phase.
@@ -99,6 +127,7 @@
99127
<plugin>
100128
<groupId>org.apache.servicemix.tooling</groupId>
101129
<artifactId>depends-maven-plugin</artifactId>
130+
<version>1.4.0</version>
102131
<executions>
103132
<execution>
104133
<id>generate-depends-file</id>
@@ -111,6 +140,7 @@
111140
<plugin>
112141
<groupId>org.apache.felix</groupId>
113142
<artifactId>maven-bundle-plugin</artifactId>
143+
<version>4.2.1</version>
114144
<extensions>true</extensions>
115145
<configuration>
116146
<instructions>

src/test/java/net/openhft/compiler/CompilerTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,5 +301,9 @@ public void testNewCompiler() throws ClassNotFoundException, IllegalAccessExcept
301301
assertEquals(i, bi.get());
302302
}
303303
}
304+
305+
public static void main(String[] args) throws ClassNotFoundException {
306+
new CompilerTest().test_compiler();
307+
}
304308
}
305309

0 commit comments

Comments
 (0)