Responses inline.<br><br>Thanks,<br>Lincoln<br><br><div class="gmail_quote">On Thu, Mar 1, 2012 at 4:38 PM, Richard Kennard <span dir="ltr"><<a href="mailto:richard@kennardconsulting.com">richard@kennardconsulting.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Lincoln,<br>
<br>
Can I ask you to clarify some things:<br>
<br>
1. When you say 'compile time dependency' do you mean <scope>provided</scope> or <scope>compile</scope>? I note that hibernate-jpa-api.jar is already<br>
shipped with Forge, so I'd be keen to reuse that rather than embed a new JAR if possible?<br></blockquote><div><br>Either should be fine. Don't worry about re-using dependencies. The idea of Modular classloading is that you can clutter all you want and things will still be isolated here. We're also not concerned with wasting space at this point since plugins are installed separately from the runtime.<br>
</div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
2. Which JAR should I be attaching to? hibernate-jpa-api.jar or persistence-api.jar? Because I don't think the latter is shipped with Forge?<br></blockquote><div><br>Either, see above.<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
3. I've hit half a dozen gotchas like this between unit tests and testing 'for real'. I know I've mentioned this before, but it really brings home the need<br>
for an integration test environment for Forge that is more realistic than forge-test-harness. It'd be awesome if we could move in that direction.<br></blockquote><div><br>It would be awesome :) however, if you could identify specific gotchas, that would help until this becomes a reality.<br>
<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Regards,<br>
<br>
Richard.<br>
<div class="im"><br>
On 2/03/2012 4:22 AM, Lincoln Baxter, III wrote:<br>
> Add the javax.persistence APIs as a compile time dependency to your plugin's POM. This is expected behavior AFAIK.<br>
><br>
> Unfortunately, I believe you are probably seeing these classes resolve in your IDE because of this pom.xml entry:<br>
><br>
> <dependency><br>
> <groupId>org.jboss.forge</groupId><br>
> <artifactId>forge-javaee-impl</artifactId><br>
> <version>${forge.version}</version><br>
> <scope>test</scope><br>
> </dependency><br>
><br>
> Which is needed for testing... Damn the IDEs.<br>
><br>
> ~Lincoln<br>
><br>
</div><div><div class="h5">> On Thu, Mar 1, 2012 at 1:41 AM, Richard Kennard <<a href="mailto:richard@kennardconsulting.com">richard@kennardconsulting.com</a> <mailto:<a href="mailto:richard@kennardconsulting.com">richard@kennardconsulting.com</a>>> wrote:<br>
><br>
> Hi guys,<br>
><br>
> I'm struggling to get the AeroGear plugin working. It runs fine in unit tests, but when packaged as a standalone plugin I get the error below.<br>
><br>
> It appears my module does not have access to javax.persistence.* (hibernate-jpa-2.0-api-1.0.1.Final.jar or similar). How do I declare this dependency?<br>
><br>
> Regards,<br>
><br>
> Richard.<br>
><br>
> ---<br>
><br>
> [test] test $ scaffold from-entity com.test.model.* --scaffoldType aerogear<br>
> java.lang.reflect.InvocationTargetException<br>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
> at java.lang.reflect.Method.invoke(Method.java:597)<br>
> at org.jboss.forge.shell.command.Execution.perform(Execution.java:149)<br>
> at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:125)<br>
> at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:63)<br>
> at org.jboss.forge.shell.ShellImpl$ExecutorThread.run(ShellImpl.java:829)<br>
> at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:852)<br>
> at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:642)<br>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
> at java.lang.reflect.Method.invoke(Method.java:597)<br>
> at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)<br>
> at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)<br>
> at org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.doShell(ShellImpl$Proxy$_$$_WeldClientProxy.java)<br>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
> at java.lang.reflect.Method.invoke(Method.java:597)<br>
> at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)<br>
> at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)<br>
> at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)<br>
> at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)<br>
> at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)<br>
> at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)<br>
> at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)<br>
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)<br>
> at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)<br>
> at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)<br>
> at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)<br>
> at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)<br>
> at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)<br>
> at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:120)<br>
> at java.lang.Thread.run(Thread.java:662)<br>
> Caused by: java.lang.NoClassDefFoundError: javax/persistence/Lob<br>
> at org.metawidget.inspector.jpa.JpaInspector.inspectProperty(JpaInspector.java:86)<br>
> at org.metawidget.inspector.impl.BaseObjectInspector.inspectTraits(BaseObjectInspector.java:343)<br>
> at org.metawidget.inspector.impl.BaseObjectInspector.inspectAsDom(BaseObjectInspector.java:243)<br>
> at org.metawidget.inspector.impl.BaseObjectInspector.inspectAsDom(BaseObjectInspector.java:69)<br>
> at org.metawidget.inspector.composite.CompositeInspector.runInspector(CompositeInspector.java:241)<br>
> at org.metawidget.inspector.composite.CompositeInspector.runInspectors(CompositeInspector.java:220)<br>
> at org.metawidget.inspector.composite.CompositeInspector.inspectAsDom(CompositeInspector.java:167)<br>
> at org.metawidget.inspector.composite.CompositeInspector.inspectAsDom(CompositeInspector.java:151)<br>
> at org.metawidget.inspector.composite.CompositeInspector.inspectAsDom(CompositeInspector.java:53)<br>
> at org.metawidget.pipeline.base.BasePipeline.inspectAsDom(BasePipeline.java:344)<br>
> at org.metawidget.statically.StaticMetawidget.inspect(StaticMetawidget.java:305)<br>
> at org.metawidget.statically.StaticMetawidget.write(StaticMetawidget.java:251)<br>
> at org.jboss.forge.scaffold.aerogear.AeroGearScaffold.generateFromEntity(AeroGearScaffold.java:218)<br>
> at org.jboss.forge.scaffold.plugins.ScaffoldPlugin.generateFromEntity(ScaffoldPlugin.java:174)<br>
> ... 36 more<br>
><br>
> _______________________________________________<br>
> forge-dev mailing list<br>
</div></div>> <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a> <mailto:<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a>><br>
<div class="HOEnZb"><div class="h5">> <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Lincoln Baxter, III<br>
> <a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
> <a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
> "Keep it Simple"<br>
><br>
><br>
> _______________________________________________<br>
> forge-dev mailing list<br>
> <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
<br>
_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com">http://ocpsoft.com</a><br><a href="http://scrumshark.com">http://scrumshark.com</a><br>"Keep it Simple"<br>