Skip to content

Commit 6e556e8

Browse files
committed
Add unit test for multi lib type [shared|static] build
1 parent 6cf8a88 commit 6e556e8

File tree

11 files changed

+555
-0
lines changed

11 files changed

+555
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
#%L
4+
Native ARchive plugin for Maven
5+
%%
6+
Copyright (C) 2002 - 2014 NAR Maven Plugin developers.
7+
%%
8+
Licensed under the Apache License, Version 2.0 (the "License");
9+
you may not use this file except in compliance with the License.
10+
You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing, software
15+
distributed under the License is distributed on an "AS IS" BASIS,
16+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
See the License for the specific language governing permissions and
18+
limitations under the License.
19+
#L%
20+
-->
21+
22+
<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">
23+
<modelVersion>4.0.0</modelVersion>
24+
25+
<parent>
26+
<groupId>com.github.maven-nar.its.nar</groupId>
27+
<artifactId>it0040-pom</artifactId>
28+
<version>1.0-SNAPSHOT</version>
29+
</parent>
30+
31+
<artifactId>it0040-dep-lib-default</artifactId>
32+
<packaging>nar</packaging>
33+
34+
<name>NAR Executable and default Library</name>
35+
<version>1.0-SNAPSHOT</version>
36+
<description>
37+
Executable depending on a library from a mixed type with default linkage.
38+
</description>
39+
40+
<properties>
41+
<skipTests>true</skipTests>
42+
</properties>
43+
44+
<build>
45+
<plugins>
46+
<plugin>
47+
<groupId>@project.groupId@</groupId>
48+
<artifactId>nar-maven-plugin</artifactId>
49+
<extensions>true</extensions>
50+
<configuration>
51+
<c>
52+
<defines>
53+
<define>LIB_IMPORTS</define>
54+
</defines>
55+
</c>
56+
<libraries>
57+
<library>
58+
<type>executable</type>
59+
<!-- <linkCPP>false</linkCPP> -->
60+
</library>
61+
</libraries>
62+
</configuration>
63+
</plugin>
64+
</plugins>
65+
</build>
66+
67+
<dependencies>
68+
<dependency>
69+
<groupId>com.github.maven-nar.its.nar</groupId>
70+
<artifactId>it0040-lib-sharedstatic</artifactId>
71+
<version>1.0-SNAPSHOT</version>
72+
<type>nar</type>
73+
</dependency>
74+
</dependencies>
75+
</project>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* #%L
3+
* Native ARchive plugin for Maven
4+
* %%
5+
* Copyright (C) 2002 - 2014 NAR Maven Plugin developers.
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
#include <stdio.h>
21+
#include "HelloWorldLib.h"
22+
23+
int main(int argc, char *argv[]) {
24+
printf("%s\n", HelloWorldLib_sayHello());
25+
return 0;
26+
}
27+
28+
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
#%L
4+
Native ARchive plugin for Maven
5+
%%
6+
Copyright (C) 2002 - 2014 NAR Maven Plugin developers.
7+
%%
8+
Licensed under the Apache License, Version 2.0 (the "License");
9+
you may not use this file except in compliance with the License.
10+
You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing, software
15+
distributed under the License is distributed on an "AS IS" BASIS,
16+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
See the License for the specific language governing permissions and
18+
limitations under the License.
19+
#L%
20+
-->
21+
22+
<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">
23+
<modelVersion>4.0.0</modelVersion>
24+
25+
<parent>
26+
<groupId>com.github.maven-nar.its.nar</groupId>
27+
<artifactId>it0040-pom</artifactId>
28+
<version>1.0-SNAPSHOT</version>
29+
</parent>
30+
31+
<artifactId>it0040-dep-lib-shared</artifactId>
32+
<packaging>nar</packaging>
33+
34+
<name>NAR Executable and Shared Library</name>
35+
<version>1.0-SNAPSHOT</version>
36+
<description>
37+
Executable depending on a shared library from a mixed type.
38+
</description>
39+
40+
<properties>
41+
<skipTests>true</skipTests>
42+
</properties>
43+
44+
<build>
45+
<plugins>
46+
<plugin>
47+
<groupId>@project.groupId@</groupId>
48+
<artifactId>nar-maven-plugin</artifactId>
49+
<extensions>true</extensions>
50+
<configuration>
51+
<c>
52+
<defines>
53+
<define>LIB_IMPORTS</define>
54+
</defines>
55+
</c>
56+
<libraries>
57+
<library>
58+
<type>executable</type>
59+
<!-- <linkCPP>false</linkCPP> -->
60+
<dependencyBindings>
61+
<dependencyBinding>it0040-lib-sharedstatic:shared</dependencyBinding>
62+
</dependencyBindings>
63+
</library>
64+
</libraries>
65+
</configuration>
66+
</plugin>
67+
</plugins>
68+
</build>
69+
70+
<dependencies>
71+
<dependency>
72+
<groupId>com.github.maven-nar.its.nar</groupId>
73+
<artifactId>it0040-lib-sharedstatic</artifactId>
74+
<version>1.0-SNAPSHOT</version>
75+
<type>nar</type>
76+
</dependency>
77+
</dependencies>
78+
</project>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* #%L
3+
* Native ARchive plugin for Maven
4+
* %%
5+
* Copyright (C) 2002 - 2014 NAR Maven Plugin developers.
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
#include <stdio.h>
21+
#include "HelloWorldLib.h"
22+
23+
int main(int argc, char *argv[]) {
24+
printf("%s\n", HelloWorldLib_sayHello());
25+
return 0;
26+
}
27+
28+
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
#%L
4+
Native ARchive plugin for Maven
5+
%%
6+
Copyright (C) 2002 - 2014 NAR Maven Plugin developers.
7+
%%
8+
Licensed under the Apache License, Version 2.0 (the "License");
9+
you may not use this file except in compliance with the License.
10+
You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing, software
15+
distributed under the License is distributed on an "AS IS" BASIS,
16+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
See the License for the specific language governing permissions and
18+
limitations under the License.
19+
#L%
20+
-->
21+
22+
<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">
23+
<modelVersion>4.0.0</modelVersion>
24+
25+
<parent>
26+
<groupId>com.github.maven-nar.its.nar</groupId>
27+
<artifactId>it0040-pom</artifactId>
28+
<version>1.0-SNAPSHOT</version>
29+
</parent>
30+
31+
<artifactId>it0040-dep-lib-static</artifactId>
32+
<packaging>nar</packaging>
33+
34+
<name>NAR Executable and Static Library</name>
35+
<version>1.0-SNAPSHOT</version>
36+
<description>
37+
Executable depending on a static library from a mixed type.
38+
</description>
39+
40+
<properties>
41+
<skipTests>true</skipTests>
42+
</properties>
43+
44+
<build>
45+
<plugins>
46+
<plugin>
47+
<groupId>@project.groupId@</groupId>
48+
<artifactId>nar-maven-plugin</artifactId>
49+
<extensions>true</extensions>
50+
<configuration>
51+
<libraries>
52+
<library>
53+
<type>executable</type>
54+
<!-- <linkCPP>false</linkCPP> -->
55+
<dependencyBindings>
56+
<dependencyBinding>it0040-lib-sharedstatic:static</dependencyBinding>
57+
</dependencyBindings>
58+
</library>
59+
</libraries>
60+
</configuration>
61+
</plugin>
62+
</plugins>
63+
</build>
64+
65+
<dependencies>
66+
<dependency>
67+
<groupId>com.github.maven-nar.its.nar</groupId>
68+
<artifactId>it0040-lib-sharedstatic</artifactId>
69+
<version>1.0-SNAPSHOT</version>
70+
<type>nar</type>
71+
</dependency>
72+
</dependencies>
73+
</project>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* #%L
3+
* Native ARchive plugin for Maven
4+
* %%
5+
* Copyright (C) 2002 - 2014 NAR Maven Plugin developers.
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
#include <stdio.h>
21+
#include "HelloWorldLib.h"
22+
23+
int main(int argc, char *argv[]) {
24+
printf("%s\n", HelloWorldLib_sayHello());
25+
return 0;
26+
}
27+
28+

0 commit comments

Comments
 (0)