[Fornax-developer] Fornax oAW/MWE Maven2 Plugin V3.0.1 - Generated code into target folder
Hi, I'm trying to configure the Maven 2 plugin in that way to have all the generated code under target/src-gen folder instead src-genbecause it's the maven way... Does anyone has an example how to do so, cause i'm trying that for hours... Many thanks in advance... Kind regards Karl Heinz Marbaise -- View this message in context: http://old.nabble.com/Fornax-oAW-MWE-Maven2-Plugin-V3.0.1---Generated-code-into-target-folder-tp27354657s17564p27354657.html Sent from the Fornax-Platform mailing list archive at Nabble.com. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer
Re: [Fornax-developer] Fornax oAW/MWE Maven2 Plugin V3.0.1 - Generated code into target folder
I don't think you have to do that in the fornax-oaw-m2-plugin. You can do it in the workflow.oaw property name=outlet.src.dir value=target/src-gen/ component id=generator class=oaw.xpand2.Generator skipOnErrors=true fileEncoding=iso-8859-1 metaModel idRef=metamodel/ outlet path=${outlet.src.dir} / In case you use workflows that runs other workflows, such in sculptor, you can override properties. sculptorworkflow.oaw: property name=outlet.src.dir value=src/generated/java/ in application project workflow.oaw: cartridge file=sculptorworkflow.oaw modelFile value=model.btdesign/ appProject value=DDDSample/ outlet.src.dir value=target/src-gen/ /cartridge /Patrik Karl Heinz Marbaise wrote: Hi, I'm trying to configure the Maven 2 plugin in that way to have all the generated code under target/src-gen folder instead src-genbecause it's the maven way... Does anyone has an example how to do so, cause i'm trying that for hours... Many thanks in advance... Kind regards Karl Heinz Marbaise -- View this message in context: http://old.nabble.com/Fornax-oAW-MWE-Maven2-Plugin-V3.0.1---Generated-code-into-target-folder-tp27354657s17564p27355499.html Sent from the Fornax-Platform mailing list archive at Nabble.com. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer
Re: [Fornax-developer] ValueObject + mutable + shallowclone == setid problems
Hi, It is most definitely a bug. I'll have a look at it. .../Andreas On Thu, Jan 28, 2010 at 2:27 PM, Adam Levine adam.l.lev...@gmail.comwrote: I'm trying to come up to speed with Sculptor, and I'm not sure if the problem I'm finding is a bug or operator error: ValueObject Event { !immutable String title Date scheduled !changeable } All compiles fine until it gets to the GUI side, and then I get this: com/foo/web/UpdateScheduleEventsForm.java:[177,24] setId(java.lang.Long) has protected access in com.foo.domain.Event The offending line of code is in the shallowClone method: private Event shallowClone(Event original) { if (original != null) { Event shallowClone = new Event(original.getScheduled()); shallowClone.setId(original.getId()); // Offending line The closest I could find is that the access was at one time changed to protected to allow for manual assignment during testing. However, as the web class is neither a subclass or in the same package, nothing short of changing setId to public will allow this method to work. There are 2 other classes (Create..Form and UpdateEventForm) that are also failing due to the same problem. I'm using what I believe is the current version of items, as so generated by the maven archetype (1.7 snapshot?) and following the tutorial instructions, and it's all OOB in regards to properties for the domain and gui side -- I haven't made any changes or special alterations. I hope this is enough information to be able to point me in the right direction. thank you ! -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com___ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer
Re: [Fornax-developer] ValueObject + mutable + shallowclone == setid problems
Thank you for the quick response and assurance. Is this a case in which using the template overrides or property file could provide a quick and easy workaround to change the setId generator to public? ie: notChangeablePropertySetter.visibility=private to notChangeablePropertySetter.visibility=public -- does this even get applied to id/key fields? or «AROUND templates::DomainObject . I don't know what goes here. thank you again! -- adam Hi, It is most definitely a bug. I'll have a look at it. .../Andreas On Thu, Jan 28, 2010 at 2:27 PM, Adam Levine adam.l.lev...@gmail.comwrote: I'm trying to come up to speed with Sculptor, and I'm not sure if the problem I'm finding is a bug or operator error: -- View this message in context: http://old.nabble.com/ValueObject-%2B-mutable-%2B-shallowclone-%3D%3D-setid-problems-tp27355964s17564p27357398.html Sent from the Fornax-Platform mailing list archive at Nabble.com. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer
Re: [Fornax-developer] Fornax oAW/MWE Maven2 Plugin V3.0.1 - Generated code into target folder
Hi, first thanks for your answer...but the workflow file looks like this: (ref http://www.eclipse.org/Xtext/documentation/latest/xtext.html)... workflow property file=org/xtext/example/GenerateMyDsl.properties/ property name=runtimeProject value=../${projectName}/ bean class=org.eclipse.emf.mwe.utils.StandaloneSetup platformUri=${runtimeProject}/../ !-- component class=org.eclipse.emf.mwe.utils.DirectoryCleaner directory=${runtimeProject}/src-gen/ component class=org.eclipse.emf.mwe.utils.DirectoryCleaner directory=${runtimeProject}.ui/src-gen/ -- component class=org.eclipse.xtext.generator.Generator pathRtProject value=target// pathUiProject value=${runtimeProject}.ui/ projectNameRt value=${projectName}/ projectNameUi value=${projectName}.ui/ language uri=${grammarURI} fileExtensions=${file.extensions} !-- Java API to access grammar elements (required by several other fragments) -- fragment class= org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment/ !-- a lot more simple fragments -- !-- ... -- !-- a sample fragment with a property -- fragment class= org.eclipse.xtext.generator.validation.JavaValidatorFragment composedCheck value=org.eclipse.xtext.validation.ImportUriValidator/ /fragment !-- more simple fragments -- !-- ... -- /language /component /workflow I have tried to change these two entries: pathRtProject value=target/src-gen/ pathUiProject value=target/ui/src-gen/ projectNameRt value=${projectNameRt}/ projectNameUi value=${projectNameUi}/ But the result was first that it says...non existing folders..so i have created them before... After that it converts things i got the following: 3816 [main] INFO ipse.xtext.generator.LanguageConfig - generating infrastructure for ise.intmsglang.IntMsgLang with fragments : ImplicitRuntimeFragment, ImplicitUiFragment, GrammarAccessFragment, EcoreGeneratorFragment, ParseTreeConstructorFragment, ResourceFactoryFragment, DelegatingGeneratorFragment, JavaValidatorFragment, CheckFragment, JavaScopingFragment, FormatterFragment, LabelProviderFragment, TransformerFragment, OutlineNodeAdapterFactoryFragment, JavaBasedContentAssistFragment, DelegatingGeneratorFragment org.eclipse.emf.common.util.WrappedException: java.io.IOException: The path '/src-gen/src-gen/ise/.../XYZPackage.java' is unmapped at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.generateJava(AbstractGeneratorAdapter.java:1112) So may be you have an idea? Kind Regards Karl Heinz Marbaise -- View this message in context: http://old.nabble.com/Fornax-oAW-MWE-Maven2-Plugin-V3.0.1---Generated-code-into-target-folder-tp27354657s17564p27358381.html Sent from the Fornax-Platform mailing list archive at Nabble.com. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer
Re: [Fornax-developer] ValueObject + mutable + shallowclone == setid problems
Yes, you can do a quick workaround while waiting for the fix. In your web project, go to the file: src/main/resources/workflow-gui.oaw And enable the the advice execution by just remove the comments that per default are there. So, it should look like: workflow cartridge file=sculptorguidslworkflow.oaw modelFile value=model.guidesign/ appProject value=foobarbaz-web/ /cartridge component adviceTarget=generator id=reflectionAdvice class=oaw.xpand2.GeneratorAdvice advices value=templates::WebSpecialCases / fileEncoding value=iso-8859-1 / /component /workflow Of course, replace foobarbaz-web with the name of your project. Then, override the code generation for the shallowClone-method by adding the following to the file src/main/resources/templates/WebSpecialCases.xpt: «IMPORT sculptormetamodel» «IMPORT sculptorguimetamodel» «EXTENSION extensions::helper» «EXTENSION extensions::properties» «EXTENSION extensions::guihelper» «AROUND templates::web::JSFCrudGuiJavaForm::shallowClone FOR DomainObject» private «getDomainPackage()».«name» shallowClone(«getDomainPackage()».«name» original) { if (original != null) { «IF getAllSubclasses().size 0-» «FOREACH getAllSubclasses() AS sub-» if (original instanceof «sub.getDomainPackage()».«sub.name») { return shallowClone((«sub.getDomainPackage()».«sub.name») original); } «ENDFOREACH» throw new RuntimeException(Unsupported type); «ELSE-» «getDomainPackage()».«name» shallowClone = new «getDomainPackage()».«name»(«FOREACH getConstructorParameters() AS p SEPARATOR ,»original.get«p.name.toFirstUpper()»()«ENDFOREACH»); «FOREACH getAllAttributes() AS att-» «IF att.changeable att.name != uuid att.name != id-» shallowClone.set«att.name.toFirstUpper()»(original.get«att.name.toFirstUpper()»()); «ENDIF-» «ENDFOREACH» return shallowClone; «ENDIF-» } return null; } «ENDAROUND» We are going to release version 1.7 pretty soon, so the fix will be in there. Thx for finding and reporting it! .../Andreas On Thu, Jan 28, 2010 at 4:04 PM, alevine adam.l.lev...@gmail.com wrote: Thank you for the quick response and assurance. Is this a case in which using the template overrides or property file could provide a quick and easy workaround to change the setId generator to public? ie: notChangeablePropertySetter.visibility=private to notChangeablePropertySetter.visibility=public -- does this even get applied to id/key fields? or «AROUND templates::DomainObject . I don't know what goes here. thank you again! -- adam Hi, It is most definitely a bug. I'll have a look at it. .../Andreas On Thu, Jan 28, 2010 at 2:27 PM, Adam Levine adam.l.lev...@gmail.com wrote: I'm trying to come up to speed with Sculptor, and I'm not sure if the problem I'm finding is a bug or operator error: -- View this message in context: http://old.nabble.com/ValueObject-%2B-mutable-%2B-shallowclone-%3D%3D-setid-problems-tp27355964s17564p27357398.html Sent from the Fornax-Platform mailing list archive at Nabble.com. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com___ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer
Re: [Fornax-developer] ValueObject + mutable + shallowclone == setid problems
Thanks for reporting. We have fixed the issue, http://fornax.itemis.de/jira/browse/CSC-467 CSC-467 , and deployed new snapshot. /Patrik -- View this message in context: http://old.nabble.com/ValueObject-%2B-mutable-%2B-shallowclone-%3D%3D-setid-problems-tp27355964s17564p27358780.html Sent from the Fornax-Platform mailing list archive at Nabble.com. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer
[Fornax-developer] Problem with particular POM from fornax/openarchitectureware
Hi, i have a project which is using the fornax/opernarchitectureware repositories but now i get the message: [WARNING] POM for 'org.eclipse.m2t.xpand:m2t-xpand-xtend-typesystem-xsd:pom:0.7.2:compile' is invalid. Its dependencies (if any) will NOT be available to the current build. Has someone else made the same experience or got the same message? Kind regards Karl Heinz Marbaise -- View this message in context: http://old.nabble.com/Problem-with-particular-POM-from-fornax-openarchitectureware-tp27255091s17564p27255091.html Sent from the Fornax-Platform mailing list archive at Nabble.com. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer
[Fornax-developer] Error during build with Fornax oAW/MWE Maven2 Plugin V3.0.1
Hi, i'm working with Maven 2.2.1 and i got the following failure during the build on command line as well as in Hudson (1.340) Java: java version 1.6.0_07 Java(TM) SE Runtime Environment (build 1.6.0_07-b06) Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode) [INFO] [fornax-oaw-m2:run-workflow {execution: default}] [INFO] Fornax oAW/MWE Maven2 Plugin V3.0.1 [HUDSON] Archiving /home/build/.hudson//modules//0.1.0-SNAPSHOT/pom.xml [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Cannot load or instantiate class org.openarchitectureware.workflow.monitor.NullProgressMonitor [INFO] [INFO] Trace java.lang.IllegalArgumentException: Cannot load or instantiate class org.openarchitectureware.workflow.monitor.NullProgressMonitor at org.fornax.toolsupport.maven2.MojoWorkflowRunner.setProgressMonitorClass(MojoWorkflowRunner.java:82) at org.fornax.toolsupport.maven2.WorkflowMojo.execute(WorkflowMojo.java:271) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at hudson.maven.agent.Main.launch(Main.java:165) at hudson.maven.MavenBuilder.call(MavenBuilder.java:159) at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:688) at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:632) at hudson.remoting.UserRequest.perform(UserRequest.java:104) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Does someone has a hint ? Kind regards Karl Heinz Marbaise -- View this message in context: http://old.nabble.com/Error-during-build-with-Fornax-oAW-MWE-Maven2-Plugin-V3.0.1-tp27255356s17564p27255356.html Sent from the Fornax-Platform mailing list archive at Nabble.com. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer
Re: [Fornax-developer] ValueObject + mutable + shallowclone == setid problems
The problem should be solved in the 1.7.0-snapshot that I deployed yesterday so the workaround is not necessary. Please try it. /Patrik Andreas Källberg-2 wrote: Yes, you can do a quick workaround while waiting for the fix. In your web project, go to the file: src/main/resources/workflow-gui.oaw And enable the the advice execution by just remove the comments that per default are there. So, it should look like: workflow cartridge file=sculptorguidslworkflow.oaw modelFile value=model.guidesign/ appProject value=foobarbaz-web/ /cartridge component adviceTarget=generator id=reflectionAdvice class=oaw.xpand2.GeneratorAdvice advices value=templates::WebSpecialCases / fileEncoding value=iso-8859-1 / /component /workflow Of course, replace foobarbaz-web with the name of your project. Then, override the code generation for the shallowClone-method by adding the following to the file src/main/resources/templates/WebSpecialCases.xpt: «IMPORT sculptormetamodel» «IMPORT sculptorguimetamodel» «EXTENSION extensions::helper» «EXTENSION extensions::properties» «EXTENSION extensions::guihelper» «AROUND templates::web::JSFCrudGuiJavaForm::shallowClone FOR DomainObject» private «getDomainPackage()».«name» shallowClone(«getDomainPackage()».«name» original) { if (original != null) { «IF getAllSubclasses().size 0-» «FOREACH getAllSubclasses() AS sub-» if (original instanceof «sub.getDomainPackage()».«sub.name») { return shallowClone((«sub.getDomainPackage()».«sub.name») original); } «ENDFOREACH» throw new RuntimeException(Unsupported type); «ELSE-» «getDomainPackage()».«name» shallowClone = new «getDomainPackage()».«name»(«FOREACH getConstructorParameters() AS p SEPARATOR ,»original.get«p.name.toFirstUpper()»()«ENDFOREACH»); «FOREACH getAllAttributes() AS att-» «IF att.changeable att.name != uuid att.name != id-» shallowClone.set«att.name.toFirstUpper()»(original.get«att.name.toFirstUpper()»()); «ENDIF-» «ENDFOREACH» return shallowClone; «ENDIF-» } return null; } «ENDAROUND» We are going to release version 1.7 pretty soon, so the fix will be in there. Thx for finding and reporting it! .../Andreas On Thu, Jan 28, 2010 at 4:04 PM, alevine adam.l.lev...@gmail.com wrote: Thank you for the quick response and assurance. Is this a case in which using the template overrides or property file could provide a quick and easy workaround to change the setId generator to public? ie: notChangeablePropertySetter.visibility=private to notChangeablePropertySetter.visibility=public -- does this even get applied to id/key fields? or «AROUND templates::DomainObject . I don't know what goes here. thank you again! -- adam Hi, It is most definitely a bug. I'll have a look at it. .../Andreas On Thu, Jan 28, 2010 at 2:27 PM, Adam Levine adam.l.lev...@gmail.com wrote: I'm trying to come up to speed with Sculptor, and I'm not sure if the problem I'm finding is a bug or operator error: -- View this message in context: http://old.nabble.com/ValueObject-%2B-mutable-%2B-shallowclone-%3D%3D-setid-problems-tp27355964s17564p27357398.html Sent from the Fornax-Platform mailing list archive at Nabble.com. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer -- View this message in context: http://old.nabble.com/ValueObject-%2B-mutable-%2B-shallowclone-%3D%3D-setid-problems-tp27355964s17564p27366930.html Sent from the Fornax-Platform mailing list archive at Nabble.com. -- The Planet: dedicated and managed hosting,