* Added examples for building Java project with Bazel

* Added examples for building Java project with Bazel
This commit is contained in:
Sandip Singh
2019-08-23 18:10:59 +05:30
committed by KevinGilmore
parent 39a2838ba0
commit d3ba9f47ef
8 changed files with 130 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
java_library (
name = "greeter",
srcs = glob(["src/main/java/com/baeldung/*.java"]),
visibility = ["//bazelapp:__pkg__"]
)
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<artifactId>bazel</artifactId>
<groupId>com.baeldung</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>bazelgreeting</artifactId>
</project>
@@ -0,0 +1,8 @@
package com.baeldung;
public class Greetings {
public String greet(String name) {
return "Hello ".concat(name);
}
}