我正在启动一个项目,涉及为 mailets http://james.apache.org/index.html" rel="nofollow noreferrer">Apache James。据我所知,测试代码更改(在 Windows 上)的唯一方法是通过以下步骤:
- 编译 mailet 代码
- 构建包含 mailet 的 jar 文件
- 将 jar 文件复制到
apps/james 中/SAR-INF/lib
目录
- 从 run.bat 启动 JAMES
- 运行测试
- 通过 telneting 到端口 4555 并发出关闭命令来停止 JAMES(我猜在 Linux 上 SIGTERM 就足够了)
我可以使用 Ant 自动执行所有这些步骤,一些脚本魔法,但我想知道我是否遗漏了一些东西。这里有人有开发邮件的经验吗?您是否使用过类似的过程,或者是否有更简单的方法?
例如,有没有办法让正在运行的 James 实例重新加载 mailets JAR?
I'm starting a project that involves writing mailets for Apache James. As far as I can tell, the only way to test a change in my code (on Windows) is through the following steps:
- Compile the mailet code
- Build a jar file containing the mailet
- Copy the jar file into the
apps/james/SAR-INF/lib
directory
- Start JAMES from run.bat
- Run test
- Stop JAMES by telneting to port 4555 and issuing a shutdown command (I guess on Linux a SIGTERM would suffice)
I can automate all these steps using Ant and some scripting magic, but I was wondering if I was missing something. Does anyone here have experience developing mailets? Did you use a similar process, or is there an easier way?
For example, is there a way to make a running James instance reload the mailets JAR?
发布评论
评论(2)
我使用与你相同的技术。我遵循了我发现的关于 mailet 的唯一好的教程: 与 James 一起工作,第 2 部分:使用匹配器和 mailet 构建基于电子邮件的应用程序
目前,似乎没有任何简单的解决方案来编译和部署 mailet。
I use the same technique than you. I have followed the only good tutorial I have found about mailet: Working with James, Part 2: Build e-mail based applications with matchers and mailets
For the moment It doesn't seem to have any simple solutions to compile and deploy a mailet.
截至 2016 年,它变得更加容易:
啊,如果您发现一些关于此的很棒的最新教程,请毫不犹豫地将其贡献给 James 项目,它是开源的,它将从这样的事情中受益匪浅!
干杯,
伯努瓦
As of 2016, it is way more easier :
Ah and if you find some great, up to date tutorial about this, don't hesitate to contribute it to the James project, it's Open source, and it would benefit much from things like this !
Cheers,
Benoit