[forge-dev] Generate Code with Forge

Rafael Pestano rmpestano at gmail.com
Mon Oct 24 20:07:00 EDT 2011


Hi there,

I still dont know why it works with alpha4, ive downloaded todays snapshot
and same error, the execution image is here;

alpha4 execution <http://imageshack.us/f/94/forgealpha4.png/>
snapshot execution<http://imageshack.us/photo/my-images/193/forgesnapshot.png/>

im just switching  the FORGE_HOME enviroment variable, generating the plugin
and executing the command.

Im attaching both prompt output in this email, maybe it helps.



2011/10/24 Lincoln Baxter, III <lincolnbaxter at gmail.com>

> Good! Glad you got it working.
>
> I'm concerned that you are using an outdated version of Forge, however. It
> still does not work for you on Beta3 or latest SNAPSHOT versions?
>
> I'd like to figure out why :)
>
> Thanks!
> ~Lincoln
>
>
> On Sun, Oct 23, 2011 at 6:31 PM, Rafael Pestano <rmpestano at gmail.com>wrote:
>
>> Now it's working!!!!! \o/
>>
>> Ive downloaded the alpha4(tried SNAPSHOT, Betas 2 and 3 without success)
>> release and just changed the FORGE_HOME to point to it and solved the
>> injection problem.
>>
>> I also had to add
>>  <dependency>
>>       <groupId>org.jboss.shrinkwrap.descriptors</groupId>
>>       <artifactId>shrinkwrap-descriptors-api</artifactId>
>>       <version>0.1.7</version>
>>     </dependency>
>>
>> in order to use forge-shell-api 1.0.0-SNAPSHOT.
>>
>> And finaly added commons-lang-2.4.jar, commons-collections-3.1 to
>> forge_home/lib
>>
>> and now i can see "Wrote
>> /JAVA/Projetos/Conventions/Conventions/ConventionsLayers/src/main/java/com/jsf/conventions/layers/controller/Per
>> nMBean.java" after my command execution
>>
>> many thanks for your help, keep the great work!
>>
>>
>> 2011/10/23 Lincoln Baxter, III <lincolnbaxter at gmail.com>
>>
>>> Why are you importing @RequestScoped?
>>>
>>> It's possible that is breaking something, though I don't see why it
>>> would. It looks like something else is happening in code that you did not
>>> show. Your plugin does not need to be @Scoped.
>>>
>>> If this still occurs, try injecting Event<PickupResources> event; instead
>>> of injecting the BeanManager, though I don't see why that would make a
>>> difference either ;)
>>>
>>> Hope this helps,
>>> Lincoln
>>>
>>>
>>> On Sun, Oct 23, 2011 at 4:15 PM, Rafael Pestano <rmpestano at gmail.com>wrote:
>>>
>>>> Hi Lincon,
>>>>
>>>> yes i got a look at scaffolding plugins project source but for now im
>>>> getting used to forge so the ideia is create some plugins to see how stuff
>>>> works, but thanks for pointing that.
>>>>
>>>> At the moment im trying to understand how resource injection is done in
>>>> Forge cause i cant inject anything in my plugin.
>>>>
>>>> Ive tried to make my plugin a CDI bean but when i execute the command i
>>>> got " WELD-001303 No active contexts for scope type
>>>> javax.enterprise.context.RequestScoped"
>>>>
>>>> here is my plugin(same as arquillian plugin Paul has pointed out but
>>>> with different velocity templete): http://pastebin.com/nrc3PTz2
>>>> and my pom.xml: http://pastebin.com/etcQYNt4
>>>>
>>>> 2011/10/23 Lincoln Baxter, III <lincolnbaxter at gmail.com>
>>>>
>>>> Hi Rafael!
>>>>>
>>>>> What you want to do sounds really interesting! Have you taken a look at
>>>>> the forge-scaffold-api? Its located as a sub-folder of the github repository
>>>>> that you just cloned.
>>>>>
>>>>> This will let you use the 'scaffold from-entity' command to invoke your
>>>>> code, and it will also let people use the familiar api.  We can also make
>>>>> some improvements to that api if you need it :)
>>>>>
>>>>> --
>>>>> Lincoln Baxter's Droid
>>>>> http://ocpsoft.com
>>>>> "Keep it Simple"
>>>>> On Oct 23, 2011 10:03 AM, "Rafael Pestano" <rmpestano at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> I was meaning just clone it ;)
>>>>>>
>>>>>> Nice to hear about the scaffolding plugin.
>>>>>>
>>>>>> 2011/10/23 Paul Bakker <paul.bakker.nl at gmail.com>
>>>>>>
>>>>>>> Hi Rafael,
>>>>>>>
>>>>>>> What do you mean by clone and forge the project? On github you can
>>>>>>> just clone the plugin-arquillian project and start hacking on it.
>>>>>>> Formatting is a bit of a problem, that doesn't work very well now
>>>>>>> with the builder API. Maybe Lincoln can say more about that?
>>>>>>>
>>>>>>> Note that within a few weeks Forge will have a new scaffolding plugin
>>>>>>> built-in, that does basically something that you are doing in your plugin.
>>>>>>>
>>>>>>> Paul
>>>>>>>
>>>>>>> On Oct 23, 2011, at 3:45 PM, Rafael Pestano wrote:
>>>>>>>
>>>>>>> I've managed to clone forge repo with this address
>>>>>>> https://github.com/forge/core.git now, i was using the old
>>>>>>> github.com/seam/forge.git.
>>>>>>>
>>>>>>> 2011/10/23 Rafael Pestano <rmpestano at gmail.com>
>>>>>>>>
>>>>>>>>> Hello Paul, thanks for your enlightening reply.
>>>>>>>>>
>>>>>>>>> The plugin is about a code generator for a home made Java EE6
>>>>>>>>> framework and for instance it will generate very simple xhtml and java
>>>>>>>>> classes, so for example the generate-controller plugin would generate
>>>>>>>>>
>>>>>>>>> *@ViewAccessScoped
>>>>>>>>> @Named("personMBean")
>>>>>>>>> public class PersonMBean extends AbstractBaseMBean<Person>
>>>>>>>>> implements Serializable, ModalObserver {
>>>>>>>>>
>>>>>>>>>    @Inject
>>>>>>>>>     public void setPersonService(PersonService personService) {*//service
>>>>>>>>> layer will be generated togheter*
>>>>>>>>>         super.setBaseService(personService);
>>>>>>>>>     }
>>>>>>>>>
>>>>>>>>> some other very simple methods
>>>>>>>>> }*
>>>>>>>>>
>>>>>>>>> for the controller-plugin maybe i dont need to understand the model
>>>>>>>>> class (just to import it) cause its just a matter of replacing parammeters
>>>>>>>>> by the domain object but in the view-plugin it will be necessary for sure.
>>>>>>>>>
>>>>>>>>> Another concern i have is how to format the generated code? maybe
>>>>>>>>> the velocity template could help on that.
>>>>>>>>>
>>>>>>>>> Ive seen the Arquillian example, how can i clone it and forge
>>>>>>>>> project?
>>>>>>>>>
>>>>>>>>> Thanks again!
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2011/10/23 Paul Bakker <paul.bakker.nl at gmail.com>
>>>>>>>>>
>>>>>>>>>> Hi Rafael,
>>>>>>>>>>
>>>>>>>>>> There are two things you need to do:
>>>>>>>>>> 1) "understand" the Person class
>>>>>>>>>> 2) generate new code
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>  1)
>>>>>>>>>> You can use a command parameter to get the Person
>>>>>>>>>> class: @Option(name = "class", required = true, type =
>>>>>>>>>> PromptType.JAVA_CLASS) JavaResource classUnderTest
>>>>>>>>>>
>>>>>>>>>> JavaResource is a rich file representation of the class.
>>>>>>>>>> Now you can use the JavaSourceFacet to get information about the
>>>>>>>>>> class itself:
>>>>>>>>>>
>>>>>>>>>> JavaSourceFacet java = project.getFacet(JavaSourceFacet.class);
>>>>>>>>>> JavaSource<?> javaSource = classUnderTest.getJavaSource();
>>>>>>>>>>
>>>>>>>>>> javaSource has methods such as getPackage() etc.
>>>>>>>>>>
>>>>>>>>>> 2)
>>>>>>>>>> Now you have to generate code. There are two ways to do this,
>>>>>>>>>> depending on your needs.
>>>>>>>>>> The most elegant way is to use the "JavaParser" builder API:
>>>>>>>>>>
>>>>>>>>>> JavaClass javaClass = JavaParser.create(JavaClass.class)
>>>>>>>>>>                .setPackage(entityPackage)
>>>>>>>>>>                .setName(entityName)
>>>>>>>>>>                .setPublic()
>>>>>>>>>>                .addAnnotation(Entity.class).getOrigin()
>>>>>>>>>>                .addInterface(Serializable.class);
>>>>>>>>>> Field<JavaClass> id = javaClass.addField("private Long id =
>>>>>>>>>> null;");
>>>>>>>>>> ….
>>>>>>>>>>
>>>>>>>>>> My experience is that this works best for small classes. If you
>>>>>>>>>> need to generate a lot of code it might be better to use a tempting
>>>>>>>>>> framework such as Apache Velocity.
>>>>>>>>>> You can find an example of this in the code of the Arquillian
>>>>>>>>>> plugin:
>>>>>>>>>> https://github.com/forge/plugin-arquillian/blob/master/src/main/java/org/jboss/seam/forge/arquillian/ArquillianPlugin.java#L93
>>>>>>>>>>
>>>>>>>>>> You can just add Velocity to your pom file and it will work.
>>>>>>>>>>
>>>>>>>>>> If you have any more questions, let us know! What kind of plugin
>>>>>>>>>> are you writing?
>>>>>>>>>>
>>>>>>>>>> Paul Bakker
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Oct 23, 2011, at 2:26 AM, Rafael Pestano wrote:
>>>>>>>>>>
>>>>>>>>>> Hi everyone,
>>>>>>>>>>
>>>>>>>>>> this is my first mail to this list and id like to congratulate
>>>>>>>>>> the Forge team for their work.
>>>>>>>>>>
>>>>>>>>>> my question is, what's the best way to generate .java, .xhtml
>>>>>>>>>> files with forge?
>>>>>>>>>>
>>>>>>>>>> Id like to write a plugin which would receive an entity class as
>>>>>>>>>> parameter and generate some code on top of it, eg:
>>>>>>>>>>
>>>>>>>>>> $ generate-service Person
>>>>>>>>>> $ generate-controller Person
>>>>>>>>>> $ generate-view Person
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Where Person is a domain object, is it possible with Forge? if
>>>>>>>>>> yes, whats the best way?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> thanks in advance.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> <http://www.advancedit.com.br/>Att,
>>>>>>>>>>
>>>>>>>>>> Rafael M. Pestano
>>>>>>>>>>
>>>>>>>>>> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
>>>>>>>>>> Sul
>>>>>>>>>> Graduando em Ciência da Computação UFRGS
>>>>>>>>>> _______________________________________________
>>>>>>>>>> forge-dev mailing list
>>>>>>>>>> forge-dev at lists.jboss.org
>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> <http://www.advancedit.com.br/>Att,
>>>>>>>>>
>>>>>>>>> Rafael M. Pestano
>>>>>>>>>
>>>>>>>>> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
>>>>>>>>> Sul
>>>>>>>>> Graduando em Ciência da Computação UFRGS
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> <http://www.advancedit.com.br/>Att,
>>>>>>>>
>>>>>>>> Rafael M. Pestano
>>>>>>>>
>>>>>>>> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
>>>>>>>> Sul
>>>>>>>> Graduando em Ciência da Computação UFRGS
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> <http://www.advancedit.com.br/>Att,
>>>>>>>
>>>>>>> Rafael M. Pestano
>>>>>>>
>>>>>>> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
>>>>>>> Sul
>>>>>>> Graduando em Ciência da Computação UFRGS
>>>>>>> _______________________________________________
>>>>>>> forge-dev mailing list
>>>>>>> forge-dev at lists.jboss.org
>>>>>>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> <http://www.advancedit.com.br/>Att,
>>>>>>
>>>>>> Rafael M. Pestano
>>>>>>
>>>>>> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
>>>>>> Graduando em Ciência da Computação UFRGS
>>>>>>
>>>>>> _______________________________________________
>>>>>> forge-dev mailing list
>>>>>> forge-dev at lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> forge-dev mailing list
>>>>> forge-dev at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> <http://www.advancedit.com.br/>Att,
>>>>
>>>> Rafael M. Pestano
>>>>
>>>> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
>>>> Graduando em Ciência da Computação UFRGS
>>>>
>>>> _______________________________________________
>>>> forge-dev mailing list
>>>> forge-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>>>
>>>>
>>>
>>>
>>> --
>>> Lincoln Baxter, III
>>> http://ocpsoft.com
>>> http://scrumshark.com
>>> "Keep it Simple"
>>>
>>> _______________________________________________
>>> forge-dev mailing list
>>> forge-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>>
>>>
>>
>>
>> --
>> <http://www.advancedit.com.br/>Att,
>>
>> Rafael M. Pestano
>>
>> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
>> Graduando em Ciência da Computação UFRGS
>>
>> _______________________________________________
>> forge-dev mailing list
>> forge-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>
>>
>
>
> --
> Lincoln Baxter, III
> http://ocpsoft.com
> http://scrumshark.com
> "Keep it Simple"
>
> _______________________________________________
> forge-dev mailing list
> forge-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/forge-dev
>
>


-- 
<http://www.advancedit.com.br/>Att,

Rafael M. Pestano

Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20111024/44020ac6/attachment-0001.html 
-------------- next part --------------
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ ConventionsLayers ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ ConventionsLayers ---
[INFO] Surefire report directory: D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ ConventionsLayers ---
[INFO] Building jar: D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers\target\ConventionsLayers-1.0.0-SNAPSHOT.
jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.129s
[INFO] Finished at: Mon Oct 24 21:51:48 BRST 2011
[INFO] Final Memory: 10M/24M
[INFO] ------------------------------------------------------------------------
***SUCCESS*** Build successful.
 ? An existing version of this plugin was found. Replace it? [Y/n] y
***INFO*** Installing plugin artifact.
Wrote /Users/rmpestano/.forge/plugins/com.jsf.conventions.layers$ConventionsLayers$13$1.0.0-SNAPSHOT.jar
***SUCCESS*** Installed from [ConventionsLayers] successfully.
  Windows? Really? Okay...

[no project]  $ cd D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers
[ConventionsLayers] ConventionsLayers $ layers generate-controller --class com.jsf.conventions.layers.model.Person.java

Project:ProjectImpl [ConventionsLayers]
***ERROR*** [layers generate-controller] D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers\src\main\java\com\js
f\conventions\layers\model\Person\jav.java (O sistema nÒo pode encontrar o caminho especificado)
[ConventionsLayers] ConventionsLayers $ layers generate-controller --class com.jsf.conventions.layers.model.Person.java
Project:ProjectImpl [ConventionsLayers]
Choose bean scope

  1 - [RequestScoped]
  2 - [ViewAccessScoped]*
  3 - [ConversationScoped]
  4 - [SessionScoped]

 ? Choose an option by typing the number of the selection [*-default]:  3
***ERROR*** [layers generate-controller] null
[ConventionsLayers] ConventionsLayers $ forge source-plugin D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers
***INFO*** Invoking build with underlying build system.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.jsf.conventions.layers:ConventionsLa
yers:jar:1.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 57, colum
n 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. @ line 64, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ConventionsLayers 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api:jar:0.1.7-SNAPSHOT is missing, no depe
ndency information available
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ ConventionsLayers ---
[INFO] Deleting D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers\target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ ConventionsLayers ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ ConventionsLayers ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 3 source files to D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ ConventionsLayers ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ ConventionsLayers ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ ConventionsLayers ---
[INFO] Surefire report directory: D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ ConventionsLayers ---
[INFO] Building jar: D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers\target\ConventionsLayers-1.0.0-SNAPSHOT.
jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.081s
[INFO] Finished at: Mon Oct 24 21:54:44 BRST 2011
[INFO] Final Memory: 10M/24M
[INFO] ------------------------------------------------------------------------
***SUCCESS*** Build successful.
 ? An existing version of this plugin was found. Replace it? [Y/n] y
***INFO*** Installing plugin artifact.
Wrote /Users/rmpestano/.forge/plugins/com.jsf.conventions.layers$ConventionsLayers$14$1.0.0-SNAPSHOT.jar
***SUCCESS*** Installed from [ConventionsLayers] successfully.
  Windows? Really? Okay...

[ConventionsLayers] ConventionsLayers $ layers generate-controller --class com.jsf.conventions.layers.model.Person.java
Project:ProjectImpl [ConventionsLayers]
Choose bean scope

  1 - [RequestScoped]
  2 - [ViewAccessScoped]*
  3 - [ConversationScoped]
  4 - [SessionScoped]

 ? Choose an option by typing the number of the selection [*-default]:  4
java.lang.NullPointerException
        at com.jsf.conventions.layers.LayersPlugin.generateController(LayersPlugin.java:93)
        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.jboss.forge.shell.command.Execution.perform(Execution.java:144)
        at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:125)
        at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:63)
        at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:696)
        at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:512)
        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.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)
        at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
        at org.jboss.forge.shell.org$jboss$weld$bean-classpath-ManagedBean-org$jboss$forge$shell$ShellImpl[@javax$enterp
rise$context$ApplicationScoped()]{org$jboss$forge$shell$ShellImpl$commandHolder[@javax$inject$Inject()]$org$jboss$forge$
shell$ShellImpl$environment[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$fshRuntime[@javax$inject$Inject()]$o
rg$jboss$forge$shell$ShellImpl$manager[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$parameters[@javax$inject$
Inject()@org$jboss$weld$environment$se$bindings$Parameters()]$org$jboss$forge$shell$ShellImpl$postStartup[@javax$inject$
Inject()]$org$jboss$forge$shell$ShellImpl$projectContext[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$promptT
ypeConverter[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$resourceFactory[@javax$inject$Inject()]$org$jboss$f
orge$shell$ShellImpl$shellConfig[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$shutdown[@javax$inject$Inject()
]$org$jboss$forge$shell$ShellImpl$doShell(org$jboss$forge$shell$events$AcceptUserInput[@javax$enterprise$event$Observes(
during=IN_PROGRESS,notifyObserver=ALWAYS)])$org$jboss$forge$shell$ShellImpl$init(org$jboss$forge$shell$events$Startup[@j
avax$enterprise$event$Observes(during=IN_PROGRESS,notifyObserver=ALWAYS)],org$jboss$forge$shell$completer$PluginCommandC
ompleter)$org$jboss$forge$shell$ShellImpl$teardown(org$jboss$forge$shell$events$Shutdown[@javax$enterprise$event$Observe
s(during=IN_PROGRESS,notifyObserver=ALWAYS)],javax$enterprise$event$Event<org$jboss$forge$shell$events$PreShutdown>)$}_$
$_WeldClientProxy.doShell(org$jboss$weld$bean-classpath-ManagedBean-org$jboss$forge$shell$ShellImpl[@javax$enterprise$co
ntext$ApplicationScoped()]{org$jboss$forge$shell$ShellImpl$commandHolder[@javax$inject$Inject()]$org$jboss$forge$shell$S
hellImpl$environment[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$fshRuntime[@javax$inject$Inject()]$org$jbos
s$forge$shell$ShellImpl$manager[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$parameters[@javax$inject$Inject(
)@org$jboss$weld$environment$se$bindings$Parameters()]$org$jboss$forge$shell$ShellImpl$postStartup[@javax$inject$Inject(
)]$org$jboss$forge$shell$ShellImpl$projectContext[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$promptTypeConv
erter[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$resourceFactory[@javax$inject$Inject()]$org$jboss$forge$sh
ell$ShellImpl$shellConfig[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$shutdown[@javax$inject$Inject()]$org$j
boss$forge$shell$ShellImpl$doShell(org$jboss$forge$shell$events$AcceptUserInput[@javax$enterprise$event$Observes(during=
IN_PROGRESS,notifyObserver=ALWAYS)])$org$jboss$forge$shell$ShellImpl$init(org$jboss$forge$shell$events$Startup[@javax$en
terprise$event$Observes(during=IN_PROGRESS,notifyObserver=ALWAYS)],org$jboss$forge$shell$completer$PluginCommandComplete
r)$org$jboss$forge$shell$ShellImpl$teardown(org$jboss$forge$shell$events$Shutdown[@javax$enterprise$event$Observes(durin
g=IN_PROGRESS,notifyObserver=ALWAYS)],javax$enterprise$event$Event<org$jboss$forge$shell$events$PreShutdown>)$}_$$_WeldC
lientProxy.java)
        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.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
        at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
        at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
        at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
        at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
        at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
        at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)

        at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:270)
        at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253)
        at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:222)
        at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:632)
        at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:619)
        at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:613)
        at org.jboss.forge.shell.Bootstrap$2.run(Bootstrap.java:93)
        at java.lang.Thread.run(Thread.java:662)
[ConventionsLayers] ConventionsLayers $ forge source-plugin D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers
***INFO*** Invoking build with underlying build system.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.jsf.conventions.layers:ConventionsLa
yers:jar:1.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 57, colum
n 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. @ line 64, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[ConventionsLayers] ConventionsLayers $ forge -version
   ____                          _____
  / ___|  ___  __ _ _ __ ___    |  ___|__  _ __ __ _  ___
  \___ \ / _ \/ _` | '_ ` _ \   | |_ / _ \| '__/ _` |/ _ \  \\
   ___) |  __/ (_| | | | | | |  |  _| (_) | | | (_| |  __/  //
  |____/ \___|\__,_|_| |_| |_|  |_|  \___/|_|  \__, |\___|
                                                |___/

Seam Forge, version [ 20110609-1315 ] - JBoss, by Red Hat, Inc. [ http://jboss.org ]
[ConventionsLayers] ConventionsLayers $ forge source-plugin D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers
***INFO*** Invoking build with underlying build system.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.jsf.conventions.layers:ConventionsLa
yers:jar:1.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 57, colum
n 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. @ line 64, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ConventionsLayers 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api:jar:0.1.7-SNAPSHOT is missing, no depe
ndency information available
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ ConventionsLayers ---
[INFO] Deleting D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers\target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ ConventionsLayers ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ ConventionsLayers ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 3 source files to D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ ConventionsLayers ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ ConventionsLayers ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ ConventionsLayers ---
[INFO] Surefire report directory: D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ ConventionsLayers ---
[INFO] Building jar: D:\JAVA\Projetos\Conventions\Conventions\ConventionsLayers\target\ConventionsLayers-1.0.0-SNAPSHOT.
jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.016s
[INFO] Finished at: Mon Oct 24 21:57:17 BRST 2011
[INFO] Final Memory: 10M/24M
[INFO] ------------------------------------------------------------------------
***SUCCESS*** Build successful.
 ? An existing version of this plugin was found. Replace it? [Y/n] y
***INFO*** Installing plugin artifact.
Wrote /Users/rmpestano/.forge/plugins/com.jsf.conventions.layers$ConventionsLayers$16$1.0.0-SNAPSHOT.jar
***SUCCESS*** Installed from [ConventionsLayers] successfully.
  Windows? Really? Okay...

[ConventionsLayers] ConventionsLayers $ layers generate-controller --class com.jsf.conventions.layers.model.Person.java
Project:ProjectImpl [ConventionsLayers]
Choose bean scope

  1 - [RequestScoped]
  2 - [ViewAccessScoped]*
  3 - [ConversationScoped]
  4 - [SessionScoped]

 ? Choose an option by typing the number of the selection [*-default]:  4
Wrote /JAVA/Projetos/Conventions/Conventions/ConventionsLayers/src/main/java/com/jsf/conventions/layers/controller/perso
nMBean.java
[ConventionsLayers] ConventionsLayers $
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: snapshot console output.txt
Url: http://lists.jboss.org/pipermail/forge-dev/attachments/20111024/44020ac6/attachment-0001.txt 


More information about the forge-dev mailing list