Skip to content

Commit 73034c0

Browse files
Renamed "examples" module + project structure picture update
1 parent 9d3216c commit 73034c0

File tree

235 files changed

+99
-50
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+99
-50
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,5 @@ target/failsafe-reports/
6161
.github/workflows/cache/
6262

6363
# Specific
64+
.flattened-pom.xml
6465
!/src/example/resources/emojis/**

assets/project-structure.png

131 KB

jfiletreeprettyprinter-cli/src/main/java/io/github/computerdaddyguy/jfiletreeprettyprinter/cli/ManifestVersionProvider.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class ManifestVersionProvider implements IVersionProvider {
88

99
@Override
1010
public String[] getVersion() throws Exception {
11-
String implTitle = null;
1211
String implVersion = null;
1312
String projectDesc = null;
1413
String commitId = null;
@@ -19,7 +18,6 @@ public String[] getVersion() throws Exception {
1918
try (InputStream is = getClass().getResourceAsStream("/META-INF/MANIFEST.MF")) {
2019
if (is != null) {
2120
Manifest manifest = new Manifest(is);
22-
implTitle = manifest.getMainAttributes().getValue("Implementation-Title");
2321
implVersion = manifest.getMainAttributes().getValue("Implementation-Version");
2422
projectDesc = manifest.getMainAttributes().getValue("Project-Desc");
2523
commitId = manifest.getMainAttributes().getValue("Commit-Id");
@@ -30,7 +28,7 @@ public String[] getVersion() throws Exception {
3028
}
3129

3230
return new String[] {
33-
valueOrUnknown(implTitle) + " " + valueOrUnknown(implVersion),
31+
"JFileTreePrettyPrinter " + valueOrUnknown(implVersion),
3432
valueOrUnknown(projectDesc),
3533
"Repository: " + valueOrUnknown(scmUrl),
3634
"Commit: " + valueOrUnknown(commitId) + " (" + valueOrUnknown(commitTime) + ")",

jfiletreeprettyprinter-core/pom.xml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,29 @@
3232

3333
<build>
3434
<plugins>
35-
36-
35+
<plugin>
36+
<groupId>org.codehaus.mojo</groupId>
37+
<artifactId>flatten-maven-plugin</artifactId>
38+
<configuration>
39+
<flattenMode>ossrh</flattenMode>
40+
</configuration>
41+
<executions>
42+
<execution>
43+
<id>flatten</id>
44+
<phase>process-resources</phase>
45+
<goals>
46+
<goal>flatten</goal>
47+
</goals>
48+
</execution>
49+
<execution>
50+
<id>flatten.clean</id>
51+
<phase>clean</phase>
52+
<goals>
53+
<goal>clean</goal>
54+
</goals>
55+
</execution>
56+
</executions>
57+
</plugin>
3758
</plugins>
3859
</build>
3960

jfiletreeprettyprinter-core/src/main/java/io/github/computerdaddyguy/jfiletreeprettyprinter/DefaultFileTreePrettyPrinter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public DefaultFileTreePrettyPrinter(PathToTreeScanner scanner, TreeEntryRenderer
2020
@Override
2121
public String prettyPrint(Path path) {
2222
Objects.requireNonNull(path, "path cannot be null");
23+
path = path.toAbsolutePath().normalize();
2324
var tree = scanner.scan(path);
2425
return renderer.renderTree(tree);
2526
}

jfiletreeprettyprinter-example/src/main/resources/emojis/code/lang/file.class

Whitespace-only changes.

jfiletreeprettyprinter-example/src/main/resources/emojis/code/lang/file.jar

Whitespace-only changes.

jfiletreeprettyprinter-example/src/main/resources/emojis/system/file.log

Whitespace-only changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<version>${revision}</version>
88
</parent>
99

10-
<artifactId>jfiletreeprettyprinter-example</artifactId>
10+
<artifactId>jfiletreeprettyprinter-examples</artifactId>
1111

1212

1313
<dependencies>

jfiletreeprettyprinter-example/src/main/java/io/github/computerdaddyguy/jfiletreeprettyprinter/example/BasicUsage.java renamed to jfiletreeprettyprinter-examples/src/main/java/io/github/computerdaddyguy/jfiletreeprettyprinter/example/BasicUsage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class BasicUsage {
66

77
public static void main(String[] args) {
88
var prettyPrinter = FileTreePrettyPrinter.createDefault();
9-
var tree = prettyPrinter.prettyPrint("src/example/resources/base");
9+
var tree = prettyPrinter.prettyPrint("src/main/resources/base");
1010
System.out.println(tree);
1111
}
1212

0 commit comments

Comments
 (0)