473,480 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Maven native plugin and JNI

etiainen
40 New Member
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:
http://mojo.codehaus.org/maven-nativ...s/jni-dll.html
(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] 
  2.  
  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
  9.  
  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
  19.  
  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
  24.  

Anybody seen anything like this?
Jun 4 '08 #1
3 5369
JosAH
11,448 Recognized Expert MVP
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,

Jos
Jun 4 '08 #2
etiainen
40 New Member
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
etiainen
40 New Member
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

1
6663
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...
1
1599
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...
0
391
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...
2
3299
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...
1
2400
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...
7
10566
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...
0
1898
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...
1
1913
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...
0
2151
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...
0
7046
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7048
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7088
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4485
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2997
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.