• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

imagej/example-legacy-plugin: Simple Maven project for an ImageJ 1.x plugin

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

imagej/example-legacy-plugin

开源软件地址(OpenSource Url):

https://github.com/imagej/example-legacy-plugin

开源编程语言(OpenSource Language):

Java 100.0%

开源软件介绍(OpenSource Introduction):

This is an example Maven project implementing an ImageJ 1.x plugin.

For an example Maven project implementing an ImageJ2 command, see: https://github.com/imagej/example-imagej2-command

It is intended as an ideal starting point to develop new ImageJ 1.x plugins in an IDE of your choice. You can even collaborate with developers using a different IDE than you.

  • In Eclipse, for example, it is as simple as File › Import... › Existing Maven Project.

  • In NetBeans, it is even simpler: File › Open Project.

  • The same works in IntelliJ.

  • If jEdit is your preferred IDE, you will need the Maven Plugin.

Die-hard command-line developers can use Maven directly by calling mvn in the project root.

However you build the project, in the end you will have the .jar file (called artifact in Maven speak) in the target/ subdirectory.

To copy the artifact into the correct place, you can call mvn -Dscijava.app.directory=/path/to/ImageJ.app/. This will not only copy your artifact, but also all the dependencies. Restart your ImageJ or call Help › Refresh Menus to see your plugin in the menus.

Developing plugins in an IDE is convenient, especially for debugging. To that end, the plugin contains a main method which sets the plugins.dir system property (so that the plugin is added to the Plugins menu), starts ImageJ, loads an image and runs the plugin. See also this page for information how ImageJ makes it easier to debug in IDEs.

Since this project is intended as a starting point for your own developments, it is in the public domain.

How to use this project as a starting point

  1. Visit this link to create a new repository in your space using this one as a template.

  2. Clone your new repository.

  3. Edit the pom.xml file. Every entry should be pretty self-explanatory. In particular, change

    1. the artifactId (NOTE: should contain a '_' character)
    2. the groupId, ideally to a reverse domain name your organization owns
    3. the version (note that you typically want to use a version number ending in -SNAPSHOT to mark it as a work in progress rather than a final version)
    4. the dependencies (read how to specify the correct groupId/artifactId/version triplet here)
    5. the developer information
    6. the scm information
  4. Remove the Process_Pixels.java file and add your own .java files to src/main/java/<package>/ (if you need supporting files -- like icons -- in the resulting .jar file, put them into src/main/resources/)

  5. Edit src/main/resources/plugins.config

  6. Replace the contents of README.md with information about your project.

  7. Make your initial commit and push the results!

Eclipse: To ensure that Maven copies the plugin to your ImageJ folder

  1. Go to Run Configurations...
  2. Choose Maven Build
  3. Add the following parameter:
    • name: scijava.app.directory
    • value: /path/to/ImageJ.app/

This ensures that the final .jar file will also be copied to your ImageJ plugins folder everytime you run the Maven build.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
bytedeco/javacv: Java interface to OpenCV, FFmpeg, and more发布时间:2022-08-17
下一篇:
mulesoft/mule-esb-maven-tools: ESB Maven Tools发布时间:2022-08-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap