You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/08/23 22:43:39 UTC
svn commit: r688409 - in /maven/plugins/trunk/maven-invoker-plugin/src/it:
fail-build/ fail-build/src/ fail-build/src/it/ fail-build/src/it/project/
fail-postbuild/ fail-postbuild/src/ fail-postbuild/src/it/
fail-postbuild/src/it/project/ fail-prebuild...
Author: bentmann
Date: Sat Aug 23 13:43:38 2008
New Revision: 688409
URL: http://svn.apache.org/viewvc?rev=688409&view=rev
Log:
o Added integration tests to check handling of failures
Added:
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/invoker.properties (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/pom.xml (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/pom.xml (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/prebuild.bsh (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/verify.bsh (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/invoker.properties (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/pom.xml (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/pom.xml (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/postbuild.bsh (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/prebuild.bsh (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/verify.bsh (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/invoker.properties (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/pom.xml (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/pom.xml (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/prebuild.bsh (with props)
maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/verify.bsh (with props)
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/invoker.properties?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/invoker.properties (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/invoker.properties Sat Aug 23 13:43:38 2008
@@ -0,0 +1,2 @@
+invoker.buildResult = failure
+invoker.goals = clean verify
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/invoker.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/invoker.properties
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/pom.xml?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/pom.xml (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/pom.xml Sat Aug 23 13:43:38 2008
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<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>
+
+ <groupId>org.apache.maven.plugins.invoker</groupId>
+ <artifactId>fail-build</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <description>Test to check that a failure in the forked Maven build fails the parent build, too.</description>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <version>@pom.version@</version>
+ <configuration>
+ <debug>true</debug>
+ <projectsDirectory>src/it</projectsDirectory>
+ <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+ <pomIncludes>
+ <pomInclude>*/pom.xml</pomInclude>
+ </pomIncludes>
+ <goals>
+ <goal>validate</goal>
+ </goals>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/pom.xml?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/pom.xml (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/pom.xml Sat Aug 23 13:43:38 2008
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<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">
+ <!-- invalid model version to make build fail -->
+ <modelVersion>99.0.0</modelVersion>
+ <groupId>test</groupId>
+ <artifactId>fail-build</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+</project>
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/prebuild.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/prebuild.bsh?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/prebuild.bsh (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/prebuild.bsh Sat Aug 23 13:43:38 2008
@@ -0,0 +1,7 @@
+import java.io.*;
+
+// marker for parent build that this sub build was indeed run
+File touchFile = new File( basedir, "touch.txt" );
+touchFile.createNewFile();
+
+return true;
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/prebuild.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/src/it/project/prebuild.bsh
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/verify.bsh?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/verify.bsh (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/verify.bsh Sat Aug 23 13:43:38 2008
@@ -0,0 +1,22 @@
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+
+try
+{
+ // make sure the Invoker Plugin was indeed run and the build didn't fail somewhere else
+ File touchFile = new File( basedir, "target/it/project/touch.txt" );
+ System.out.println( "Checking for existence of touch file: " + touchFile );
+ if ( !touchFile.exists() )
+ {
+ System.out.println( "FAILED!" );
+ return false;
+ }
+}
+catch( Throwable t )
+{
+ t.printStackTrace();
+ return false;
+}
+
+return true;
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/verify.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-build/verify.bsh
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/invoker.properties?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/invoker.properties (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/invoker.properties Sat Aug 23 13:43:38 2008
@@ -0,0 +1,2 @@
+invoker.buildResult = failure
+invoker.goals = clean verify
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/invoker.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/invoker.properties
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/pom.xml?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/pom.xml (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/pom.xml Sat Aug 23 13:43:38 2008
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<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>
+
+ <groupId>org.apache.maven.plugins.invoker</groupId>
+ <artifactId>fail-postbuild</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <description>Test to check that a failure of the post-build hook fails the parent build, too.</description>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <version>@pom.version@</version>
+ <configuration>
+ <debug>true</debug>
+ <projectsDirectory>src/it</projectsDirectory>
+ <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+ <pomIncludes>
+ <pomInclude>*/pom.xml</pomInclude>
+ </pomIncludes>
+ <goals>
+ <goal>validate</goal>
+ </goals>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/pom.xml?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/pom.xml (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/pom.xml Sat Aug 23 13:43:38 2008
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<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>
+ <groupId>test</groupId>
+ <artifactId>fail-prebuild</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+</project>
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/postbuild.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/postbuild.bsh?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/postbuild.bsh (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/postbuild.bsh Sat Aug 23 13:43:38 2008
@@ -0,0 +1 @@
+return false;
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/postbuild.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/postbuild.bsh
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/prebuild.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/prebuild.bsh?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/prebuild.bsh (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/prebuild.bsh Sat Aug 23 13:43:38 2008
@@ -0,0 +1,7 @@
+import java.io.*;
+
+// marker for parent build that this sub build was indeed run
+File touchFile = new File( basedir, "touch.txt" );
+touchFile.createNewFile();
+
+return true;
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/prebuild.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/src/it/project/prebuild.bsh
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/verify.bsh?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/verify.bsh (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/verify.bsh Sat Aug 23 13:43:38 2008
@@ -0,0 +1,22 @@
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+
+try
+{
+ // make sure the Invoker Plugin was indeed run and the build didn't fail somewhere else
+ File touchFile = new File( basedir, "target/it/project/touch.txt" );
+ System.out.println( "Checking for existence of touch file: " + touchFile );
+ if ( !touchFile.exists() )
+ {
+ System.out.println( "FAILED!" );
+ return false;
+ }
+}
+catch( Throwable t )
+{
+ t.printStackTrace();
+ return false;
+}
+
+return true;
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/verify.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-postbuild/verify.bsh
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/invoker.properties?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/invoker.properties (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/invoker.properties Sat Aug 23 13:43:38 2008
@@ -0,0 +1,2 @@
+invoker.buildResult = failure
+invoker.goals = clean verify
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/invoker.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/invoker.properties
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/pom.xml?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/pom.xml (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/pom.xml Sat Aug 23 13:43:38 2008
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<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>
+
+ <groupId>org.apache.maven.plugins.invoker</groupId>
+ <artifactId>fail-prebuild</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <description>Test to check that a failure of the pre-build hook fails the parent build, too.</description>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <version>@pom.version@</version>
+ <configuration>
+ <debug>true</debug>
+ <projectsDirectory>src/it</projectsDirectory>
+ <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+ <pomIncludes>
+ <pomInclude>*/pom.xml</pomInclude>
+ </pomIncludes>
+ <goals>
+ <goal>validate</goal>
+ </goals>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/pom.xml?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/pom.xml (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/pom.xml Sat Aug 23 13:43:38 2008
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<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>
+ <groupId>test</groupId>
+ <artifactId>fail-prebuild</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+</project>
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/prebuild.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/prebuild.bsh?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/prebuild.bsh (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/prebuild.bsh Sat Aug 23 13:43:38 2008
@@ -0,0 +1,7 @@
+import java.io.*;
+
+// marker for parent build that this sub build was indeed run
+File touchFile = new File( basedir, "touch.txt" );
+touchFile.createNewFile();
+
+return false;
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/prebuild.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/src/it/project/prebuild.bsh
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/verify.bsh?rev=688409&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/verify.bsh (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/verify.bsh Sat Aug 23 13:43:38 2008
@@ -0,0 +1,22 @@
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+
+try
+{
+ // make sure the Invoker Plugin was indeed run and the build didn't fail somewhere else
+ File touchFile = new File( basedir, "target/it/project/touch.txt" );
+ System.out.println( "Checking for existence of touch file: " + touchFile );
+ if ( !touchFile.exists() )
+ {
+ System.out.println( "FAILED!" );
+ return false;
+ }
+}
+catch( Throwable t )
+{
+ t.printStackTrace();
+ return false;
+}
+
+return true;
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/verify.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/fail-prebuild/verify.bsh
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision