You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Karl Heinz Marbaise <ka...@soebes.de> on 2010/02/11 08:49:43 UTC

maven-nar-plugin (http://duns.github.com/maven-nar-plugin)

Hi to all,

my first question: Is someone else using the above plugin ?

I've started to examine the nar plugin, cause i have a large nunber of
modules (ca. 150) which comprise of C++ code...I'm already using the
rpm-maven-plugin which works very good...but under the hood i'm currently
using cmake ....but i would like to get rid of cmake...

now the next logical step is to search for a module which can do the compile
etc. stuff ....and that's nar's time...

I have tested some small examples where i have some problems:

With the following pom i can let nar compile my files and produce a .so file
from it...but the part for Testing does not work....
    <packaging>nar</packaging>
    <name>Module: example</name>
    <groupId>narexample</groupId>
    <artifactId>com.exmaple</artifactId>
    <version>0.1-SNAPSHOT</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-nar-plugin</artifactId>
                <version>2.1-SNAPSHOT</version>
                <extensions>true</extensions>
                <configuration>
                    <libraries>
                        <library>
                            <type>shared</type>
                        </library>
                    </libraries>
                    <tests>
                        <test>
                            <name>bruch_test</name>
                            <link>static</link>
                        </test>
                    </tests>
                </configuration>
            </plugin>
        </plugins>
    </build>

The problem is that the unit test (bruch_test) depends on an external
library (boost) incl. it's include files and on the other hand the
bruch_test.cxx couldn't find the include files for the class (bruch.cxx)
with it's include file (bruch.hxx)...

I have the following structure:

  +-- src
         +--- main
                 +--- c++  (bruch.cxx, bruch.hxx)
         +--- test
                 +--- c++ (bruch_test.cxx)


May be i oversight the docs where i can configure the include files for the
unit tests and in particular for external libraries and not to forget the
lib itself (-L option for the linker?))

After i do an mvn compile i get the following files:

$ find -type f 
./src/main/c++/bruch.cxx
./src/main/c++/bruch.hxx
./src/test/c++/bruch_test.cxx
./target/nar/aol/amd64-Linux-g++-shared/lib/amd64-Linux-g++/shared/history.xml
./target/nar/aol/amd64-Linux-g++-shared/lib/amd64-Linux-g++/shared/libcom.exmaple-0.1-SNAPSHOT.so
./target/nar/obj/amd64-Linux-g++/history.xml
./target/nar/obj/amd64-Linux-g++/bruch.o
./target/test-nar/obj/amd64-Linux-g++/history.xml
./Makefile
./pom.xml


And an other interesting step would be to run the unit tests (output?) and
code coverage would be great

I can create code coverage using lcov via a Makefile ...but the next step is
to create Maven Plugin to integrated lcov html page into the usual maven
cycle...

So may be others have experience with this plugin 

Thanks in advance.
Kind regards
Karl Heinz Marbaise
-- 
View this message in context: http://old.nabble.com/maven-nar-plugin-%28http%3A--duns.github.com-maven-nar-plugin%29-tp27543417p27543417.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-nar-plugin (http://duns.github.com/maven-nar-plugin)

Posted by Karl Heinz Marbaise <ka...@soebes.de>.
Hi,


hardion wrote:
> We use it (its ancestor freehep-nar-plugin) with 350 modules now.
Hm...a huge things...



> We planned to use a unit test framework and your example is very
> interesting.
I have simply used things from the Boost Library page:
http://www.boost.org/doc/libs/1_42_0/libs/test/doc/html/utf/user-guide/test-organization/auto-test-suite.html

with an idea in C++ the example for every C++ beginner a fraction class...

And started with a Makefile (GNU Make) using g++ and give a combination to
LCOV (http://ltp.sourceforge.net/coverage/lcov.php)

Contacted you via mail...

Kind regards
Karl Heinz Marbaise
-- 
View this message in context: http://old.nabble.com/maven-nar-plugin-%28http%3A--duns.github.com-maven-nar-plugin%29-tp27543417p27568008.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-nar-plugin (http://duns.github.com/maven-nar-plugin)

Posted by Hardion Vincent <vi...@synchrotron-soleil.fr>.
Hi,

We use it (its ancestor freehep-nar-plugin) with 350 modules now.

We planned to use a unit test framework and your example is very
interesting.

Is it possible to send me your example ?

Best regards,

Vincent Hardion



Le jeudi 11 février 2010 à 01:11 -0800, Karl Heinz Marbaise a écrit :
> So it seemed to be a little bit early...
> 
> I have changed the layout of my files:
> .
> |-- pom.xml
> `-- src
>     |-- main
>     |   |-- c++
>     |   |   `-- bruch.cxx
>     |   `-- include
>     |       `-- bruch.hxx
>     `-- test
>         `-- c++
>             `-- bruch_test.cxx
> 
> 
> and now the usual call mvn test or mvn package work like a charm...
> 
> Wow cool...
> 
> Kind regards
> Karl Heinz Marbaise


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-nar-plugin (http://duns.github.com/maven-nar-plugin)

Posted by David Hoffer <dh...@gmail.com>.
Its been a long time since I used it but when I did I had two problems.

It could not handle the concept of different msvc compiler versions, it just
used whatever it found if I recall.
It could not handle the new universal binaries on OS X.

Other than these issues it seemed good but these issues were roadblocks at
the time for us.

-Dave

On Thu, Feb 11, 2010 at 2:11 AM, Karl Heinz Marbaise <ka...@soebes.de> wrote:

>
> So it seemed to be a little bit early...
>
> I have changed the layout of my files:
> .
> |-- pom.xml
> `-- src
>    |-- main
>    |   |-- c++
>    |   |   `-- bruch.cxx
>     |   `-- include
>    |       `-- bruch.hxx
>     `-- test
>        `-- c++
>            `-- bruch_test.cxx
>
>
> and now the usual call mvn test or mvn package work like a charm...
>
> Wow cool...
>
> Kind regards
> Karl Heinz Marbaise
> --
> View this message in context:
> http://old.nabble.com/maven-nar-plugin-%28http%3A--duns.github.com-maven-nar-plugin%29-tp27543417p27544174.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: maven-nar-plugin (http://duns.github.com/maven-nar-plugin)

Posted by Karl Heinz Marbaise <ka...@soebes.de>.
So it seemed to be a little bit early...

I have changed the layout of my files:
.
|-- pom.xml
`-- src
    |-- main
    |   |-- c++
    |   |   `-- bruch.cxx
    |   `-- include
    |       `-- bruch.hxx
    `-- test
        `-- c++
            `-- bruch_test.cxx


and now the usual call mvn test or mvn package work like a charm...

Wow cool...

Kind regards
Karl Heinz Marbaise
-- 
View this message in context: http://old.nabble.com/maven-nar-plugin-%28http%3A--duns.github.com-maven-nar-plugin%29-tp27543417p27544174.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-nar-plugin (http://duns.github.com/maven-nar-plugin)

Posted by Max Spring <m2...@springdot.org>.
Hi Karl Heinz,

I'm trying to mavenize the QEMU (0.12.2) with the Maven NAR plugin, as 
an evaluation/demonstration of the NAR plugin's usefulness.

Following the it0013-gnu-executable example, I'm running into a very 
basic problem: The QEMU's configure script doesn't like the 
'--disable-ccache' parameter.

   [DEBUG] RunCommand: ./configure
   [DEBUG]   '--disable-ccache'
   [DEBUG]   
'--prefix=/nobackup/mspring/nar/qemu-0.12.2/target/nar/gnu/i386-Linux-g++/target'
   [DEBUG] in: 
/nobackup/mspring/nar/qemu-0.12.2/target/nar/gnu/i386-Linux-g++/src
   [INFO] ERROR: unknown option --disable-ccache

This lead me to inspect the NAR plugin's sources.  It didn't look that 
the 'configure' parameters are configurable at the moment.  I'm unclear 
at the moment how to proceed best here.

The other question I have in this context: What would be a good strategy 
for mavenizing subprojects of this codebase, so that they can be built 
individually from source, their binaries then deployed into the group 
repository, which in turn would be consumed by an overall build which no 
longer has to build the subprojects from source.  I assume I should run 
the configure as part of a subproject's build.

At the moment I feel if there were a few good examples, I might get some 
more ideas.
-Max

On 2/10/2010 11:49 PM, Karl Heinz Marbaise wrote:
> Hi to all,
>
> my first question: Is someone else using the above plugin ?
>
> I've started to examine the nar plugin, cause i have a large nunber of
> modules (ca. 150) which comprise of C++ code...I'm already using the
> rpm-maven-plugin which works very good...but under the hood i'm currently
> using cmake ....but i would like to get rid of cmake...
>    
...


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org