Introduction to Pants Build Tool (#14517)
* Introduction to Pants Build Tool * Introduction to Pants Build Tool * Introduction to Pants Build Tool * Introduction to Pants Build Tool * Introduction to Pants Build Tool
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
java_sources(
|
||||
dependencies=[
|
||||
"src/resources/com/baeldung/hellopant:word",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
|
||||
deploy_jar(
|
||||
name="HelloPant",
|
||||
main="com.baeldung.hellopant",
|
||||
dependencies=[
|
||||
":hellopant",
|
||||
],
|
||||
)
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.baeldung.hellopant;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.io.Resources;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public class Hello {
|
||||
public static void main(String[] args) throws IOException {
|
||||
System.out.println("Hello World!");
|
||||
|
||||
final List<String> names = Lists.newArrayList("John", null, "Jane", "Adam", "Tom");
|
||||
final String result = Joiner.on(",").skipNulls().join(names);
|
||||
|
||||
System.out.println(result);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
resources(name = "word", sources=["word.txt"])
|
||||
@@ -0,0 +1 @@
|
||||
from Us
|
||||
Reference in New Issue
Block a user