File tree Expand file tree Collapse file tree 7 files changed +159
-0
lines changed
src/main/java/xyz/klmn/github/multiModule/a
main/java/xyz/klmn/github/multiModule/b
test/java/xyz/klmn/github/multiModule/b Expand file tree Collapse file tree 7 files changed +159
-0
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments