将 Acceleo 3 与 Ant 结合使用

发布于 2024-12-12 21:57:38 字数 166 浏览 5 评论 0原文

我正在寻找有关如何使用 Ant 脚本执行 Acceleo 源生成的信息。我已经做了一些谷歌搜索,但我还没有真正找到任何直接的方法来做到这一点。我希望首先在 Eclipse 中执行此操作,但无头(这个词正确吗?)脚本也适合半自动构建。

有人可以提供任何帮助吗?还是我对 Acceleo 功能的期望不合理?

I'm looking for information on how to perform Acceleo source generation with an Ant script. I've done some Googleing, but I haven't really found any straightforward way to do that. I'm looking first to do it in Eclipse, but a headless (is that the right word?) script would also be nice for semi-automatic builds.

Can anyone offer any help? Or are my expectations of what Acceleo can do unreasonable?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

幻想少年梦 2024-12-19 21:57:38

我相信您需要做的就是使用 ant 任务来调用您的生成类。
生成类是沿着包含“@main”注释的 mtl 文件生成的类。

但请注意,生成将以独立模式运行,因此不要使用依赖 eclipse API 的服务!

蚂蚁任务应该是这样的:

<java classname="your.generation.class.GenerateJava"
        classpathref="your.classpath.defined.in.ant">
    <arg value="your/input/model/example.uml"/>
    <arg value="your/target/folder" />
</java>

希望这会有所帮助......

I believe all you need to do is to use a ant task to call your generation class.
The generation class is the one generated along your mtl file that contains an "@main" annotation.

Beware though, the generation will run in standalone mode, so don't use services that rely on eclipse API!

The ant task should look like this:

<java classname="your.generation.class.GenerateJava"
        classpathref="your.classpath.defined.in.ant">
    <arg value="your/input/model/example.uml"/>
    <arg value="your/target/folder" />
</java>

Hope this will help...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文