-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add IT for checking the creation of depclean-results.json (#84)
- Loading branch information
1 parent
72d97b8
commit 1d4ca64
Showing
7 changed files
with
608 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
depclean-maven-plugin/src/main/java/se/kth/depclean/util/OsUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package se.kth.depclean.util; | ||
|
||
/** | ||
* Utility class to determine the operative system being used. | ||
*/ | ||
public class OsUtils { | ||
|
||
private static final String OS = System.getProperty("os.name").toLowerCase(); | ||
|
||
private OsUtils() { | ||
} | ||
|
||
public static boolean isUnix() { | ||
return (OS.contains("nix") || OS.contains("nux") || OS.contains("mac os")); | ||
} | ||
|
||
public static boolean isWindows() { | ||
return (OS.contains("win")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...ugin/src/test/resources-its/se/kth/depclean/DepCleanMojoIT/json_should_be_correct/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>org.foo.bar</groupId> | ||
<artifactId>foobar</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<name>foobar</name> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<maven.compiler.source>11</maven.compiler.source> | ||
<maven.compiler.target>11</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.jcabi</groupId> | ||
<artifactId>jcabi-manifests</artifactId> | ||
<version>1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-io</groupId> | ||
<artifactId>commons-io</artifactId> | ||
<version>2.8.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-codec</groupId> | ||
<artifactId>commons-codec</artifactId> | ||
<version>1.15</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>se.kth.castor</groupId> | ||
<artifactId>depclean-maven-plugin</artifactId> | ||
<version>2.0.2-SNAPSHOT</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>depclean</goal> | ||
</goals> | ||
<configuration> | ||
<createResultJson>true</createResultJson> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
11 changes: 11 additions & 0 deletions
11
...kth/depclean/DepCleanMojoIT/json_should_be_correct/src/main/java/org/UseCommonsCodec.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org; | ||
|
||
import org.apache.commons.codec.Charsets; | ||
|
||
public class UseCommonsCodec { | ||
|
||
public static void main(String[] args) { | ||
System.out.println(Charsets.UTF_8); | ||
} | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
...th/depclean/DepCleanMojoIT/json_should_be_correct/src/main/java/org/UseJcabiManifest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org; | ||
|
||
import com.jcabi.manifests.Manifests; | ||
|
||
public class UseJcabiManifest { | ||
|
||
public static void main(String[] args) { | ||
Manifests manifests = new Manifests(); | ||
System.out.println(manifests.size()); | ||
} | ||
} |
Oops, something went wrong.