Bael 2989 (#7609)
* Added examples for building Java project with Bazel * Added examples for building Java project with Bazel
This commit is contained in:
committed by
KevinGilmore
parent
39a2838ba0
commit
d3ba9f47ef
@@ -0,0 +1,6 @@
|
||||
|
||||
java_library (
|
||||
name = "greeter",
|
||||
srcs = glob(["src/main/java/com/baeldung/*.java"]),
|
||||
visibility = ["//bazelapp:__pkg__"]
|
||||
)
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user