Skip to content

Commit

Permalink
[#323] add ITs
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarwell committed Jul 26, 2022
1 parent b28559e commit 2a24599
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/it/projects/mexec-323-force-java/invoker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
invoker.goals = compile
invoker.debug = true
invoker.os.family = !windows
44 changes: 44 additions & 0 deletions src/it/projects/mexec-323-force-java/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?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>

<parent>
<groupId>org.codehaus.mojo.exec.it</groupId>
<artifactId>parent</artifactId>
<version>0.1</version>
</parent>

<artifactId>mexec-323</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>@pom.version@</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>echo</executable>
<forceJava>true</forceJava>
<arguments>
<argument>--</argument>
<argument>-p</argument>
<argument>dist/emails</argument>
</arguments>
<workingDirectory>src/build</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
22 changes: 22 additions & 0 deletions src/it/projects/mexec-323-force-java/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
def log = new File( basedir, "build.log" )
assert log.exists()
// missing dist/emails here
assert log.text.contains( "Executing command line: [echo, --, -p]" )
6 changes: 5 additions & 1 deletion src/it/projects/mexec-323/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
def createdDir = new File(basedir, "dist/emails")
def createdDir = new File(basedir, "src/build/dist/emails")
assert createdDir.exists()
assert createdDir.isDirectory()

File log = new File(basedir, 'build.log')
assert log.exists()
assert log.getText().contains( "Executing command line: [mkdir, -p, dist/emails]" )

0 comments on commit 2a24599

Please sign in to comment.