Skip to content

Commit

Permalink
add comprehensive test suite for classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
hgschmie committed Sep 16, 2014
1 parent 4f3fac4 commit 49be58a
Show file tree
Hide file tree
Showing 37 changed files with 1,423 additions and 152 deletions.
61 changes: 0 additions & 61 deletions src/it/diff-it-1/pom.xml

This file was deleted.

62 changes: 0 additions & 62 deletions src/it/diff-it-2/pom.xml

This file was deleted.

31 changes: 31 additions & 0 deletions src/it/setup-class-jars/first-class-jar/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
~ Copyright 2010 Ning, Inc.
~
~ Ning 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>com.ning.maven.plugins.duplicate-finder-maven-plugin</groupId>
<artifactId>first-class-jar</artifactId>
<version>1.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<defaultGoal>package</defaultGoal>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2010 Ning, Inc.
*
* Ning 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.
*/
package diff;

public class Demo
{
public static final void main(String ... args) throws Exception {
System.out.println("Hello, first-class-jar World!");
}
}
31 changes: 31 additions & 0 deletions src/it/setup-class-jars/first-diff-jar/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
~ Copyright 2010 Ning, Inc.
~
~ Ning 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>com.ning.maven.plugins.duplicate-finder-maven-plugin</groupId>
<artifactId>first-diff-jar</artifactId>
<version>1.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<defaultGoal>package</defaultGoal>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2010 Ning, Inc.
*
* Ning 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.
*/
package diff;

public class Demo
{
public static final void main(String ... args) throws Exception {
System.out.println("Hello, first-diff-jar World!");
}
}
17 changes: 17 additions & 0 deletions src/it/setup-class-jars/invoker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Copyright 2010 Ning, Inc.
#
# Ning 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.
#

invoker.goals=clean install
67 changes: 67 additions & 0 deletions src/it/setup-class-jars/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<!--
~ Copyright 2010 Ning, Inc.
~
~ Ning 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>com.ning.maven.plugins.duplicate-finder-maven-plugin</groupId>
<artifactId>setup-class-jars</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<description>
Creates and installs two jars with nearly identical content into the integration
test maven repository.

All the integration tests that check reporting or failure of errors use these jars for comparing.
</description>

<modules>
<module>first-class-jar</module>
<module>first-diff-jar</module>
<module>second-class-jar</module>
</modules>

<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>foundation</id>
<phase>install</phase>
<goals>
<goal>install-file</goal>
</goals>
<!-- third jar is an identical copy of first-jar -->
<configuration>
<groupId>com.ning.maven.plugins.duplicate-finder-maven-plugin</groupId>
<artifactId>second-equal-jar</artifactId>
<version>1.0</version>
<generatePom>true</generatePom>
<createChecksum>true</createChecksum>
<packaging>jar</packaging>
<version>1.0</version>
<file>second-class-jar/target/second-class-jar-1.0.jar</file>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
31 changes: 31 additions & 0 deletions src/it/setup-class-jars/second-class-jar/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
~ Copyright 2010 Ning, Inc.
~
~ Ning 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>com.ning.maven.plugins.duplicate-finder-maven-plugin</groupId>
<artifactId>second-class-jar</artifactId>
<version>1.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<defaultGoal>package</defaultGoal>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2010 Ning, Inc.
*
* Ning 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.
*/
package demo;

public class Demo
{
public static final void main(String ... args) throws Exception {
System.out.println("Hello, second-class-jar World!");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,5 @@
# under the License.
#

##
## more info for configuration option on maven-invoker-plugin website
##
## http://maven.apache.org/plugins/maven-invoker-plugin/run-mojo.html#invokerPropertiesFile
##

invoker.goals=clean verify
invoker.buildResult=failure
invoker.buildResult = success
Loading

0 comments on commit 49be58a

Please sign in to comment.