eclipse java转maven,使用eclipse-plugin包装将java插件转换成maven项目

I am quite experienced with java but i'm using maven for the first time.

i have installed Eclipse Kepler (Eclipse for RCP and RAP Developers), I have installed Tychus as well with the "add new software" button.

There is an Internet of things project that I cloned and built called OM2M.

I followed the install wiki step by step and everything work until then.

cloning wiki here

I want to develop my own OSGI module so I went to the 'developer' section of the wiki and once again and created a new plugin project.

When i try to convert this plugin project into a maven project ( link to the step i'm talking about ) I don't have to "eclipse-plugin" packaging type for my pom wiki screenshot here.

I looked it up on the web and apparently it has something to do with Tychus that needs configuration, I tried typing it in the box but obviously I have problems when i try to build, I tried editing the main pom.xml with stuff I found but none of them work and I really don't know what to do to make it work.

Do you guys have an idea ?

Thanks

Edit : i forgot to mention that i read this thread but I don't understand the the answers, I don't know where to put the code the top answer is talking about nor do i know where to but the OSGI manifest.

Edit 2 : pom.xml i get when i enter eclipse-plugin by hands :

If i write eclipse-plugin by hand here is my pom.xml :

4.0.0

org.eclipse.om2m

org.eclipse.om2m.sample.ipu

0.0.1-SNAPSHOT

eclipse-plugin

Edit 3 : I managed to remove the error by setting the main pom.xml as a parent but now when i try to build i have the following error :

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.20.0:validate-version (default-validate-version) on project org.eclipse.om2m.sample.ipu: Unqualified OSGi version 1.0.0.qualifier must match unqualified Maven version 0.0.1-SNAPSHOT for SNAPSHOT builds ->

I've searched for the goals but I don't know where to set or edit them.

Edit 4 : Thanks to @Wim Anckaert i've dropped the .qualifier and the .snapshot from the pom.xml and the manifest and now it seems to be working !

Thanks a lot guys.

解决方案

The last error seems to be a problem with the of your ./pom.xml and Bundle-Version of your ./META-INF/MANIFEST.MF file. These should be equal to each other.

A part of our pom.xml:

be.cs.fashion.awg.core

CERPS

2.1.0

eclipse-plugin

A part of our MANIFEST.MF

Bundle-Name: CERPS

Bundle-SymbolicName: be.cs.fashion.awg.core;singleton:=true

Bundle-Version: 2.1.0

Bundle-Localization: plugin

So in your case version in pom.xml version should be "1.0.0-SNAPSHOT" or you should use Bundle-Version "0.0.1.qualifier"

We dropped the "-SNAPSHOT" and the ".qualifier" in our versions.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值