diff options
author | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-10-05 11:57:34 +0200 |
---|---|---|
committer | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-10-05 11:57:34 +0200 |
commit | 44563f90e571d5121361fb4b124f138f7333961a (patch) | |
tree | cb76deafe5ba2f34d96e4eba07c1975098b6c74d | |
parent | 3b4145fc7829fe7d6023d9da5e7497f26c7df863 (diff) | |
download | maven-nar-plugin-44563f90e571d5121361fb4b124f138f7333961a.tar.gz maven-nar-plugin-44563f90e571d5121361fb4b124f138f7333961a.tar.bz2 maven-nar-plugin-44563f90e571d5121361fb4b124f138f7333961a.tar.xz maven-nar-plugin-44563f90e571d5121361fb4b124f138f7333961a.zip |
Added it0007-lib-shared test
-rw-r--r-- | ReleaseNotes.txt | 2 | ||||
-rw-r--r-- | src/it/it0007-lib-shared/pom.xml | 75 | ||||
-rw-r--r-- | src/it/it0007-lib-shared/src/main/c/HelloWorldLib.c | 7 | ||||
-rw-r--r-- | src/it/it0007-lib-shared/src/main/include/HelloWorldLib.h | 9 | ||||
-rw-r--r-- | src/it/it0007-lib-shared/src/test/c/HelloWorldTest.c | 9 | ||||
-rw-r--r-- | src/site/apt/HelloWorld.apt | 4 |
6 files changed, 103 insertions, 3 deletions
diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 1c96a0a..3b916ff 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -15,7 +15,7 @@ Bugs - Goal for Tests should be Install. -- Excecutable needs a test to run and verify the output of Executable. +- Excecutable needs a test to run and verify the output of Executable for it0001, it0002, it0007 - Resource directory seems in GIT while it should not, it should be generated in target diff --git a/src/it/it0007-lib-shared/pom.xml b/src/it/it0007-lib-shared/pom.xml new file mode 100644 index 0000000..893ced1 --- /dev/null +++ b/src/it/it0007-lib-shared/pom.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<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"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.nar</groupId> + <artifactId>it-parent</artifactId> + <version>1.0-SNAPSHOT</version> + <relativePath>../it-parent/pom.xml</relativePath> + </parent> + + <artifactId>it0007-lib-shared</artifactId> + <packaging>nar</packaging> + + <name>Maven NAR Shared Library</name> + <version>1.0-SNAPSHOT</version> + <description> + Simple shared library and test file + </description> + <url>http://maven.apache.org/</url> +<!-- + <properties> + <maven.test.skip>true</maven.test.skip> + </properties> +--> + + <build> + <defaultGoal>install</defaultGoal> + <plugins> + <plugin> + <artifactId>maven-nar-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <libraries> + <library> + <type>shared</type> + </library> + </libraries> + <tests> + <test> + <name>HelloWorldTest</name> + <link>shared</link> + </test> + </tests> + </configuration> + </plugin> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/src/it/it0007-lib-shared/src/main/c/HelloWorldLib.c b/src/it/it0007-lib-shared/src/main/c/HelloWorldLib.c new file mode 100644 index 0000000..9f65143 --- /dev/null +++ b/src/it/it0007-lib-shared/src/main/c/HelloWorldLib.c @@ -0,0 +1,7 @@ +#include <stdio.h> +#include "HelloWorldLib.h" + +char* HelloWorldLib_sayHello() { + return "Hello NAR LIB World!"; +} + diff --git a/src/it/it0007-lib-shared/src/main/include/HelloWorldLib.h b/src/it/it0007-lib-shared/src/main/include/HelloWorldLib.h new file mode 100644 index 0000000..e801bec --- /dev/null +++ b/src/it/it0007-lib-shared/src/main/include/HelloWorldLib.h @@ -0,0 +1,9 @@ +#ifndef HelloWorldLib_H +#define HelloWorldLib_H + +#ifdef WIN32 +__declspec(dllexport) +#endif +extern char* HelloWorldLib_sayHello(); + +#endif diff --git a/src/it/it0007-lib-shared/src/test/c/HelloWorldTest.c b/src/it/it0007-lib-shared/src/test/c/HelloWorldTest.c new file mode 100644 index 0000000..4aa35d8 --- /dev/null +++ b/src/it/it0007-lib-shared/src/test/c/HelloWorldTest.c @@ -0,0 +1,9 @@ +#include <stdio.h> +#include "HelloWorldLib.h" + +int main(int argc, char *argv[]) { + printf("%s\n", HelloWorldLib_sayHello()); + return 0; +} + + diff --git a/src/site/apt/HelloWorld.apt b/src/site/apt/HelloWorld.apt index 2320979..f6d6c17 100644 --- a/src/site/apt/HelloWorld.apt +++ b/src/site/apt/HelloWorld.apt @@ -36,14 +36,14 @@ There are also some unit test which are run and call the same method. [] - [helloworldsharedlib] A C routine which gets archived into a shared library. A C test executable + [lib-shared] A C routine which gets archived into a shared library. A C test executable is created and run. [helloworldsharedlibexe] A C executable which depends on "helloworldsharedlib" and links dynamically with it. The executable is created and run. [helloworldsharedlibjni] A C routine called from Java, which depends on - "helloworldsharedlib" and links dynamically with it. A Java unit test is provided. + "helloworldsharedlib" and links dynamically with it. [] |