Skip to content

Commit 856e148

Browse files
author
Pavel Korshunov
committed
initial
0 parents  commit 856e148

File tree

7 files changed

+159
-0
lines changed

7 files changed

+159
-0
lines changed

.gitignore

Whitespace-only changes.

a/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>xyz.klmn.github</groupId>
8+
<artifactId>muliModule</artifactId>
9+
<version>0.0.1</version>
10+
</parent>
11+
12+
<artifactId>a</artifactId>
13+
<packaging>jar</packaging>
14+
<name>a</name>
15+
</project>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package xyz.klmn.github.multiModule.a;
2+
3+
/**
4+
* Created by Pavel_Korshunov on 7/18/2017.
5+
*/
6+
public class A {
7+
public String doSomething(String text) {
8+
return text.toUpperCase();
9+
}
10+
}

b/pom.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>xyz.klmn.github</groupId>
8+
<artifactId>muliModule</artifactId>
9+
<version>0.0.1</version>
10+
</parent>
11+
12+
<artifactId>b</artifactId>
13+
<packaging>jar</packaging>
14+
<name>b</name>
15+
16+
<build>
17+
<plugins>
18+
<plugin>
19+
<groupId>org.apache.maven.plugins</groupId>
20+
<artifactId>maven-surefire-plugin</artifactId>
21+
</plugin>
22+
</plugins>
23+
</build>
24+
25+
<dependencies>
26+
<dependency>
27+
<groupId>xyz.klmn.github</groupId>
28+
<artifactId>a</artifactId>
29+
<version>0.0.1</version>
30+
</dependency>
31+
<dependency>
32+
<groupId>junit</groupId>
33+
<artifactId>junit</artifactId>
34+
<scope>test</scope>
35+
</dependency>
36+
</dependencies>
37+
38+
</project>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package xyz.klmn.github.multiModule.b;
2+
3+
import xyz.klmn.github.multiModule.a.A;
4+
5+
/**
6+
* Created by Pavel_Korshunov on 7/18/2017.
7+
*/
8+
public class B {
9+
10+
private A a;
11+
private String text;
12+
13+
public A getA() {
14+
return a;
15+
}
16+
17+
public void setA(A a) {
18+
this.a = a;
19+
}
20+
21+
public String getText() {
22+
return text;
23+
}
24+
25+
public void setText(String text) {
26+
this.text = text;
27+
}
28+
29+
public String testAMethod() {
30+
return a.doSomething(text);
31+
}
32+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package xyz.klmn.github.multiModule.b;
2+
3+
import xyz.klmn.github.multiModule.a.A;
4+
5+
import static org.junit.Assert.assertEquals;
6+
7+
import org.junit.Test;
8+
9+
public class BTest {
10+
@Test
11+
public void testAMethod() {
12+
A a = new A();
13+
B b = new B();
14+
b.setA(a);
15+
b.setText("qQq");
16+
assertEquals(a.doSomething("qqQ"), b.testAMethod());
17+
}
18+
}

pom.xml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5+
6+
<modelVersion>4.0.0</modelVersion>
7+
8+
<groupId>xyz.klmn.github</groupId>
9+
<artifactId>muliModule</artifactId>
10+
<version>0.0.1</version>
11+
<packaging>pom</packaging>
12+
13+
<name>root</name>
14+
15+
<description>
16+
Parent Maven POM for the 'Dentsply CQ5 Application' project.
17+
</description>
18+
19+
<modules>
20+
<module>a</module>
21+
<module>b</module>
22+
</modules>
23+
24+
<build>
25+
<pluginManagement>
26+
<plugins>
27+
<plugin>
28+
<groupId>org.apache.maven.plugins</groupId>
29+
<artifactId>maven-surefire-plugin</artifactId>
30+
<version>2.12</version>
31+
</plugin>
32+
</plugins>
33+
</pluginManagement>
34+
</build>
35+
36+
<dependencyManagement>
37+
<dependencies>
38+
<dependency>
39+
<groupId>junit</groupId>
40+
<artifactId>junit</artifactId>
41+
<version>4.11</version>
42+
<scope>test</scope>
43+
</dependency>
44+
</dependencies>
45+
</dependencyManagement>
46+
</project>

0 commit comments

Comments
 (0)