472,954 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,954 software developers and data experts.

Maven native plugin and JNI

Hi everyone!
I'm in a bit of a problem here:
I have to make a maven project for native (jni & C) code.

I am using this plugin: http://mojo.codehaus.org/maven-nativ...gin/index.html

and trying to make this example build:
(the jni one in svn)

The profile is win32 and MSVC is the compiler provider.

I get the following error:
Expand|Select|Wrap|Line Numbers
  1. [ERROR] 
  3. Maven encountered an error while looking up the following Mojo:
  4. Group-Id: org.codehaus.mojo
  5. Artifact-Id: native-maven-plugin
  6. Version: 1.0-alpha-2
  7. Mojo: compile
  8. brought in via: Direct invocation
  10. Referenced from project:
  11. Group-Id: org.codehaus.mojo.natives.it.jni.win32
  12. Artifact-Id: hello
  13. Version: 1.0-SNAPSHOT
  14. From file: \\Sfil0\UserData$\pjovanovic05\workspace\jni\native\win32\pom.xml
  15. Reason: Unable to lookup component 'org.apache.maven.plugin.Mojo', it could not be started.
  16.       role: org.apache.maven.plugin.Mojo
  17.   roleHint: org.codehaus.mojo:native-maven-plugin:1.0-alpha-2:compile
  18. classRealm: /plugins/org.codehaus.mojo:native-maven-plugin:1.0-alpha-2@48/thread:main
  20. Root cause: Component descriptor cannot be found in the component repository: org.codehaus.mojo.natives.manager.CompilerManager [default] (lookup realm: ClassRealm[/plugins/org.codehaus.mojo:native-maven-plugin:1.0-alpha-2@48/thread:main, parent: ClassRealm[/projects/org.codehaus.mojo.natives.it.jni.win32:hello:1.0-SNAPSHOT/thread:main, parent: ClassRealm[plexus.core, parent: null]]]).
  21.       role: org.codehaus.mojo.natives.manager.CompilerManager
  22.   roleHint: default
  23. classRealm: /plugins/org.codehaus.mojo:native-maven-plugin:1.0-alpha-2@48/thread:main

Anybody seen anything like this?
Jun 4 '08 #1
3 5329
11,448 Expert 8TB
Not knowing Maven the error diagnostic indicates to me that you haven't properly
installed Maven or forgot to set some (class)path variable for it. Check its
installation instructions. The error diagnostic indicates that it can't find one of its
own components.

kind regards,

Jun 4 '08 #2
Yeah, it does look like that, but it's a plugin and maven is pretty much just a bunch of plugins doing stuff.
The installation of the plugin is automated and instructed by POM, and i've literally copied the example from the repository and it breaks there.
I'am trying stuff, but it just wont click.

Thanks anyway!
Jun 4 '08 #3
Ok, so just in case anybody comes across this looking for an answer, I did it, and this is how:

in win32 pom, i've added -LD to <compilerStartOptions> and i gave up on IDEs, just did it from console...
Also I've added user32.lib & advapi32.lib to linkerStartOption (like in the tutorial)
There may have been more changes on my part, but I can't remember all now, and I think these were the key ones.
At first it didn't go, but when I logged on a few hours later it worked without any change. Oh the joy!
Jun 5 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Byron Saltysiak | last post by:
Hi, I'm new to Python and looking to run a large project that would need automated builds and project reports such as unit test coverage. Maven is a great Java software to do this - but is there...
by: valere | last post by:
I look for information for communicating between JavaScript and a native plugin. I noticed that LiveConnect is oriented to communicate as a "bridge" between Java and JS. But how to process with a...
by: Ffelagund | last post by:
Hello I'm trying to load dinamically some dll's but when I try to invoke one method, I ever get ArgumentException if I'm not using native types. Here are the .h of the dll: #pragma once...
by: Ron | last post by:
Hello, I'm attempting to develop a plugin framework for an application that I'm working on. I wish to develop something in which all plugins exist in a directory tree. The framework need only...
by: zaheermabbas | last post by:
Hello All, I have been following the release documentation of axis, i wanted the axis2.war by building the sources, i have downloaded the source, and as it is specified in the doc to build the...
by: WTH | last post by:
I am now aware (I am primarily a C++ developer) that in C# if you reference the same interface from the same file in two different projects the types are actually incompatible. I found this out...
by: radhikams | last post by:
Hi All I have newly started using maven.Im using 2.0.9 .Actually im very much new to it.and my problem is the when im using the command mvn archetype:create ------ im getting build error...
by: popprem | last post by:
hi, I generated classes from a xsd schema with jaxb & did a program to xml reading & writing.Bt wn i cpomlile it through maven it saya that :- annotations are not supported in -source 1.3 (use...
by: jadeite100 | last post by:
Hi All: I am new to displaytag and Maven. I download the displaytag-examples from the url "http://sourceforge.net/projects/displaytag/files/" it is part of the "displaytag-1.2-src.zip" I am using...
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.