http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/pom.xml b/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/pom.xml deleted file mode 100644 index 53bb0a3..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/pom.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>surefire-946</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Tests killing the main maven process when using reusable forks</name> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.4</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>maven-selfdestruct-plugin</artifactId> - <version>0.1</version> - <configuration> - <timeoutInMillis>${selfdestruct.timeoutInMillis}</timeoutInMillis> - <method>${selfdestruct.method}</method> - </configuration> - </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - </plugin> - </plugins> - </build> - -</project>
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic01Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic01Test.java b/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic01Test.java deleted file mode 100644 index 8c52d1b..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic01Test.java +++ /dev/null @@ -1,45 +0,0 @@ -package junit44.environment; - -/* - * 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. - */ - -import org.junit.AfterClass; -import org.junit.Test; - -public class Basic01Test -{ - - @Test - public void testNothing() - { - } - - @AfterClass - public static void waitSomeTimeAround() - { - try - { - Thread.sleep( Integer.getInteger( "testSleepTime", 2000 ) ); - } - catch ( InterruptedException ignored ) - { - } - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic02Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic02Test.java b/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic02Test.java deleted file mode 100644 index 6ef33f9..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic02Test.java +++ /dev/null @@ -1,45 +0,0 @@ -package junit44.environment; - -/* - * 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. - */ - -import org.junit.AfterClass; -import org.junit.Test; - -public class Basic02Test -{ - - @Test - public void testNothing() - { - } - - @AfterClass - public static void waitSomeTimeAround() - { - try - { - Thread.sleep( Integer.getInteger( "testSleepTime", 2000 ) ); - } - catch ( InterruptedException ignored ) - { - } - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic03Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic03Test.java b/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic03Test.java deleted file mode 100644 index b1d7c71..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic03Test.java +++ /dev/null @@ -1,45 +0,0 @@ -package junit44.environment; - -/* - * 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. - */ - -import org.junit.AfterClass; -import org.junit.Test; - -public class Basic03Test -{ - - @Test - public void testNothing() - { - } - - @AfterClass - public static void waitSomeTimeAround() - { - try - { - Thread.sleep( Integer.getInteger( "testSleepTime", 2000 ) ); - } - catch ( InterruptedException ignored ) - { - } - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic04Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic04Test.java b/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic04Test.java deleted file mode 100644 index 6d082cb..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic04Test.java +++ /dev/null @@ -1,45 +0,0 @@ -package junit44.environment; - -/* - * 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. - */ - -import org.junit.AfterClass; -import org.junit.Test; - -public class Basic04Test -{ - - @Test - public void testNothing() - { - } - - @AfterClass - public static void waitSomeTimeAround() - { - try - { - Thread.sleep( Integer.getInteger( "testSleepTime", 2000 ) ); - } - catch ( InterruptedException ignored ) - { - } - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic05Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic05Test.java b/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic05Test.java deleted file mode 100644 index 92f5f15..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic05Test.java +++ /dev/null @@ -1,45 +0,0 @@ -package junit44.environment; - -/* - * 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. - */ - -import org.junit.AfterClass; -import org.junit.Test; - -public class Basic05Test -{ - - @Test - public void testNothing() - { - } - - @AfterClass - public static void waitSomeTimeAround() - { - try - { - Thread.sleep( Integer.getInteger( "testSleepTime", 2000 ) ); - } - catch ( InterruptedException ignored ) - { - } - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic06Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic06Test.java b/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic06Test.java deleted file mode 100644 index 2a44568..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic06Test.java +++ /dev/null @@ -1,45 +0,0 @@ -package junit44.environment; - -/* - * 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. - */ - -import org.junit.AfterClass; -import org.junit.Test; - -public class Basic06Test -{ - - @Test - public void testNothing() - { - } - - @AfterClass - public static void waitSomeTimeAround() - { - try - { - Thread.sleep( Integer.getInteger( "testSleepTime", 2000 ) ); - } - catch ( InterruptedException ignored ) - { - } - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic07Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic07Test.java b/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic07Test.java deleted file mode 100644 index 64f180e..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic07Test.java +++ /dev/null @@ -1,45 +0,0 @@ -package junit44.environment; - -/* - * 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. - */ - -import org.junit.AfterClass; -import org.junit.Test; - -public class Basic07Test -{ - - @Test - public void testNothing() - { - } - - @AfterClass - public static void waitSomeTimeAround() - { - try - { - Thread.sleep( Integer.getInteger( "testSleepTime", 2000 ) ); - } - catch ( InterruptedException ignored ) - { - } - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic08Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic08Test.java b/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic08Test.java deleted file mode 100644 index 5a4c382..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic08Test.java +++ /dev/null @@ -1,45 +0,0 @@ -package junit44.environment; - -/* - * 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. - */ - -import org.junit.AfterClass; -import org.junit.Test; - -public class Basic08Test -{ - - @Test - public void testNothing() - { - } - - @AfterClass - public static void waitSomeTimeAround() - { - try - { - Thread.sleep( Integer.getInteger( "testSleepTime", 2000 ) ); - } - catch ( InterruptedException ignored ) - { - } - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic09Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic09Test.java b/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic09Test.java deleted file mode 100644 index 2461d11..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic09Test.java +++ /dev/null @@ -1,45 +0,0 @@ -package junit44.environment; - -/* - * 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. - */ - -import org.junit.AfterClass; -import org.junit.Test; - -public class Basic09Test -{ - - @Test - public void testNothing() - { - } - - @AfterClass - public static void waitSomeTimeAround() - { - try - { - Thread.sleep( Integer.getInteger( "testSleepTime", 2000 ) ); - } - catch ( InterruptedException ignored ) - { - } - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic10Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic10Test.java b/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic10Test.java deleted file mode 100644 index 1e57b13..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic10Test.java +++ /dev/null @@ -1,45 +0,0 @@ -package junit44.environment; - -/* - * 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. - */ - -import org.junit.AfterClass; -import org.junit.Test; - -public class Basic10Test -{ - - @Test - public void testNothing() - { - } - - @AfterClass - public static void waitSomeTimeAround() - { - try - { - Thread.sleep( Integer.getInteger( "testSleepTime", 2000 ) ); - } - catch ( InterruptedException ignored ) - { - } - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-946-self-destruct-plugin/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-946-self-destruct-plugin/pom.xml b/surefire-integration-tests/src/test/resources/surefire-946-self-destruct-plugin/pom.xml deleted file mode 100644 index 811be93..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-946-self-destruct-plugin/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<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>org.apache.maven.plugins.surefire</groupId> - <artifactId>maven-selfdestruct-plugin</artifactId> - <version>0.1</version> - <packaging>maven-plugin</packaging> - - <name>maven-selfdestruct-plugin Maven Plugin</name> - <url>http://maven.apache.org</url> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-plugin-api</artifactId> - <version>2.0</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-plugin-plugin</artifactId> - <version>2.9</version> - <configuration> - <goalPrefix>maven-selfdestruct-plugin</goalPrefix> - </configuration> - <executions> - <execution> - <id>generated-helpmojo</id> - <goals> - <goal>helpmojo</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-946-self-destruct-plugin/src/main/java/org/apache/maven/plugins/surefire/selfdestruct/SelfDestructMojo.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-946-self-destruct-plugin/src/main/java/org/apache/maven/plugins/surefire/selfdestruct/SelfDestructMojo.java b/surefire-integration-tests/src/test/resources/surefire-946-self-destruct-plugin/src/main/java/org/apache/maven/plugins/surefire/selfdestruct/SelfDestructMojo.java deleted file mode 100644 index d5f791f..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-946-self-destruct-plugin/src/main/java/org/apache/maven/plugins/surefire/selfdestruct/SelfDestructMojo.java +++ /dev/null @@ -1,161 +0,0 @@ -package org.apache.maven.plugins.surefire.selfdestruct; - -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed 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. - */ - -import java.io.IOException; -import java.lang.management.ManagementFactory; -import java.util.ArrayList; -import java.util.List; -import java.util.Timer; -import java.util.TimerTask; - -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; - -/* - * 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. - */ - -/** - * Goal which terminates the maven process it is executed in after a timeout. - * - * @goal selfdestruct - * @phase test - */ -public class SelfDestructMojo - extends AbstractMojo -{ - private enum DestructMethod - { - exit, halt, interrupt; - } - - /** - * Timeout in milliseconds - * - * @parameter - */ - private long timeoutInMillis = 0; - - /** - * Method of self-destruction: 'exit' will use System.exit (default), 'halt' will use Runtime.halt, 'interrupt' will - * try to call 'taskkill' (windows) or 'kill -INT' (others) - * - * @parameter - */ - private String method = "exit"; - - public void execute() - throws MojoExecutionException - { - - DestructMethod destructMethod = DestructMethod.valueOf( method ); - - if ( timeoutInMillis > 0 ) - { - getLog().warn( "Self-Destruct in " + timeoutInMillis + " ms using " + destructMethod ); - Timer timer = new Timer( "", true ); - timer.schedule( new SelfDestructionTask( destructMethod ), timeoutInMillis ); - } - else - { - new SelfDestructionTask( destructMethod ).run(); - } - } - - private void selfDestruct( DestructMethod destructMethod ) - { - getLog().warn( "Self-Destructing NOW." ); - switch ( destructMethod ) - { - case exit: - System.exit( 1 ); - case halt: - Runtime.getRuntime().halt( 1 ); - case interrupt: - String name = ManagementFactory.getRuntimeMXBean().getName(); - int indexOfAt = name.indexOf( '@' ); - if ( indexOfAt > 0 ) - { - String pid = name.substring( 0, indexOfAt ); - getLog().warn( "Going to kill process with PID " + pid ); - - List<String> args = new ArrayList<String>(); - if ( System.getProperty( "os.name" ).startsWith( "Windows" ) ) - { - args.add( "taskkill" ); - args.add( "/PID" ); - } - else - { - args.add( "kill" ); - args.add( "-INT" ); - } - args.add( pid ); - - try - { - new ProcessBuilder( args ).start(); - } - catch ( IOException e ) - { - getLog().error( "Unable to spawn process. Killing with System.exit.", e ); - } - } - else - { - getLog().warn( "Unable to determine my PID... Using System.exit" ); - } - } - - System.exit( 1 ); - } - - private class SelfDestructionTask - extends TimerTask - { - - private DestructMethod destructMethod; - - public SelfDestructionTask( DestructMethod destructMethod ) - { - this.destructMethod = destructMethod; - } - - @Override - public void run() - { - selfDestruct( destructMethod ); - } - - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/boom/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/boom/pom.xml b/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/boom/pom.xml deleted file mode 100644 index fa075ab..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/boom/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ -<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> - <artifactId>class-rule-boom-boom</artifactId> - <parent> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>class-rule-boom</artifactId> - <version>1.0-SNAPSHOT</version> - </parent> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.11</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>class-rule</artifactId> - <version>1.0-SNAPSHOT</version> - <scope>test</scope> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <version>${surefire.version}</version> - <executions> - <execution> - <goals> - <goal>integration-test</goal> - <goal>verify</goal> - </goals> - <configuration> - <forkMode>always</forkMode> - </configuration> - </execution> - </executions> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit47</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/boom/src/test/java/org/apache/maven/surefire/crb/ClassRuleIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/boom/src/test/java/org/apache/maven/surefire/crb/ClassRuleIT.java b/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/boom/src/test/java/org/apache/maven/surefire/crb/ClassRuleIT.java deleted file mode 100644 index 0d5eab9..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/boom/src/test/java/org/apache/maven/surefire/crb/ClassRuleIT.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.apache.maven.surefire.crb; - -/* - * 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. - */ - -import org.junit.Assert; -import org.junit.ClassRule; -import org.junit.Test; - -/** - * Created with IntelliJ IDEA. - * User: benson - * Date: 3/16/13 - * Time: 11:00 AM - * To change this template use File | Settings | File Templates. - */ -public class ClassRuleIT extends Assert { - - @ClassRule - public static ExampleClassRule rule = new ExampleClassRule(ExampleClassRule.someStaticFunction()); - - @Test - public void dummyTest() { - - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/class-rule/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/class-rule/pom.xml b/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/class-rule/pom.xml deleted file mode 100644 index 8eaf187..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/class-rule/pom.xml +++ /dev/null @@ -1,17 +0,0 @@ -<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> - <artifactId>class-rule</artifactId> - <parent> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>class-rule-boom</artifactId> - <version>1.0-SNAPSHOT</version> - </parent> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.11</version> - </dependency> - </dependencies> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/class-rule/src/main/java/org.apache.maven.surefire.crb/ExampleClassRule.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/class-rule/src/main/java/org.apache.maven.surefire.crb/ExampleClassRule.java b/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/class-rule/src/main/java/org.apache.maven.surefire.crb/ExampleClassRule.java deleted file mode 100644 index 430f7d2..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/class-rule/src/main/java/org.apache.maven.surefire.crb/ExampleClassRule.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.apache.maven.surefire.crb; - -import org.junit.rules.ExternalResource; - -/** - * Created with IntelliJ IDEA. - * User: benson - * Date: 3/16/13 - * Time: 10:52 AM - * To change this template use File | Settings | File Templates. - */ -public class ExampleClassRule extends ExternalResource { - - public ExampleClassRule(String dummy) { - // - } - - protected void before() throws Throwable { - System.err.println("ExampleClassRule.before()"); - } - - protected void after() { - System.err.println("ExampleClassRule.after()"); - } - - public static String someStaticFunction() { - throw new RuntimeException("Surprise!"); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/pom.xml b/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/pom.xml deleted file mode 100644 index 7a2ac4d..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-972-bizarre-noclassdef/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ -<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>org.apache.maven.surefire</groupId> - <artifactId>class-rule-boom</artifactId> - <packaging>pom</packaging> - <version>1.0-SNAPSHOT</version> - <modules> - <module>class-rule</module> - <module>boom</module> - </modules> - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - <build> - <pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.5.1</version> - <configuration> - <showDeprecation>true</showDeprecation> - <showWarnings>true</showWarnings> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>2.14</version> - </plugin> - </plugins> - </pluginManagement> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-975-wrong-encoding/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-975-wrong-encoding/pom.xml b/surefire-integration-tests/src/test/resources/surefire-975-wrong-encoding/pom.xml deleted file mode 100755 index 49848d6..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-975-wrong-encoding/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ -<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> - - <artifactId>encoding-bug</artifactId> - <groupId>ru.fors.encoding</groupId> - <version>1.0-SNAPSHOT</version> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.11</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-975-wrong-encoding/src/test/java/EncodingInReportTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-975-wrong-encoding/src/test/java/EncodingInReportTest.java b/surefire-integration-tests/src/test/resources/surefire-975-wrong-encoding/src/test/java/EncodingInReportTest.java deleted file mode 100755 index 7108e4b..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-975-wrong-encoding/src/test/java/EncodingInReportTest.java +++ /dev/null @@ -1,33 +0,0 @@ -import org.junit.Test; - -/* - * 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. - */ - -public class EncodingInReportTest { - - @Test - public void test1() { - - } - - @Test - public void киÑиллиÑе() { - - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module1/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module1/pom.xml b/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module1/pom.xml deleted file mode 100644 index 79e1c7d..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module1/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ -<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>surefire-979</groupId> - <artifactId>module1</artifactId> - <version>1.0</version> - <name>surefire-979-base</name> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.10</version> - </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>2.2</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module1/src/main/java/surefire979/TestBase.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module1/src/main/java/surefire979/TestBase.java b/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module1/src/main/java/surefire979/TestBase.java deleted file mode 100644 index 442b3c3..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module1/src/main/java/surefire979/TestBase.java +++ /dev/null @@ -1,36 +0,0 @@ -package surefire979; - - -/* - * 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. - */ - -import org.apache.commons.io.input.AutoCloseInputStream; -import org.junit.Test; - -import java.io.ByteArrayInputStream; - - -public class TestBase -{ - - static { - AutoCloseInputStream directoryWalker = new AutoCloseInputStream(new ByteArrayInputStream(new byte[200])); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module2/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module2/pom.xml b/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module2/pom.xml deleted file mode 100644 index cae9147..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module2/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ -<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>surefire-979</groupId> - <artifactId>module2</artifactId> - <version>1.0</version> - <name>surefire-979</name> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.10</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>surefire-979</groupId> - <artifactId>module1</artifactId> - <version>1.0</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module2/src/test/java/surefire979/FailingStaticInitializerTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module2/src/test/java/surefire979/FailingStaticInitializerTest.java b/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module2/src/test/java/surefire979/FailingStaticInitializerTest.java deleted file mode 100644 index 3371fbd..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/module2/src/test/java/surefire979/FailingStaticInitializerTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package surefire979; - - -/* - * 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. - */ - -import org.junit.Test; - - -public class FailingStaticInitializerTest extends TestBase -{ - - @Test - public void test() - { - throw new IllegalStateException("This test will never run"); - - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/pom.xml b/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/pom.xml deleted file mode 100644 index c9c1f91..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-979-smartStackTrace-wrongClassloader/pom.xml +++ /dev/null @@ -1,28 +0,0 @@ -<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>test</groupId> - <artifactId>surefire-979</artifactId> - <version>0.0.1-SNAPSHOT</version> - <name>surefire-979</name> - <packaging>pom</packaging> - - <modules> - <module>module1</module> - <module>module2</module> - </modules> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/pom.xml b/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/pom.xml deleted file mode 100644 index 607015e..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>it-parent</artifactId> - <version>1.0</version> - </parent> - - <artifactId>surefire-985</artifactId> - <name>Tests Parameterized runner together with @Categories</name> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.11</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <runOrder>alphabetical</runOrder> - <groups>sample.CategoryActivated</groups> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/CategoryActivated.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/CategoryActivated.java b/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/CategoryActivated.java deleted file mode 100644 index f89366b..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/CategoryActivated.java +++ /dev/null @@ -1,25 +0,0 @@ -package sample; - -/* - * 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. - */ - -public interface CategoryActivated -{ - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/CategoryNotSelected.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/CategoryNotSelected.java b/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/CategoryNotSelected.java deleted file mode 100644 index de0d03f..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/CategoryNotSelected.java +++ /dev/null @@ -1,25 +0,0 @@ -package sample; - -/* - * 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. - */ - -public interface CategoryNotSelected -{ - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/parameterized/Parameterized01Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/parameterized/Parameterized01Test.java b/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/parameterized/Parameterized01Test.java deleted file mode 100644 index d1bb29d..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/parameterized/Parameterized01Test.java +++ /dev/null @@ -1,61 +0,0 @@ -package sample.parameterized; - -/* - * 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. - */ - -import java.util.Arrays; -import java.util.Collection; - -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; - -import sample.CategoryNotSelected; - -@RunWith( Parameterized.class ) -@Category( CategoryNotSelected.class ) -public class Parameterized01Test -{ - static - { - System.out.println( "Initializing Parameterized01Test" ); - } - - @Parameters - public static Collection<Integer[]> getParams() - { - return Arrays.asList( new Integer[] { 1 }, new Integer[] { 2 }, new Integer[] { 3 }, new Integer[] { 4 } ); - } - - public Parameterized01Test( Integer param ) - { - } - - @Test - public void testNothing() - { - } - - @Test - public void testNothingEither() - { - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/parameterized/Parameterized02Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/parameterized/Parameterized02Test.java b/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/parameterized/Parameterized02Test.java deleted file mode 100644 index c5ae22f..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/parameterized/Parameterized02Test.java +++ /dev/null @@ -1,61 +0,0 @@ -package sample.parameterized; - -/* - * 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. - */ - -import java.util.Arrays; -import java.util.Collection; - -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; - -import sample.CategoryActivated; - -@RunWith( Parameterized.class ) -public class Parameterized02Test -{ - static - { - System.out.println( "Initializing Parameterized02Test" ); - } - - @Parameters - public static Collection<Integer[]> getParams() - { - return Arrays.asList( new Integer[] { 1 }, new Integer[] { 2 }, new Integer[] { 3 }, new Integer[] { 4 } ); - } - - public Parameterized02Test( Integer param ) - { - } - - @Test - @Category( CategoryActivated.class ) - public void testNothing() - { - } - - @Test - public void testNothingEither() - { - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/parameterized/Parameterized03Test.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/parameterized/Parameterized03Test.java b/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/parameterized/Parameterized03Test.java deleted file mode 100644 index ac5dfad..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-985-parameterized-and-categories/src/test/java/sample/parameterized/Parameterized03Test.java +++ /dev/null @@ -1,61 +0,0 @@ -package sample.parameterized; - -/* - * 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. - */ - -import java.util.Arrays; -import java.util.Collection; - -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; - -import sample.CategoryActivated; - -@Category( CategoryActivated.class ) -@RunWith( Parameterized.class ) -public class Parameterized03Test -{ - static - { - System.out.println( "Initializing Parameterized03Test" ); - } - - @Parameters - public static Collection<Integer[]> getParams() - { - return Arrays.asList( new Integer[] { 1 }, new Integer[] { 2 }, new Integer[] { 3 }, new Integer[] { 4 } ); - } - - public Parameterized03Test( Integer param ) - { - } - - @Test - public void testNothing() - { - } - - @Test - public void testNothingEither() - { - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/pom.xml b/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/pom.xml deleted file mode 100644 index 4662f24..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/pom.xml +++ /dev/null @@ -1,90 +0,0 @@ -<?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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>it-parent</artifactId> - <version>1.0</version> - <relativePath>../pom.xml</relativePath> - </parent> - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>jiras-surefire-995</artifactId> - <version>1.0</version> - <url>http://maven.apache.org</url> - <properties> - <version.junit>4.12</version.junit> - </properties> - <developers> - <developer> - <id>tibordigana</id> - <name>Tibor DigaÅa (tibor17)</name> - <email>tibordig...@apache.org</email> - <roles> - <role>Committer</role> - </roles> - <timezone>Europe/Bratislava</timezone> - </developer> - </developers> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>${version.junit}</version> - <scope>test</scope> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - </plugin> - </plugins> - </build> - <profiles> - <profile> - <id>positive-tests</id> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <groups>jiras.surefire955.SomeCategory</groups> - </configuration> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>positive-tests-excluded-categories</id> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <excludedGroups>jiras.surefire955.SomeCategory</excludedGroups> - </configuration> - </plugin> - </plugins> - </build> - </profile> - </profiles> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/CategorizedTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/CategorizedTest.java b/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/CategorizedTest.java deleted file mode 100644 index a25b15a..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/CategorizedTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package jiras.surefire955; - -/* - * 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. - */ - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -@Category( SomeCategory.class ) -public class CategorizedTest -{ - - @Test - public void a() - { - System.out.println( "CategorizedTest#a" ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/NotIncludedTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/NotIncludedTest.java b/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/NotIncludedTest.java deleted file mode 100644 index c52bff0..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/NotIncludedTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package jiras.surefire955; - -/* - * 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. - */ - -import org.junit.Test; - -public class NotIncludedTest -{ - - @Test - public void test() - { - System.out.println( "NotIncludedTest#test" ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/SomeCategory.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/SomeCategory.java b/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/SomeCategory.java deleted file mode 100644 index d83b4ba..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/SomeCategory.java +++ /dev/null @@ -1,24 +0,0 @@ -package jiras.surefire955; - -/* - * 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. - */ - -public interface SomeCategory -{ -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/SpecialCategorizedTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/SpecialCategorizedTest.java b/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/SpecialCategorizedTest.java deleted file mode 100644 index 8082f43..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/SpecialCategorizedTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package jiras.surefire955; - -/* - * 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. - */ - -import org.junit.Test; - -public final class SpecialCategorizedTest - extends CategorizedTest -{ - - @Test - public void b() - { - System.out.println( "SpecialCategorizedTest#b" ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/SpecialNonCategoryTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/SpecialNonCategoryTest.java b/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/SpecialNonCategoryTest.java deleted file mode 100644 index 853ae50..0000000 --- a/surefire-integration-tests/src/test/resources/surefire-995-categoryInheritance/src/test/java/jiras/surefire955/SpecialNonCategoryTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package jiras.surefire955; - -/* - * 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. - */ - -import org.junit.Test; - -public class SpecialNonCategoryTest -{ - - @Test - public void test() - { - System.out.println( "SpecialNonCategoryTest#test" ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/system-properties/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/system-properties/pom.xml b/surefire-integration-tests/src/test/resources/system-properties/pom.xml deleted file mode 100644 index 1d2952d..0000000 --- a/surefire-integration-tests/src/test/resources/system-properties/pom.xml +++ /dev/null @@ -1,98 +0,0 @@ -<?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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>system-properties</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for systemProperties</name> - - <build> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.2</version> - <executions> - <execution> - <phase>generate-sources</phase> - <goals> - <goal>reserve-network-port</goal> - </goals> - <configuration> - <portNames> - <portName>reservedPort1</portName> - <portName>reservedPort2</portName> - <portName>reservedPort3</portName> - </portNames> - </configuration> - </execution> - </executions> - </plugin> - - - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <systemProperties> - <property> - <name>setInPom</name> - <value>foo</value> - </property> - </systemProperties> - <systemPropertyVariables> - <buildDirectory>${project.build.directory}</buildDirectory> - <reservedPort1>${reservedPort1}</reservedPort1> - <reservedPort2>${reservedPort2}</reservedPort2> - <emptyProperty/> - <blankProperty> </blankProperty> - <!-- this is a work around for SUREFIRE-121 --> - <setOnArgLineWorkAround>${setOnArgLineWorkAround}</setOnArgLineWorkAround> - <overriddenPropertyFomFile>value2</overriddenPropertyFomFile> - </systemPropertyVariables> - <systemPropertiesFile>${project.basedir}/src/test/config/propsfile.properties</systemPropertiesFile> - <argLine>-DsetOnArgLine=bar</argLine> - </configuration> - </plugin> - </plugins> - - </build> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</version> - <scope>test</scope> - </dependency> - </dependencies> - - <properties> - <setOnArgLineWorkAround>fool</setOnArgLineWorkAround> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/system-properties/src/test/config/propsfile.properties ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/system-properties/src/test/config/propsfile.properties b/surefire-integration-tests/src/test/resources/system-properties/src/test/config/propsfile.properties deleted file mode 100644 index d8cbbfa..0000000 --- a/surefire-integration-tests/src/test/resources/system-properties/src/test/config/propsfile.properties +++ /dev/null @@ -1,2 +0,0 @@ -setInFile = bar -overriddenPropertyFomFile = value1 http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/system-properties/src/test/java/systemProperties/BasicTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/system-properties/src/test/java/systemProperties/BasicTest.java b/surefire-integration-tests/src/test/resources/system-properties/src/test/java/systemProperties/BasicTest.java deleted file mode 100644 index caf96cb..0000000 --- a/surefire-integration-tests/src/test/resources/system-properties/src/test/java/systemProperties/BasicTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package systemProperties; - -/* - * 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. - */ - -import java.io.File; - -import junit.framework.TestCase; - -public class BasicTest - extends TestCase -{ - - - public void testSetInPom() - { - assertEquals( "property setInPom not set", "foo", System.getProperty( "setInPom" ) ); - } - - public void testSetOnArgLine() - { - assertEquals( "setOnArgLine property not set", "bar", System.getProperty( "setOnArgLine" ) ); - } - - - public void testSystemPropertyUsingMavenProjectProperties() - { - String actualBuildDirectory = new File( System.getProperty( "basedir" ), "target" ).getAbsolutePath(); - - String buildDirectoryFromPom = new File( System.getProperty( "buildDirectory" ) ).getAbsolutePath(); - - assertEquals( "Pom property not set.", actualBuildDirectory, buildDirectoryFromPom ); - } - - public void testSystemPropertyGenerateByOtherPlugin() - throws Exception - { - int reservedPort1 = Integer.parseInt( System.getProperty( "reservedPort1" ) ); - int reservedPort2 = Integer.parseInt( System.getProperty( "reservedPort2" ) ); - System.out.println( "reservedPort1: " + reservedPort1 ); - System.out.println( "reservedPort2: " + reservedPort2 ); - - assertTrue( reservedPort1 != reservedPort2 ); - } - - public void testEmptySystemProperties() - { - assertNull( "Null property is not null", System.getProperty( "nullProperty" ) ); - assertEquals( "Empty property is not empty", "", System.getProperty( "emptyProperty" ) ); - assertNotNull( "Blank property is null", System.getProperty( "blankProperty" ) ); - assertEquals( "Blank property is not trimmed", "", System.getProperty( "blankProperty" ) ); - } - - /** - * work around for SUREFIRE-121 - */ - public void testSetOnArgLineWorkAround() - { - assertEquals( "property setOnArgLineWorkAround not set", "baz", - System.getProperty( "setOnArgLineWorkAround" ) ); - } - - public void testSetOnMavenCommandLine() - { - assertEquals( "property setOnMavenCommandLine not set", "baz", System.getProperty( "setOnMavenCommandLine" ) ); - } - - public void testSetInFile() - { - assertEquals( "property setInFile not set", "bar", System.getProperty( "setInFile" ) ); - assertEquals( "property overriddenPropertyFomFile not overridden", "value2", - System.getProperty( "overriddenPropertyFomFile" ) ); - } -}