繁体   English   中英

AspectJ AWS Activity生成失败

[英]AspectJ AWS Activity generation failing

我目前正在使用AspectJ为我的AWS Activity生成客户端实现代码。 这通常对工作流程和活动都非常有效。

值得注意的是我不太了解AspectJ,因为我只使用它来代码生成。

但是我已经达到了一个目的,我希望从一个活动返回一个数组,这可以防止该活动类生成其客户端实现(它也阻止了一些工作流代码生成,但我认为这是一个副作用)。 如果我将数组转换为List(仅用于测试点),则所有接缝都可以再次工作。 我没有问题将数组传递给活动只返回它们。

澄清结构。 我有一个定义活动的接口和一个执行实现的实现类......所以没什么太疯狂的。

破碎:

public String[] myMethod( String a, String b, String c ) throws Exception;

作品:

public List<String> myMethod( String a, String b, String c ) throws Exception;

据我所知,我看不到任何AspectJ编译错误,但我只是真的在看控制台。

我发现的唯一日志显示生成已完成,但它们确实报告总文件生成的计数不同(正如预期的那样,因为它已损坏)。

破碎:

    :B:  9:53:40 Compiler configuration for project TestProj doesn't know previous state, so assuming EVERYTHING has changed.
:B:  9:53:40 ===========================================================================================
:B:  9:53:40 Build kind = FULLBUILD
:B:  9:53:40 Project=TestProj, kind of build requested=Full AspectJ compilation
:B:  9:53:40 Timer event: 0ms: Flush included source file cache
:B:  9:53:40 Timer event: 0ms: Check delta
:B:  9:53:40 Builder: Tidied output folder(s), removed class files and derived resources
:B:  9:53:40 Timer event: 160ms: Pre compile
:B:  9:53:40 Compiler configuration for project TestProj has been read by compiler.  Resetting.
:B:  9:53:40      Configuration was [PROJECTSOURCEFILES_CHANGED, JAVAOPTIONS_CHANGED, ASPECTPATH_CHANGED, CLASSPATH_CHANGED, INPATH_CHANGED, NONSTANDARDOPTIONS_CHANGED, OUTJAR_CHANGED, PROJECTSOURCERESOURCES_CHANGED, OUTPUTDESTINATIONS_CHANGED, INJARS_CHANGED]
:B:  9:53:40 Resetting list of modified source files.  Was null
:C:  9:53:40 Preparing for build: not going to be incremental because no successful previous full build
:C:  9:53:41 Timer event: 850ms: Time to first compiled message
:C:  9:53:41 Timer event: 860ms: Time to first woven message
:C:  9:53:42 AspectJ reports build successful, build was: FULL
:C:  9:53:42 AJDE Callback: finish. Was full build: true
:B:  9:53:42 Timer event: 1560ms: Total time spent in AJDE
:B:  9:53:42 Timer event: 0ms: Refresh after build
:C:  9:53:42 Types affected during build = 166
:B:  9:53:42 Timer event: 2436ms: Total time spent in AJBuilder.build()
:B:  9:53:43 Timer event: 10ms: Update visualizer, xref, advice listeners for (separate thread): TestProj
:B:  9:53:43 Timer event: 20ms: Delete markers: TestProj (Finished deleting markers for TestProj)
:B:  9:53:43 Timer event: 570ms: Create markers: TestProj (Finished creating markers for TestProj)
:B:  9:53:43 Created 7 markers in 176 files

工作:

:B:  9:54:55 Timer event: 0ms: Delete markers: TestProj (Finished deleting markers for TestProj)
:B:  9:55:6 Compiler configuration for project TestProj doesn't know previous state, so assuming EVERYTHING has changed.
:B:  9:55:6 ===========================================================================================
:B:  9:55:6 Build kind = FULLBUILD
:B:  9:55:6 Project=TestProj, kind of build requested=Full AspectJ compilation
:B:  9:55:6 Timer event: 0ms: Flush included source file cache
:B:  9:55:6 Timer event: 0ms: Check delta
:B:  9:55:6 Builder: Tidied output folder(s), removed class files and derived resources
:B:  9:55:6 Timer event: 250ms: Pre compile
:B:  9:55:6 Compiler configuration for project TestProj has been read by compiler.  Resetting.
:B:  9:55:6      Configuration was [PROJECTSOURCEFILES_CHANGED, JAVAOPTIONS_CHANGED, ASPECTPATH_CHANGED, CLASSPATH_CHANGED, INPATH_CHANGED, NONSTANDARDOPTIONS_CHANGED, OUTJAR_CHANGED, PROJECTSOURCERESOURCES_CHANGED, OUTPUTDESTINATIONS_CHANGED, INJARS_CHANGED]
:B:  9:55:6 Resetting list of modified source files.  Was null
:C:  9:55:6 Preparing for build: not going to be incremental because no successful previous full build
:C:  9:55:7 Timer event: 970ms: Time to first compiled message
:C:  9:55:7 Timer event: 970ms: Time to first woven message
:C:  9:55:8 AspectJ reports build successful, build was: FULL
:C:  9:55:8 AJDE Callback: finish. Was full build: true
:B:  9:55:8 Timer event: 2420ms: Total time spent in AJDE
:B:  9:55:8 Timer event: 0ms: Refresh after build
:C:  9:55:10 Types affected during build = 320
:B:  9:55:10 Timer event: 3741ms: Total time spent in AJBuilder.build()
:B:  9:55:10 Timer event: 10ms: Update visualizer, xref, advice listeners for (separate thread): TestProj
:B:  9:55:10 Timer event: 30ms: Delete markers: TestProj (Finished deleting markers for TestProj)
:B:  9:55:10 Timer event: 100ms: Create markers: TestProj (Finished creating markers for TestProj)
:B:  9:55:10 Created 28 markers in 320 files

我不相信日志告诉我什么,但我认为他们可能对别人有意义。

我不愿意使用List实现,因为当活动将收集像int []这样的原语时,我将无法直接将它们转换为List,这只是所有活动的开销。

我会很感激任何建议。

你指的是aws sdk流程框架提供的@activities注释吗? 在这种情况下,它与aspectj无关。 Swf仅在判决逻辑中使用aspectj。 要生成代码,请执行以下任一操作。 如果您正在使用maven,请参阅mavens注释构建器插件。 如果您正在使用eclipse,则在菜单中选择Project - > JavaCompiler - > annotation Processing - > Enable Project Specific Settings,并设置您希望创建基于注释的文件的路径。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM