From raquelpau at gmail.com Mon Sep 1 12:04:43 2014 From: raquelpau at gmail.com (=?UTF-8?Q?Raquel_Pau_Fern=C3=A1ndez?=) Date: Mon, 1 Sep 2014 18:04:43 +0200 Subject: [forge-dev] creation and test of a forge addon In-Reply-To: <13B72D36-7C86-4B11-A26E-BE68649A43EC@redhat.com> References: <53FCB2AC.1070300@redhat.com> <13B72D36-7C86-4B11-A26E-BE68649A43EC@redhat.com> Message-ID: Hi, Perfect, it was what I need for the first question! About the second question: I would like to generate a Java source file. This java source file has a qualified name given by the user, and must be generated extending from an specific subclass. So, how can I do that with Forge? Thanks Best regards, 2014-09-01 3:34 GMT+02:00 George Gastaldi : > Hi Raquel, > > Sorry about that, it seems we are experiencing some issues in our > infrastructure, we'll fix it asap. > > About your questions: > 1) you need to get the MavenPluginFacet from the Project instance. In your > execute() method (assuming your command extends AbstractProjectUICommand), > do: > > Project project = getSelectedProject(context); > MavenPluginFacet facet = project.getFacet(MavenPluginFacet.class); > facet.addPlugin(...); > > 2) I haven't fully understood this, could you clarify with an example > please? > > I am replying from my phone, so I am not sure if the methods/classes in > the example given matches. > > Best Regards, > > George > > Em 31/08/2014, ?s 18:38, Raquel Pau Fern?ndez > escreveu: > > Hi, > > Your link was broken. However, I have followed the "How to create a JBoss > Forge Addon" of Arun Gupta from http://vimeo.com/jbossdeveloper. > > Currently, I have created an addon, the commands and I have installed my > addon in my local Forge. All runs perfect! :) > > My addon allows: > > 1) To Install walkmod: Creates a fixed walkmod.xml and adds a Maven *plugin > *declaration into the user pom.xml. > 2) To run walkmod: It will run walkmod if it is installed. Otherwise it > will run an embedded version. > 3) To create a walkmod plugin: I need to create a default implementation > of a java class that extends an specific class. > > So, I have 2 questions: > 1) How can I modify the current pom.xml of the user? > 2) How can I create a default implementation of a java class file using > the Forge API? > > Thanks > > > > 2014-08-27 0:57 GMT+02:00 George Gastaldi : > >> Hi Raquel, >> >> The stacktrace doesn't show much. See if anything else is displayed oin >> the logs. >> >> In order to create a command in Forge, you need to use the UI addon >> services. Take a look on: >> http://forge.jboss.org/addon/org.jboss.forge.addon:ui >> >> Let me know how it goes. >> >> Em 26/08/2014, ?s 14:03, Raquel Pau Fern?ndez >> escreveu: >> >> Hi, >> >> 1) the full stacktrace is printed below. >> >> 2) I am using as you have mentioned, the version: 2.8.0.Final. Which >> version do you recommend me? >> >> 3) What do I mean about POJOs: I have coded a facade controller to run >> the walkmod (http://www.walkmod.com) commands - and my plugin is about >> running walkmod from forge. So, I would like to know how to link forge with >> my facade methods / walkmod commands. In other words, I would like to know >> if exists some place to configure it or the names of my facade methods must >> follow some sort of conventions. >> >> Thanks, >> >> ----------------------------Stacktrace---------------------------------- >> java.lang.IllegalStateException: Test runner could not locate test class >> [org.walkmod.forge.WalkmodAddonTest] in any deployed Addon. >> at >> org.jboss.forge.arquillian.ForgeTestMethodExecutor.invoke(ForgeTestMethodExecutor.java:234) >> at >> org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:109) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:606) >> at >> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >> at >> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >> at >> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) >> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) >> at >> org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:606) >> at >> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >> at >> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >> at >> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >> at >> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142) >> at >> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:606) >> at >> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >> at >> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >> at >> org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:606) >> at >> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >> at >> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >> at >> org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:606) >> at >> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >> at >> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >> at >> org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:606) >> at >> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >> at >> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >> at >> org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) >> at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:294) >> at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:269) >> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) >> at >> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) >> at >> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) >> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) >> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) >> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) >> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) >> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) >> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193) >> at >> org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345) >> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49) >> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207) >> at org.junit.runners.ParentRunner.run(ParentRunner.java:309) >> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155) >> at >> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) >> at >> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) >> >> >> >> 2014-08-26 18:15 GMT+02:00 George Gastaldi : >> >>> Hi Raquel, >>> >>> Do you see any stacktraces? Starting from Forge 2.8.0.Final the cause >>> should be displayed as a cause in the exception you are experiencing. >>> I am not sure about your other question. What POJOs are you talking >>> about? Can you clarify? >>> >>> Best Regards, >>> >>> George Gastaldi >>> >>> >>> >>> >>> On 08/26/2014 03:18 AM, Raquel Pau Fern?ndez wrote: >>> >>> Hi, >>> >>> I would like to create a forge addon and I have followed the >>> documentation. >>> >>> I am in the test section of >>> http://forge.jboss.org/document/develop-an-addon and I have the >>> following Exception when I run the first test code from . >>> >>> java.lang.IllegalStateException: Test runner could not locate test >>> class [.....] in any deployed Addon. >>> >>> Obviously, the test needs to fail, but I suspect that I cannot write >>> tests in the same forge addon project. Am I right? How can I correct this >>> Exception? >>> >>> Another question, how does forge link my Forge POJOs with the forge >>> commands? >>> >>> >>> >>> >>> >>> >>> >>> -- >>> Raquel Pau >>> >>> *"Education is the most powerful weapon which you can use to change the >>> world**"* >>> >>> Nelson Mandela >>> >>> personal page: >>> http://sites.google.com/site/raquelpau/ >>> >>> >>> _______________________________________________ >>> forge-dev mailing listforge-dev at lists.jboss.orghttps://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 >>> >> >> >> >> -- >> Raquel Pau >> >> *"Education is the most powerful weapon which you can use to change the >> world**"* >> >> Nelson Mandela >> >> personal page: >> http://sites.google.com/site/raquelpau/ >> >> _______________________________________________ >> 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 >> > > > > -- > Raquel Pau > > *"Education is the most powerful weapon which you can use to change the > world**"* > > Nelson Mandela > > personal page: > http://sites.google.com/site/raquelpau/ > > _______________________________________________ > 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 > -- Raquel Pau *"Education is the most powerful weapon which you can use to change the world**"* Nelson Mandela personal page: http://sites.google.com/site/raquelpau/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20140901/d5206d76/attachment-0001.html From ggastald at redhat.com Mon Sep 1 13:00:49 2014 From: ggastald at redhat.com (George Gastaldi) Date: Mon, 01 Sep 2014 14:00:49 -0300 Subject: [forge-dev] creation and test of a forge addon In-Reply-To: References: <53FCB2AC.1070300@redhat.com> <13B72D36-7C86-4B11-A26E-BE68649A43EC@redhat.com> Message-ID: <5404A641.1040305@redhat.com> Cool, To generate a JavaSource file is easy: String fqn = "com.george.app.MyClass"; String packageName = org.jboss.forge.roaster.model.util.Types.getPackage(fqn); String typeName = org.jboss.forge.roaster.model.util.Types.toSimpleName(fqn); JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class); JavaClassSource source = Roaster.create(JavaClassSource.class).setPackage(packageName) .setName(typeName).setSuperClass(MySuperClass.class); facet.saveJavaSource(source); Best Regards, George On 09/01/2014 01:04 PM, Raquel Pau Fern?ndez wrote: > Hi, > > Perfect, it was what I need for the first question! > > About the second question: I would like to generate a Java source > file. This java source file has a qualified name given by the user, > and must be generated extending from an specific subclass. So, how can > I do that with Forge? > > Thanks > > Best regards, > > > > 2014-09-01 3:34 GMT+02:00 George Gastaldi >: > > Hi Raquel, > > Sorry about that, it seems we are experiencing some issues in our > infrastructure, we'll fix it asap. > > About your questions: > 1) you need to get the MavenPluginFacet from the Project instance. > In your execute() method (assuming your command extends > AbstractProjectUICommand), do: > > Project project = getSelectedProject(context); > MavenPluginFacet facet = project.getFacet(MavenPluginFacet.class); > facet.addPlugin(...); > > 2) I haven't fully understood this, could you clarify with an > example please? > > I am replying from my phone, so I am not sure if the > methods/classes in the example given matches. > > Best Regards, > > George > > Em 31/08/2014, ?s 18:38, Raquel Pau Fern?ndez > escreveu: > >> Hi, >> >> Your link was broken. However, I have followed the "How to create >> a JBoss Forge Addon" of Arun Gupta from >> http://vimeo.com/jbossdeveloper. >> >> Currently, I have created an addon, the commands and I have >> installed my addon in my local Forge. All runs perfect! :) >> >> My addon allows: >> >> 1) To Install walkmod: Creates a fixed walkmod.xml and adds a >> Maven *plugin *declaration into the user pom.xml. >> 2) To run walkmod: It will run walkmod if it is installed. >> Otherwise it will run an embedded version. >> 3) To create a walkmod plugin: I need to create a default >> implementation of a java class that extends an specific class. >> >> So, I have 2 questions: >> 1) How can I modify the current pom.xml of the user? >> 2) How can I create a default implementation of a java class file >> using the Forge API? >> >> Thanks >> >> >> >> 2014-08-27 0:57 GMT+02:00 George Gastaldi > >: >> >> Hi Raquel, >> >> The stacktrace doesn't show much. See if anything else is >> displayed oin the logs. >> >> In order to create a command in Forge, you need to use the UI >> addon services. Take a look on: >> http://forge.jboss.org/addon/org.jboss.forge.addon:ui >> >> Let me know how it goes. >> >> Em 26/08/2014, ?s 14:03, Raquel Pau Fern?ndez >> > escreveu: >> >>> Hi, >>> >>> 1) the full stacktrace is printed below. >>> >>> 2) I am using as you have mentioned, the version: >>> 2.8.0.Final. Which version do you recommend me? >>> >>> 3) What do I mean about POJOs: I have coded a facade >>> controller to run the walkmod (http://www.walkmod.com) >>> commands - and my plugin is about running walkmod from >>> forge. So, I would like to know how to link forge with my >>> facade methods / walkmod commands. In other words, I would >>> like to know if exists some place to configure it or the >>> names of my facade methods must follow some sort of conventions. >>> >>> Thanks, >>> >>> ----------------------------Stacktrace---------------------------------- >>> java.lang.IllegalStateException: Test runner could not >>> locate test class [org.walkmod.forge.WalkmodAddonTest] in >>> any deployed Addon. >>> at >>> org.jboss.forge.arquillian.ForgeTestMethodExecutor.invoke(ForgeTestMethodExecutor.java:234) >>> at >>> org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:109) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at >>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >>> at >>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >>> at >>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) >>> at >>> org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) >>> at >>> org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at >>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >>> at >>> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142) >>> at >>> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at >>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>> at >>> org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at >>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>> at >>> org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at >>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>> at >>> org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at >>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>> at >>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >>> at >>> org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) >>> at >>> org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:294) >>> at >>> org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:269) >>> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) >>> at >>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) >>> at >>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) >>> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) >>> at >>> org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) >>> at >>> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) >>> at >>> org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) >>> at >>> org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) >>> at >>> org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193) >>> at >>> org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345) >>> at >>> org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49) >>> at >>> org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207) >>> at org.junit.runners.ParentRunner.run(ParentRunner.java:309) >>> at >>> org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155) >>> at >>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) >>> at >>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) >>> at >>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) >>> at >>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) >>> at >>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) >>> at >>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) >>> >>> >>> >>> 2014-08-26 18:15 GMT+02:00 George Gastaldi >>> >: >>> >>> Hi Raquel, >>> >>> Do you see any stacktraces? Starting from Forge >>> 2.8.0.Final the cause should be displayed as a cause in >>> the exception you are experiencing. >>> I am not sure about your other question. What POJOs are >>> you talking about? Can you clarify? >>> >>> Best Regards, >>> >>> George Gastaldi >>> >>> >>> >>> >>> On 08/26/2014 03:18 AM, Raquel Pau Fern?ndez wrote: >>>> Hi, >>>> >>>> I would like to create a forge addon and I have >>>> followed the documentation. >>>> >>>> I am in the test section of >>>> http://forge.jboss.org/document/develop-an-addon and I >>>> have the following Exception when I run the first test >>>> code from . >>>> >>>> java.lang.IllegalStateException: Test runner could not >>>> locate test class [.....] in any deployed Addon. >>>> >>>> Obviously, the test needs to fail, but I suspect that I >>>> cannot write tests in the same forge addon project. Am >>>> I right? How can I correct this Exception? >>>> >>>> Another question, how does forge link my Forge POJOs >>>> with the forge commands? >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> Raquel Pau >>>> >>>> /"Education is the most powerful weapon which you can >>>> use to change the world//"/ >>>> Nelson Mandela >>>> >>>> personal page: >>>> http://sites.google.com/site/raquelpau/ >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >>> >>> >>> -- >>> Raquel Pau >>> >>> /"Education is the most powerful weapon which you can use to >>> change the world//"/ >>> Nelson Mandela >>> >>> personal page: >>> http://sites.google.com/site/raquelpau/ >>> _______________________________________________ >>> 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 >> >> >> >> >> -- >> Raquel Pau >> >> /"Education is the most powerful weapon which you can use to >> change the world//"/ >> Nelson Mandela >> >> personal page: >> http://sites.google.com/site/raquelpau/ >> _______________________________________________ >> 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 > > > > > -- > Raquel Pau > > /"Education is the most powerful weapon which you can use to change > the world//"/ > Nelson Mandela > > personal page: > http://sites.google.com/site/raquelpau/ > > > _______________________________________________ > forge-dev mailing list > forge-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/forge-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20140901/e447c276/attachment-0001.html From raquelpau at gmail.com Mon Sep 1 16:56:36 2014 From: raquelpau at gmail.com (=?UTF-8?Q?Raquel_Pau_Fern=C3=A1ndez?=) Date: Mon, 1 Sep 2014 22:56:36 +0200 Subject: [forge-dev] creation and test of a forge addon In-Reply-To: <5404A641.1040305@redhat.com> References: <53FCB2AC.1070300@redhat.com> <13B72D36-7C86-4B11-A26E-BE68649A43EC@redhat.com> <5404A641.1040305@redhat.com> Message-ID: Thanks for your help! Perfect. Right now, I have a little problem building the plugin because when I build the project (with Forge - using addon-build-and-install or just with mvn-install) the process never ends..Constantly, mvn is creating the .dot file. If you don't know what is happeing I will start again from the scratch. If it can help you, my mvn version is 3.2.2 The output of mvn is as follows: .... Configuring mojo org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final:generate-dot from plugin realm ClassRealm[plugin>org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final, parent: sun.misc.Launcher$AppClassLoader at 2bbd86] [DEBUG] Configuring mojo 'org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final:generate-dot' with basic configurator --> [DEBUG] (f) attach = true [DEBUG] (f) classifier = forge-addon [DEBUG] (f) includeTransitiveAddons = true [DEBUG] (f) outputDirectory = C:\Users\rpau\workspace\walkmod\walkmod\target\classes/META-INF/resources [DEBUG] (f) settings = org.apache.maven.execution.SettingsAdapter at fb8996 [DEBUG] (f) mavenProject = MavenProject: org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT @ C:\Users\rpau\workspace\walkmod\walkmod\pom.xml [DEBUG] -- end configuration -- [INFO] Generating C:\Users\rpau\workspace\walkmod\walkmod\target\classes\META-INF\resources\walkmod-1.0.0-SNAPSHOT.dot [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\rpau\.m2\repository [DEBUG] Skipped remote update check for org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT/maven-metadata.xml, locally installed metadata up-to-date. [DEBUG] Skipped remote update check for org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT/maven-metadata.xml, locally installed metadata up-to-date. [DEBUG] Skipped remote update check for org.walkmod:walkmod-cmd/maven-metadata.xml, locally cached metadata up-to-date. [DEBUG] Skipped remote update check for org.walkmod:walkmod-core/maven-metadata.xml, locally cached metadata up-to-date. [DEBUG] Skipped remote update check for org.walkmod:merger/maven-metadata.xml, locally cached metadata up-to-date. [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=128, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=28, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, ConflictResolver.conflictItemCount=49, DefaultDependencyCollector.collectTime=162, DefaultDependencyCollector.transformTime=1} [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, ConflictMarker.markTime=0, ConflictMarker.nodeCount=159, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=37, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, ConflictResolver.conflictItemCount=159, DefaultDependencyCollector.collectTime=294, DefaultDependencyCollector.transformTime=3} [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, ConflictMarker.markTime=0, ConflictMarker.nodeCount=52, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=24, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=35, DefaultDependencyCollector.collectTime=151, DefaultDependencyCollector.transformTime=1} [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=2, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=2, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=2, DefaultDependencyCollector.collectTime=6, DefaultDependencyCollector.transformTime=0} [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=23, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=23, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=23, DefaultDependencyCollector.collectTime=8, DefaultDependencyCollector.transformTime=0} [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=157, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=36, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, ConflictResolver.conflictItemCount=157, DefaultDependencyCollector.collectTime=10, DefaultDependencyCollector.transformTime=2} [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=10, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=10, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, ConflictResolver.conflictItemCount=10, DefaultDependencyCollector.collectTime=41, DefaultDependencyCollector.transformTime=1} ...continues in the same way... Thanks ...... 2014-09-01 19:00 GMT+02:00 George Gastaldi : > Cool, > > To generate a JavaSource file is easy: > > String fqn = "com.george.app.MyClass"; > String packageName = > org.jboss.forge.roaster.model.util.Types.getPackage(fqn); > String typeName = > org.jboss.forge.roaster.model.util.Types.toSimpleName(fqn); > JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class); > JavaClassSource source = > Roaster.create(JavaClassSource.class).setPackage(packageName) > .setName(typeName).setSuperClass(MySuperClass.class); > facet.saveJavaSource(source); > > Best Regards, > > George > > > On 09/01/2014 01:04 PM, Raquel Pau Fern?ndez wrote: > > Hi, > > Perfect, it was what I need for the first question! > > About the second question: I would like to generate a Java source file. > This java source file has a qualified name given by the user, and must be > generated extending from an specific subclass. So, how can I do that with > Forge? > > Thanks > > Best regards, > > > > 2014-09-01 3:34 GMT+02:00 George Gastaldi : > >> Hi Raquel, >> >> Sorry about that, it seems we are experiencing some issues in our >> infrastructure, we'll fix it asap. >> >> About your questions: >> 1) you need to get the MavenPluginFacet from the Project instance. In >> your execute() method (assuming your command extends >> AbstractProjectUICommand), do: >> >> Project project = getSelectedProject(context); >> MavenPluginFacet facet = project.getFacet(MavenPluginFacet.class); >> facet.addPlugin(...); >> >> 2) I haven't fully understood this, could you clarify with an example >> please? >> >> I am replying from my phone, so I am not sure if the methods/classes in >> the example given matches. >> >> Best Regards, >> >> George >> >> Em 31/08/2014, ?s 18:38, Raquel Pau Fern?ndez >> escreveu: >> >> Hi, >> >> Your link was broken. However, I have followed the "How to create a >> JBoss Forge Addon" of Arun Gupta from http://vimeo.com/jbossdeveloper. >> >> Currently, I have created an addon, the commands and I have installed >> my addon in my local Forge. All runs perfect! :) >> >> My addon allows: >> >> 1) To Install walkmod: Creates a fixed walkmod.xml and adds a Maven *plugin >> *declaration into the user pom.xml. >> 2) To run walkmod: It will run walkmod if it is installed. Otherwise it >> will run an embedded version. >> 3) To create a walkmod plugin: I need to create a default >> implementation of a java class that extends an specific class. >> >> So, I have 2 questions: >> 1) How can I modify the current pom.xml of the user? >> 2) How can I create a default implementation of a java class file using >> the Forge API? >> >> Thanks >> >> >> >> 2014-08-27 0:57 GMT+02:00 George Gastaldi : >> >>> Hi Raquel, >>> >>> The stacktrace doesn't show much. See if anything else is displayed >>> oin the logs. >>> >>> In order to create a command in Forge, you need to use the UI addon >>> services. Take a look on: >>> http://forge.jboss.org/addon/org.jboss.forge.addon:ui >>> >>> Let me know how it goes. >>> >>> Em 26/08/2014, ?s 14:03, Raquel Pau Fern?ndez >>> escreveu: >>> >>> Hi, >>> >>> 1) the full stacktrace is printed below. >>> >>> 2) I am using as you have mentioned, the version: 2.8.0.Final. Which >>> version do you recommend me? >>> >>> 3) What do I mean about POJOs: I have coded a facade controller to run >>> the walkmod (http://www.walkmod.com) commands - and my plugin is about >>> running walkmod from forge. So, I would like to know how to link forge with >>> my facade methods / walkmod commands. In other words, I would like to know >>> if exists some place to configure it or the names of my facade methods must >>> follow some sort of conventions. >>> >>> Thanks, >>> >>> >>> ----------------------------Stacktrace---------------------------------- >>> java.lang.IllegalStateException: Test runner could not locate test >>> class [org.walkmod.forge.WalkmodAddonTest] in any deployed Addon. >>> at >>> org.jboss.forge.arquillian.ForgeTestMethodExecutor.invoke(ForgeTestMethodExecutor.java:234) >>> at >>> org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:109) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at >>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >>> at >>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >>> at >>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) >>> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) >>> at >>> org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at >>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >>> at >>> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142) >>> at >>> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at >>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>> at >>> org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at >>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>> at >>> org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at >>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>> at >>> org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:606) >>> at >>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>> at >>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>> at >>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >>> at >>> org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) >>> at >>> org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:294) >>> at >>> org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:269) >>> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) >>> at >>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) >>> at >>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) >>> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) >>> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) >>> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) >>> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) >>> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) >>> at >>> org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193) >>> at >>> org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345) >>> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49) >>> at >>> org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207) >>> at org.junit.runners.ParentRunner.run(ParentRunner.java:309) >>> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155) >>> at >>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) >>> at >>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) >>> at >>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) >>> at >>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) >>> at >>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) >>> at >>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) >>> >>> >>> >>> 2014-08-26 18:15 GMT+02:00 George Gastaldi : >>> >>>> Hi Raquel, >>>> >>>> Do you see any stacktraces? Starting from Forge 2.8.0.Final the cause >>>> should be displayed as a cause in the exception you are experiencing. >>>> I am not sure about your other question. What POJOs are you talking >>>> about? Can you clarify? >>>> >>>> Best Regards, >>>> >>>> George Gastaldi >>>> >>>> >>>> >>>> >>>> On 08/26/2014 03:18 AM, Raquel Pau Fern?ndez wrote: >>>> >>>> Hi, >>>> >>>> I would like to create a forge addon and I have followed the >>>> documentation. >>>> >>>> I am in the test section of >>>> http://forge.jboss.org/document/develop-an-addon and I have the >>>> following Exception when I run the first test code from . >>>> >>>> java.lang.IllegalStateException: Test runner could not locate test >>>> class [.....] in any deployed Addon. >>>> >>>> Obviously, the test needs to fail, but I suspect that I cannot write >>>> tests in the same forge addon project. Am I right? How can I correct this >>>> Exception? >>>> >>>> Another question, how does forge link my Forge POJOs with the forge >>>> commands? >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> Raquel Pau >>>> >>>> *"Education is the most powerful weapon which you can use to change the >>>> world**"* >>>> >>>> Nelson Mandela >>>> >>>> personal page: >>>> http://sites.google.com/site/raquelpau/ >>>> >>>> >>>> _______________________________________________ >>>> forge-dev mailing listforge-dev at lists.jboss.orghttps://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 >>>> >>> >>> >>> >>> -- >>> Raquel Pau >>> >>> *"Education is the most powerful weapon which you can use to change the >>> world**"* >>> >>> Nelson Mandela >>> >>> personal page: >>> http://sites.google.com/site/raquelpau/ >>> >>> _______________________________________________ >>> 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 >>> >> >> >> >> -- >> Raquel Pau >> >> *"Education is the most powerful weapon which you can use to change the >> world**"* >> >> Nelson Mandela >> >> personal page: >> http://sites.google.com/site/raquelpau/ >> >> _______________________________________________ >> 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 >> > > > > -- > Raquel Pau > > *"Education is the most powerful weapon which you can use to change the > world**"* > > Nelson Mandela > > personal page: > http://sites.google.com/site/raquelpau/ > > > _______________________________________________ > forge-dev mailing listforge-dev at lists.jboss.orghttps://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 > -- Raquel Pau *"Education is the most powerful weapon which you can use to change the world**"* Nelson Mandela personal page: http://sites.google.com/site/raquelpau/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20140901/d3705367/attachment-0001.html From ggastald at redhat.com Mon Sep 1 16:58:51 2014 From: ggastald at redhat.com (George Gastaldi) Date: Mon, 01 Sep 2014 17:58:51 -0300 Subject: [forge-dev] creation and test of a forge addon In-Reply-To: References: <53FCB2AC.1070300@redhat.com> <13B72D36-7C86-4B11-A26E-BE68649A43EC@redhat.com> <5404A641.1040305@redhat.com> Message-ID: <5404DE0B.8090204@redhat.com> Can you post your pom.xml somewhere? In the meanwhile, remove the generate-dot execution from your pom.xml. It's not used atm. Thanks On 09/01/2014 05:56 PM, Raquel Pau Fern?ndez wrote: > Thanks for your help! > > Perfect. > > Right now, I have a little problem building the plugin because when I > build the project (with Forge - using addon-build-and-install or just > with mvn-install) the process never ends..Constantly, mvn is creating > the .dot file. > > If you don't know what is happeing I will start again from the scratch. > > If it can help you, my mvn version is 3.2.2 > > The output of mvn is as follows: > .... > Configuring mojo > org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final:generate-dot > from plugin realm > ClassRealm[plugin>org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final, > parent: sun.misc.Launcher$AppClassLoader at 2bbd86] > [DEBUG] Configuring mojo > 'org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final:generate-dot' with > basic configurator --> > [DEBUG] (f) attach = true > [DEBUG] (f) classifier = forge-addon > [DEBUG] (f) includeTransitiveAddons = true > [DEBUG] (f) outputDirectory = > C:\Users\rpau\workspace\walkmod\walkmod\target\classes/META-INF/resources > [DEBUG] (f) settings = org.apache.maven.execution.SettingsAdapter at fb8996 > [DEBUG] (f) mavenProject = MavenProject: > org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT @ > C:\Users\rpau\workspace\walkmod\walkmod\pom.xml > [DEBUG] -- end configuration -- > [INFO] Generating > C:\Users\rpau\workspace\walkmod\walkmod\target\classes\META-INF\resources\walkmod-1.0.0-SNAPSHOT.dot > [DEBUG] Using manager EnhancedLocalRepositoryManager with priority > 10.0 for C:\Users\rpau\.m2\repository > [DEBUG] Skipped remote update check for > org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT/maven-metadata.xml, > locally installed metadata up-to-date. > [DEBUG] Skipped remote update check for > org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT/maven-metadata.xml, > locally installed metadata up-to-date. > [DEBUG] Skipped remote update check for > org.walkmod:walkmod-cmd/maven-metadata.xml, locally cached metadata > up-to-date. > [DEBUG] Skipped remote update check for > org.walkmod:walkmod-core/maven-metadata.xml, locally cached metadata > up-to-date. > [DEBUG] Skipped remote update check for > org.walkmod:merger/maven-metadata.xml, locally cached metadata up-to-date. > [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, > ConflictMarker.markTime=0, ConflictMarker.nodeCount=128, > ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, > ConflictIdSorter.conflictIdCount=28, > ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, > ConflictResolver.conflictItemCount=49, > DefaultDependencyCollector.collectTime=162, > DefaultDependencyCollector.transformTime=1} > [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, > ConflictMarker.markTime=0, ConflictMarker.nodeCount=159, > ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, > ConflictIdSorter.conflictIdCount=37, > ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, > ConflictResolver.conflictItemCount=159, > DefaultDependencyCollector.collectTime=294, > DefaultDependencyCollector.transformTime=3} > [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, > ConflictMarker.markTime=0, ConflictMarker.nodeCount=52, > ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, > ConflictIdSorter.conflictIdCount=24, > ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, > ConflictResolver.conflictItemCount=35, > DefaultDependencyCollector.collectTime=151, > DefaultDependencyCollector.transformTime=1} > [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, > ConflictMarker.markTime=0, ConflictMarker.nodeCount=2, > ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, > ConflictIdSorter.conflictIdCount=2, > ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, > ConflictResolver.conflictItemCount=2, > DefaultDependencyCollector.collectTime=6, > DefaultDependencyCollector.transformTime=0} > [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, > ConflictMarker.markTime=0, ConflictMarker.nodeCount=23, > ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, > ConflictIdSorter.conflictIdCount=23, > ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, > ConflictResolver.conflictItemCount=23, > DefaultDependencyCollector.collectTime=8, > DefaultDependencyCollector.transformTime=0} > [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, > ConflictMarker.markTime=0, ConflictMarker.nodeCount=157, > ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, > ConflictIdSorter.conflictIdCount=36, > ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, > ConflictResolver.conflictItemCount=157, > DefaultDependencyCollector.collectTime=10, > DefaultDependencyCollector.transformTime=2} > [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, > ConflictMarker.markTime=0, ConflictMarker.nodeCount=10, > ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, > ConflictIdSorter.conflictIdCount=10, > ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, > ConflictResolver.conflictItemCount=10, > DefaultDependencyCollector.collectTime=41, > DefaultDependencyCollector.transformTime=1} > ...continues in the same way... > > Thanks > ...... > > > > 2014-09-01 19:00 GMT+02:00 George Gastaldi >: > > Cool, > > To generate a JavaSource file is easy: > > String fqn = "com.george.app.MyClass"; > String packageName = > org.jboss.forge.roaster.model.util.Types.getPackage(fqn); > String typeName = > org.jboss.forge.roaster.model.util.Types.toSimpleName(fqn); > JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class); > JavaClassSource source = > Roaster.create(JavaClassSource.class).setPackage(packageName) > .setName(typeName).setSuperClass(MySuperClass.class); > facet.saveJavaSource(source); > > Best Regards, > > George > > > On 09/01/2014 01:04 PM, Raquel Pau Fern?ndez wrote: >> Hi, >> >> Perfect, it was what I need for the first question! >> >> About the second question: I would like to generate a Java source >> file. This java source file has a qualified name given by the >> user, and must be generated extending from an specific subclass. >> So, how can I do that with Forge? >> >> Thanks >> >> Best regards, >> >> >> >> 2014-09-01 3:34 GMT+02:00 George Gastaldi > >: >> >> Hi Raquel, >> >> Sorry about that, it seems we are experiencing some issues in >> our infrastructure, we'll fix it asap. >> >> About your questions: >> 1) you need to get the MavenPluginFacet from the Project >> instance. In your execute() method (assuming your command >> extends AbstractProjectUICommand), do: >> >> Project project = getSelectedProject(context); >> MavenPluginFacet facet = >> project.getFacet(MavenPluginFacet.class); >> facet.addPlugin(...); >> >> 2) I haven't fully understood this, could you clarify with an >> example please? >> >> I am replying from my phone, so I am not sure if the >> methods/classes in the example given matches. >> >> Best Regards, >> >> George >> >> Em 31/08/2014, ?s 18:38, Raquel Pau Fern?ndez >> > escreveu: >> >>> Hi, >>> >>> Your link was broken. However, I have followed the "How to >>> create a JBoss Forge Addon" of Arun Gupta from >>> http://vimeo.com/jbossdeveloper. >>> >>> Currently, I have created an addon, the commands and I have >>> installed my addon in my local Forge. All runs perfect! :) >>> >>> My addon allows: >>> >>> 1) To Install walkmod: Creates a fixed walkmod.xml and adds >>> a Maven *plugin *declaration into the user pom.xml. >>> 2) To run walkmod: It will run walkmod if it is installed. >>> Otherwise it will run an embedded version. >>> 3) To create a walkmod plugin: I need to create a default >>> implementation of a java class that extends an specific class. >>> >>> So, I have 2 questions: >>> 1) How can I modify the current pom.xml of the user? >>> 2) How can I create a default implementation of a java class >>> file using the Forge API? >>> >>> Thanks >>> >>> >>> >>> 2014-08-27 0:57 GMT+02:00 George Gastaldi >>> >: >>> >>> Hi Raquel, >>> >>> The stacktrace doesn't show much. See if anything else >>> is displayed oin the logs. >>> >>> In order to create a command in Forge, you need to use >>> the UI addon services. Take a look on: >>> http://forge.jboss.org/addon/org.jboss.forge.addon:ui >>> >>> Let me know how it goes. >>> >>> Em 26/08/2014, ?s 14:03, Raquel Pau Fern?ndez >>> > escreveu: >>> >>>> Hi, >>>> >>>> 1) the full stacktrace is printed below. >>>> >>>> 2) I am using as you have mentioned, the version: >>>> 2.8.0.Final. Which version do you recommend me? >>>> >>>> 3) What do I mean about POJOs: I have coded a facade >>>> controller to run the walkmod (http://www.walkmod.com) >>>> commands - and my plugin is about running walkmod from >>>> forge. So, I would like to know how to link forge with >>>> my facade methods / walkmod commands. In other words, I >>>> would like to know if exists some place to configure it >>>> or the names of my facade methods must follow some sort >>>> of conventions. >>>> >>>> Thanks, >>>> >>>> ----------------------------Stacktrace---------------------------------- >>>> java.lang.IllegalStateException: Test runner could not >>>> locate test class [org.walkmod.forge.WalkmodAddonTest] >>>> in any deployed Addon. >>>> at >>>> org.jboss.forge.arquillian.ForgeTestMethodExecutor.invoke(ForgeTestMethodExecutor.java:234) >>>> at >>>> org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:109) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>> Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>> at >>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >>>> at >>>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >>>> at >>>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) >>>> at >>>> org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) >>>> at >>>> org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>> Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>> at >>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >>>> at >>>> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142) >>>> at >>>> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>> Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>> at >>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>> at >>>> org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>> Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>> at >>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>> at >>>> org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>> Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>> at >>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>> at >>>> org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>> Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>> at >>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>> at >>>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >>>> at >>>> org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) >>>> at >>>> org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:294) >>>> at >>>> org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:269) >>>> at >>>> org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) >>>> at >>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) >>>> at >>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) >>>> at >>>> org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) >>>> at >>>> org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) >>>> at >>>> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) >>>> at >>>> org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) >>>> at >>>> org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) >>>> at >>>> org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193) >>>> at >>>> org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345) >>>> at >>>> org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49) >>>> at >>>> org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207) >>>> at >>>> org.junit.runners.ParentRunner.run(ParentRunner.java:309) >>>> at >>>> org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155) >>>> at >>>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) >>>> at >>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) >>>> at >>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) >>>> at >>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) >>>> at >>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) >>>> at >>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) >>>> >>>> >>>> >>>> 2014-08-26 18:15 GMT+02:00 George Gastaldi >>>> >: >>>> >>>> Hi Raquel, >>>> >>>> Do you see any stacktraces? Starting from Forge >>>> 2.8.0.Final the cause should be displayed as a >>>> cause in the exception you are experiencing. >>>> I am not sure about your other question. What POJOs >>>> are you talking about? Can you clarify? >>>> >>>> Best Regards, >>>> >>>> George Gastaldi >>>> >>>> >>>> >>>> >>>> On 08/26/2014 03:18 AM, Raquel Pau Fern?ndez wrote: >>>>> Hi, >>>>> >>>>> I would like to create a forge addon and I have >>>>> followed the documentation. >>>>> >>>>> I am in the test section of >>>>> http://forge.jboss.org/document/develop-an-addon >>>>> and I have the following Exception when I run the >>>>> first test code from . >>>>> >>>>> java.lang.IllegalStateException: Test runner could >>>>> not locate test class [.....] in any deployed Addon. >>>>> >>>>> Obviously, the test needs to fail, but I suspect >>>>> that I cannot write tests in the same forge addon >>>>> project. Am I right? How can I correct this Exception? >>>>> >>>>> Another question, how does forge link my Forge >>>>> POJOs with the forge commands? >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Raquel Pau >>>>> >>>>> /"Education is the most powerful weapon which you >>>>> can use to change the world//"/ >>>>> Nelson Mandela >>>>> >>>>> personal page: >>>>> http://sites.google.com/site/raquelpau/ >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>>> >>>> >>>> >>>> >>>> -- >>>> Raquel Pau >>>> >>>> /"Education is the most powerful weapon which you can >>>> use to change the world//"/ >>>> Nelson Mandela >>>> >>>> personal page: >>>> http://sites.google.com/site/raquelpau/ >>>> _______________________________________________ >>>> 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 >>> >>> >>> >>> >>> -- >>> Raquel Pau >>> >>> /"Education is the most powerful weapon which you can use to >>> change the world//"/ >>> Nelson Mandela >>> >>> personal page: >>> http://sites.google.com/site/raquelpau/ >>> _______________________________________________ >>> 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 >> >> >> >> >> -- >> Raquel Pau >> >> /"Education is the most powerful weapon which you can use to >> change the world//"/ >> Nelson Mandela >> >> personal page: >> http://sites.google.com/site/raquelpau/ >> >> >> _______________________________________________ >> 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 > > > > > -- > Raquel Pau > > /"Education is the most powerful weapon which you can use to change > the world//"/ > Nelson Mandela > > personal page: > http://sites.google.com/site/raquelpau/ > > > _______________________________________________ > forge-dev mailing list > forge-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/forge-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20140901/f8b43b65/attachment-0001.html From raquelpau at gmail.com Mon Sep 1 17:04:46 2014 From: raquelpau at gmail.com (=?UTF-8?Q?Raquel_Pau_Fern=C3=A1ndez?=) Date: Mon, 1 Sep 2014 23:04:46 +0200 Subject: [forge-dev] creation and test of a forge addon In-Reply-To: <5404DE0B.8090204@redhat.com> References: <53FCB2AC.1070300@redhat.com> <13B72D36-7C86-4B11-A26E-BE68649A43EC@redhat.com> <5404A641.1040305@redhat.com> <5404DE0B.8090204@redhat.com> Message-ID: Yes, of course :) https://github.com/rpau/forge-walkmod-plugin 2014-09-01 22:58 GMT+02:00 George Gastaldi : > Can you post your pom.xml somewhere? In the meanwhile, remove the > generate-dot execution from your pom.xml. > It's not used atm. > > Thanks > > > On 09/01/2014 05:56 PM, Raquel Pau Fern?ndez wrote: > > Thanks for your help! > > Perfect. > > Right now, I have a little problem building the plugin because when I > build the project (with Forge - using addon-build-and-install or just with > mvn-install) the process never ends..Constantly, mvn is creating the .dot > file. > > If you don't know what is happeing I will start again from the scratch. > > If it can help you, my mvn version is 3.2.2 > > The output of mvn is as follows: > .... > Configuring mojo > org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final:generate-dot from > plugin realm > ClassRealm[plugin>org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final, > parent: sun.misc.Launcher$AppClassLoader at 2bbd86] > [DEBUG] Configuring mojo > 'org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final:generate-dot' > with basic configurator --> > [DEBUG] (f) attach = true > [DEBUG] (f) classifier = forge-addon > [DEBUG] (f) includeTransitiveAddons = true > [DEBUG] (f) outputDirectory = > C:\Users\rpau\workspace\walkmod\walkmod\target\classes/META-INF/resources > [DEBUG] (f) settings = org.apache.maven.execution.SettingsAdapter at fb8996 > [DEBUG] (f) mavenProject = MavenProject: > org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT @ > C:\Users\rpau\workspace\walkmod\walkmod\pom.xml > [DEBUG] -- end configuration -- > [INFO] Generating > C:\Users\rpau\workspace\walkmod\walkmod\target\classes\META-INF\resources\walkmod-1.0.0-SNAPSHOT.dot > [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 > for C:\Users\rpau\.m2\repository > [DEBUG] Skipped remote update check for > org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT/maven-metadata.xml, locally > installed metadata up-to-date. > [DEBUG] Skipped remote update check for > org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT/maven-metadata.xml, locally > installed metadata up-to-date. > [DEBUG] Skipped remote update check for > org.walkmod:walkmod-cmd/maven-metadata.xml, locally cached metadata > up-to-date. > [DEBUG] Skipped remote update check for > org.walkmod:walkmod-core/maven-metadata.xml, locally cached metadata > up-to-date. > [DEBUG] Skipped remote update check for > org.walkmod:merger/maven-metadata.xml, locally cached metadata up-to-date. > [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, > ConflictMarker.markTime=0, ConflictMarker.nodeCount=128, > ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, > ConflictIdSorter.conflictIdCount=28, > ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, > ConflictResolver.conflictItemCount=49, > DefaultDependencyCollector.collectTime=162, > DefaultDependencyCollector.transformTime=1} > [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, > ConflictMarker.markTime=0, ConflictMarker.nodeCount=159, > ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, > ConflictIdSorter.conflictIdCount=37, > ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, > ConflictResolver.conflictItemCount=159, > DefaultDependencyCollector.collectTime=294, > DefaultDependencyCollector.transformTime=3} > [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, > ConflictMarker.markTime=0, ConflictMarker.nodeCount=52, > ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, > ConflictIdSorter.conflictIdCount=24, > ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, > ConflictResolver.conflictItemCount=35, > DefaultDependencyCollector.collectTime=151, > DefaultDependencyCollector.transformTime=1} > [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, > ConflictMarker.markTime=0, ConflictMarker.nodeCount=2, > ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, > ConflictIdSorter.conflictIdCount=2, > ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, > ConflictResolver.conflictItemCount=2, > DefaultDependencyCollector.collectTime=6, > DefaultDependencyCollector.transformTime=0} > [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, > ConflictMarker.markTime=0, ConflictMarker.nodeCount=23, > ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, > ConflictIdSorter.conflictIdCount=23, > ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, > ConflictResolver.conflictItemCount=23, > DefaultDependencyCollector.collectTime=8, > DefaultDependencyCollector.transformTime=0} > [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, > ConflictMarker.markTime=0, ConflictMarker.nodeCount=157, > ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, > ConflictIdSorter.conflictIdCount=36, > ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, > ConflictResolver.conflictItemCount=157, > DefaultDependencyCollector.collectTime=10, > DefaultDependencyCollector.transformTime=2} > [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, > ConflictMarker.markTime=0, ConflictMarker.nodeCount=10, > ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, > ConflictIdSorter.conflictIdCount=10, > ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, > ConflictResolver.conflictItemCount=10, > DefaultDependencyCollector.collectTime=41, > DefaultDependencyCollector.transformTime=1} > ...continues in the same way... > > Thanks > ...... > > > > 2014-09-01 19:00 GMT+02:00 George Gastaldi : > >> Cool, >> >> To generate a JavaSource file is easy: >> >> String fqn = "com.george.app.MyClass"; >> String packageName = >> org.jboss.forge.roaster.model.util.Types.getPackage(fqn); >> String typeName = >> org.jboss.forge.roaster.model.util.Types.toSimpleName(fqn); >> JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class); >> JavaClassSource source = >> Roaster.create(JavaClassSource.class).setPackage(packageName) >> .setName(typeName).setSuperClass(MySuperClass.class); >> facet.saveJavaSource(source); >> >> Best Regards, >> >> George >> >> >> On 09/01/2014 01:04 PM, Raquel Pau Fern?ndez wrote: >> >> Hi, >> >> Perfect, it was what I need for the first question! >> >> About the second question: I would like to generate a Java source file. >> This java source file has a qualified name given by the user, and must be >> generated extending from an specific subclass. So, how can I do that with >> Forge? >> >> Thanks >> >> Best regards, >> >> >> >> 2014-09-01 3:34 GMT+02:00 George Gastaldi : >> >>> Hi Raquel, >>> >>> Sorry about that, it seems we are experiencing some issues in our >>> infrastructure, we'll fix it asap. >>> >>> About your questions: >>> 1) you need to get the MavenPluginFacet from the Project instance. In >>> your execute() method (assuming your command extends >>> AbstractProjectUICommand), do: >>> >>> Project project = getSelectedProject(context); >>> MavenPluginFacet facet = project.getFacet(MavenPluginFacet.class); >>> facet.addPlugin(...); >>> >>> 2) I haven't fully understood this, could you clarify with an example >>> please? >>> >>> I am replying from my phone, so I am not sure if the methods/classes >>> in the example given matches. >>> >>> Best Regards, >>> >>> George >>> >>> Em 31/08/2014, ?s 18:38, Raquel Pau Fern?ndez >>> escreveu: >>> >>> Hi, >>> >>> Your link was broken. However, I have followed the "How to create a >>> JBoss Forge Addon" of Arun Gupta from http://vimeo.com/jbossdeveloper. >>> >>> Currently, I have created an addon, the commands and I have installed >>> my addon in my local Forge. All runs perfect! :) >>> >>> My addon allows: >>> >>> 1) To Install walkmod: Creates a fixed walkmod.xml and adds a Maven *plugin >>> *declaration into the user pom.xml. >>> 2) To run walkmod: It will run walkmod if it is installed. Otherwise it >>> will run an embedded version. >>> 3) To create a walkmod plugin: I need to create a default >>> implementation of a java class that extends an specific class. >>> >>> So, I have 2 questions: >>> 1) How can I modify the current pom.xml of the user? >>> 2) How can I create a default implementation of a java class file using >>> the Forge API? >>> >>> Thanks >>> >>> >>> >>> 2014-08-27 0:57 GMT+02:00 George Gastaldi : >>> >>>> Hi Raquel, >>>> >>>> The stacktrace doesn't show much. See if anything else is displayed >>>> oin the logs. >>>> >>>> In order to create a command in Forge, you need to use the UI addon >>>> services. Take a look on: >>>> http://forge.jboss.org/addon/org.jboss.forge.addon:ui >>>> >>>> Let me know how it goes. >>>> >>>> Em 26/08/2014, ?s 14:03, Raquel Pau Fern?ndez >>>> escreveu: >>>> >>>> Hi, >>>> >>>> 1) the full stacktrace is printed below. >>>> >>>> 2) I am using as you have mentioned, the version: 2.8.0.Final. Which >>>> version do you recommend me? >>>> >>>> 3) What do I mean about POJOs: I have coded a facade controller to >>>> run the walkmod (http://www.walkmod.com) commands - and my plugin is >>>> about running walkmod from forge. So, I would like to know how to link >>>> forge with my facade methods / walkmod commands. In other words, I would >>>> like to know if exists some place to configure it or the names of my facade >>>> methods must follow some sort of conventions. >>>> >>>> Thanks, >>>> >>>> >>>> ----------------------------Stacktrace---------------------------------- >>>> java.lang.IllegalStateException: Test runner could not locate test >>>> class [org.walkmod.forge.WalkmodAddonTest] in any deployed Addon. >>>> at >>>> org.jboss.forge.arquillian.ForgeTestMethodExecutor.invoke(ForgeTestMethodExecutor.java:234) >>>> at >>>> org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:109) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>> at >>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >>>> at >>>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >>>> at >>>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) >>>> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) >>>> at >>>> org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>> at >>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >>>> at >>>> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142) >>>> at >>>> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>> at >>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>> at >>>> org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>> at >>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>> at >>>> org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>> at >>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>> at >>>> org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>> at >>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>> at >>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>> at >>>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >>>> at >>>> org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) >>>> at >>>> org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:294) >>>> at >>>> org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:269) >>>> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) >>>> at >>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) >>>> at >>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) >>>> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) >>>> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) >>>> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) >>>> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) >>>> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) >>>> at >>>> org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193) >>>> at >>>> org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345) >>>> at >>>> org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49) >>>> at >>>> org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207) >>>> at org.junit.runners.ParentRunner.run(ParentRunner.java:309) >>>> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155) >>>> at >>>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) >>>> at >>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) >>>> at >>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) >>>> at >>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) >>>> at >>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) >>>> at >>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) >>>> >>>> >>>> >>>> 2014-08-26 18:15 GMT+02:00 George Gastaldi : >>>> >>>>> Hi Raquel, >>>>> >>>>> Do you see any stacktraces? Starting from Forge 2.8.0.Final the cause >>>>> should be displayed as a cause in the exception you are experiencing. >>>>> I am not sure about your other question. What POJOs are you talking >>>>> about? Can you clarify? >>>>> >>>>> Best Regards, >>>>> >>>>> George Gastaldi >>>>> >>>>> >>>>> >>>>> >>>>> On 08/26/2014 03:18 AM, Raquel Pau Fern?ndez wrote: >>>>> >>>>> Hi, >>>>> >>>>> I would like to create a forge addon and I have followed the >>>>> documentation. >>>>> >>>>> I am in the test section of >>>>> http://forge.jboss.org/document/develop-an-addon and I have the >>>>> following Exception when I run the first test code from . >>>>> >>>>> java.lang.IllegalStateException: Test runner could not locate test >>>>> class [.....] in any deployed Addon. >>>>> >>>>> Obviously, the test needs to fail, but I suspect that I cannot write >>>>> tests in the same forge addon project. Am I right? How can I correct this >>>>> Exception? >>>>> >>>>> Another question, how does forge link my Forge POJOs with the forge >>>>> commands? >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Raquel Pau >>>>> >>>>> *"Education is the most powerful weapon which you can use to change >>>>> the world**"* >>>>> >>>>> Nelson Mandela >>>>> >>>>> personal page: >>>>> http://sites.google.com/site/raquelpau/ >>>>> >>>>> >>>>> _______________________________________________ >>>>> forge-dev mailing listforge-dev at lists.jboss.orghttps://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 >>>>> >>>> >>>> >>>> >>>> -- >>>> Raquel Pau >>>> >>>> *"Education is the most powerful weapon which you can use to change the >>>> world**"* >>>> >>>> Nelson Mandela >>>> >>>> personal page: >>>> http://sites.google.com/site/raquelpau/ >>>> >>>> _______________________________________________ >>>> 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 >>>> >>> >>> >>> >>> -- >>> Raquel Pau >>> >>> *"Education is the most powerful weapon which you can use to change the >>> world**"* >>> >>> Nelson Mandela >>> >>> personal page: >>> http://sites.google.com/site/raquelpau/ >>> >>> _______________________________________________ >>> 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 >>> >> >> >> >> -- >> Raquel Pau >> >> *"Education is the most powerful weapon which you can use to change the >> world**"* >> >> Nelson Mandela >> >> personal page: >> http://sites.google.com/site/raquelpau/ >> >> >> _______________________________________________ >> forge-dev mailing listforge-dev at lists.jboss.orghttps://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 >> > > > > -- > Raquel Pau > > *"Education is the most powerful weapon which you can use to change the > world**"* > > Nelson Mandela > > personal page: > http://sites.google.com/site/raquelpau/ > > > _______________________________________________ > forge-dev mailing listforge-dev at lists.jboss.orghttps://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 > -- Raquel Pau *"Education is the most powerful weapon which you can use to change the world**"* Nelson Mandela personal page: http://sites.google.com/site/raquelpau/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20140901/28aa5bde/attachment-0001.html From raquelpau at gmail.com Mon Sep 1 17:13:17 2014 From: raquelpau at gmail.com (=?UTF-8?Q?Raquel_Pau_Fern=C3=A1ndez?=) Date: Mon, 1 Sep 2014 23:13:17 +0200 Subject: [forge-dev] creation and test of a forge addon In-Reply-To: References: <53FCB2AC.1070300@redhat.com> <13B72D36-7C86-4B11-A26E-BE68649A43EC@redhat.com> <5404A641.1040305@redhat.com> <5404DE0B.8090204@redhat.com> Message-ID: Hi, Without the generate-dot execution, the mvn install works, but the addon-build-and-install instructions never ends after completing the build. In fact, I don't have any other messages in the console after the "BUILD SUCCESS". 2014-09-01 23:04 GMT+02:00 Raquel Pau Fern?ndez : > Yes, of course :) > > https://github.com/rpau/forge-walkmod-plugin > > > 2014-09-01 22:58 GMT+02:00 George Gastaldi : > > Can you post your pom.xml somewhere? In the meanwhile, remove the >> generate-dot execution from your pom.xml. >> It's not used atm. >> >> Thanks >> >> >> On 09/01/2014 05:56 PM, Raquel Pau Fern?ndez wrote: >> >> Thanks for your help! >> >> Perfect. >> >> Right now, I have a little problem building the plugin because when I >> build the project (with Forge - using addon-build-and-install or just with >> mvn-install) the process never ends..Constantly, mvn is creating the .dot >> file. >> >> If you don't know what is happeing I will start again from the scratch. >> >> If it can help you, my mvn version is 3.2.2 >> >> The output of mvn is as follows: >> .... >> Configuring mojo >> org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final:generate-dot from >> plugin realm >> ClassRealm[plugin>org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final, >> parent: sun.misc.Launcher$AppClassLoader at 2bbd86] >> [DEBUG] Configuring mojo >> 'org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final:generate-dot' >> with basic configurator --> >> [DEBUG] (f) attach = true >> [DEBUG] (f) classifier = forge-addon >> [DEBUG] (f) includeTransitiveAddons = true >> [DEBUG] (f) outputDirectory = >> C:\Users\rpau\workspace\walkmod\walkmod\target\classes/META-INF/resources >> [DEBUG] (f) settings = org.apache.maven.execution.SettingsAdapter at fb8996 >> [DEBUG] (f) mavenProject = MavenProject: >> org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT @ >> C:\Users\rpau\workspace\walkmod\walkmod\pom.xml >> [DEBUG] -- end configuration -- >> [INFO] Generating >> C:\Users\rpau\workspace\walkmod\walkmod\target\classes\META-INF\resources\walkmod-1.0.0-SNAPSHOT.dot >> [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 >> for C:\Users\rpau\.m2\repository >> [DEBUG] Skipped remote update check for >> org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT/maven-metadata.xml, locally >> installed metadata up-to-date. >> [DEBUG] Skipped remote update check for >> org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT/maven-metadata.xml, locally >> installed metadata up-to-date. >> [DEBUG] Skipped remote update check for >> org.walkmod:walkmod-cmd/maven-metadata.xml, locally cached metadata >> up-to-date. >> [DEBUG] Skipped remote update check for >> org.walkmod:walkmod-core/maven-metadata.xml, locally cached metadata >> up-to-date. >> [DEBUG] Skipped remote update check for >> org.walkmod:merger/maven-metadata.xml, locally cached metadata up-to-date. >> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, >> ConflictMarker.markTime=0, ConflictMarker.nodeCount=128, >> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, >> ConflictIdSorter.conflictIdCount=28, >> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, >> ConflictResolver.conflictItemCount=49, >> DefaultDependencyCollector.collectTime=162, >> DefaultDependencyCollector.transformTime=1} >> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, >> ConflictMarker.markTime=0, ConflictMarker.nodeCount=159, >> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, >> ConflictIdSorter.conflictIdCount=37, >> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, >> ConflictResolver.conflictItemCount=159, >> DefaultDependencyCollector.collectTime=294, >> DefaultDependencyCollector.transformTime=3} >> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, >> ConflictMarker.markTime=0, ConflictMarker.nodeCount=52, >> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, >> ConflictIdSorter.conflictIdCount=24, >> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, >> ConflictResolver.conflictItemCount=35, >> DefaultDependencyCollector.collectTime=151, >> DefaultDependencyCollector.transformTime=1} >> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, >> ConflictMarker.markTime=0, ConflictMarker.nodeCount=2, >> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, >> ConflictIdSorter.conflictIdCount=2, >> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, >> ConflictResolver.conflictItemCount=2, >> DefaultDependencyCollector.collectTime=6, >> DefaultDependencyCollector.transformTime=0} >> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, >> ConflictMarker.markTime=0, ConflictMarker.nodeCount=23, >> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, >> ConflictIdSorter.conflictIdCount=23, >> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, >> ConflictResolver.conflictItemCount=23, >> DefaultDependencyCollector.collectTime=8, >> DefaultDependencyCollector.transformTime=0} >> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, >> ConflictMarker.markTime=0, ConflictMarker.nodeCount=157, >> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, >> ConflictIdSorter.conflictIdCount=36, >> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, >> ConflictResolver.conflictItemCount=157, >> DefaultDependencyCollector.collectTime=10, >> DefaultDependencyCollector.transformTime=2} >> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, >> ConflictMarker.markTime=0, ConflictMarker.nodeCount=10, >> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, >> ConflictIdSorter.conflictIdCount=10, >> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, >> ConflictResolver.conflictItemCount=10, >> DefaultDependencyCollector.collectTime=41, >> DefaultDependencyCollector.transformTime=1} >> ...continues in the same way... >> >> Thanks >> ...... >> >> >> >> 2014-09-01 19:00 GMT+02:00 George Gastaldi : >> >>> Cool, >>> >>> To generate a JavaSource file is easy: >>> >>> String fqn = "com.george.app.MyClass"; >>> String packageName = >>> org.jboss.forge.roaster.model.util.Types.getPackage(fqn); >>> String typeName = >>> org.jboss.forge.roaster.model.util.Types.toSimpleName(fqn); >>> JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class); >>> JavaClassSource source = >>> Roaster.create(JavaClassSource.class).setPackage(packageName) >>> .setName(typeName).setSuperClass(MySuperClass.class); >>> facet.saveJavaSource(source); >>> >>> Best Regards, >>> >>> George >>> >>> >>> On 09/01/2014 01:04 PM, Raquel Pau Fern?ndez wrote: >>> >>> Hi, >>> >>> Perfect, it was what I need for the first question! >>> >>> About the second question: I would like to generate a Java source >>> file. This java source file has a qualified name given by the user, and >>> must be generated extending from an specific subclass. So, how can I do >>> that with Forge? >>> >>> Thanks >>> >>> Best regards, >>> >>> >>> >>> 2014-09-01 3:34 GMT+02:00 George Gastaldi : >>> >>>> Hi Raquel, >>>> >>>> Sorry about that, it seems we are experiencing some issues in our >>>> infrastructure, we'll fix it asap. >>>> >>>> About your questions: >>>> 1) you need to get the MavenPluginFacet from the Project instance. In >>>> your execute() method (assuming your command extends >>>> AbstractProjectUICommand), do: >>>> >>>> Project project = getSelectedProject(context); >>>> MavenPluginFacet facet = project.getFacet(MavenPluginFacet.class); >>>> facet.addPlugin(...); >>>> >>>> 2) I haven't fully understood this, could you clarify with an example >>>> please? >>>> >>>> I am replying from my phone, so I am not sure if the methods/classes >>>> in the example given matches. >>>> >>>> Best Regards, >>>> >>>> George >>>> >>>> Em 31/08/2014, ?s 18:38, Raquel Pau Fern?ndez >>>> escreveu: >>>> >>>> Hi, >>>> >>>> Your link was broken. However, I have followed the "How to create a >>>> JBoss Forge Addon" of Arun Gupta from http://vimeo.com/jbossdeveloper. >>>> >>>> Currently, I have created an addon, the commands and I have installed >>>> my addon in my local Forge. All runs perfect! :) >>>> >>>> My addon allows: >>>> >>>> 1) To Install walkmod: Creates a fixed walkmod.xml and adds a Maven *plugin >>>> *declaration into the user pom.xml. >>>> 2) To run walkmod: It will run walkmod if it is installed. Otherwise it >>>> will run an embedded version. >>>> 3) To create a walkmod plugin: I need to create a default >>>> implementation of a java class that extends an specific class. >>>> >>>> So, I have 2 questions: >>>> 1) How can I modify the current pom.xml of the user? >>>> 2) How can I create a default implementation of a java class file using >>>> the Forge API? >>>> >>>> Thanks >>>> >>>> >>>> >>>> 2014-08-27 0:57 GMT+02:00 George Gastaldi : >>>> >>>>> Hi Raquel, >>>>> >>>>> The stacktrace doesn't show much. See if anything else is displayed >>>>> oin the logs. >>>>> >>>>> In order to create a command in Forge, you need to use the UI addon >>>>> services. Take a look on: >>>>> http://forge.jboss.org/addon/org.jboss.forge.addon:ui >>>>> >>>>> Let me know how it goes. >>>>> >>>>> Em 26/08/2014, ?s 14:03, Raquel Pau Fern?ndez >>>>> escreveu: >>>>> >>>>> Hi, >>>>> >>>>> 1) the full stacktrace is printed below. >>>>> >>>>> 2) I am using as you have mentioned, the version: 2.8.0.Final. Which >>>>> version do you recommend me? >>>>> >>>>> 3) What do I mean about POJOs: I have coded a facade controller to >>>>> run the walkmod (http://www.walkmod.com) commands - and my plugin is >>>>> about running walkmod from forge. So, I would like to know how to link >>>>> forge with my facade methods / walkmod commands. In other words, I would >>>>> like to know if exists some place to configure it or the names of my facade >>>>> methods must follow some sort of conventions. >>>>> >>>>> Thanks, >>>>> >>>>> >>>>> ----------------------------Stacktrace---------------------------------- >>>>> java.lang.IllegalStateException: Test runner could not locate test >>>>> class [org.walkmod.forge.WalkmodAddonTest] in any deployed Addon. >>>>> at >>>>> org.jboss.forge.arquillian.ForgeTestMethodExecutor.invoke(ForgeTestMethodExecutor.java:234) >>>>> at >>>>> org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:109) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>> at >>>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>> at >>>>> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >>>>> at >>>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >>>>> at >>>>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >>>>> at >>>>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) >>>>> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) >>>>> at >>>>> org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>> at >>>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>> at >>>>> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >>>>> at >>>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >>>>> at >>>>> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142) >>>>> at >>>>> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>> at >>>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>> at >>>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>>> at >>>>> org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>> at >>>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>> at >>>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>>> at >>>>> org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>> at >>>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>> at >>>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>>> at >>>>> org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>> at >>>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>> at >>>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>>> at >>>>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >>>>> at >>>>> org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) >>>>> at >>>>> org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:294) >>>>> at >>>>> org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:269) >>>>> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) >>>>> at >>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) >>>>> at >>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) >>>>> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) >>>>> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) >>>>> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) >>>>> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) >>>>> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) >>>>> at >>>>> org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193) >>>>> at >>>>> org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345) >>>>> at >>>>> org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49) >>>>> at >>>>> org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207) >>>>> at org.junit.runners.ParentRunner.run(ParentRunner.java:309) >>>>> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155) >>>>> at >>>>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) >>>>> at >>>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) >>>>> at >>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) >>>>> at >>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) >>>>> at >>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) >>>>> at >>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) >>>>> >>>>> >>>>> >>>>> 2014-08-26 18:15 GMT+02:00 George Gastaldi : >>>>> >>>>>> Hi Raquel, >>>>>> >>>>>> Do you see any stacktraces? Starting from Forge 2.8.0.Final the cause >>>>>> should be displayed as a cause in the exception you are experiencing. >>>>>> I am not sure about your other question. What POJOs are you talking >>>>>> about? Can you clarify? >>>>>> >>>>>> Best Regards, >>>>>> >>>>>> George Gastaldi >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On 08/26/2014 03:18 AM, Raquel Pau Fern?ndez wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> I would like to create a forge addon and I have followed the >>>>>> documentation. >>>>>> >>>>>> I am in the test section of >>>>>> http://forge.jboss.org/document/develop-an-addon and I have the >>>>>> following Exception when I run the first test code from . >>>>>> >>>>>> java.lang.IllegalStateException: Test runner could not locate test >>>>>> class [.....] in any deployed Addon. >>>>>> >>>>>> Obviously, the test needs to fail, but I suspect that I cannot >>>>>> write tests in the same forge addon project. Am I right? How can I correct >>>>>> this Exception? >>>>>> >>>>>> Another question, how does forge link my Forge POJOs with the forge >>>>>> commands? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Raquel Pau >>>>>> >>>>>> *"Education is the most powerful weapon which you can use to change >>>>>> the world**"* >>>>>> >>>>>> Nelson Mandela >>>>>> >>>>>> personal page: >>>>>> http://sites.google.com/site/raquelpau/ >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> forge-dev mailing listforge-dev at lists.jboss.orghttps://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 >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Raquel Pau >>>>> >>>>> *"Education is the most powerful weapon which you can use to change >>>>> the world**"* >>>>> >>>>> Nelson Mandela >>>>> >>>>> personal page: >>>>> http://sites.google.com/site/raquelpau/ >>>>> >>>>> _______________________________________________ >>>>> 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 >>>>> >>>> >>>> >>>> >>>> -- >>>> Raquel Pau >>>> >>>> *"Education is the most powerful weapon which you can use to change the >>>> world**"* >>>> >>>> Nelson Mandela >>>> >>>> personal page: >>>> http://sites.google.com/site/raquelpau/ >>>> >>>> _______________________________________________ >>>> 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 >>>> >>> >>> >>> >>> -- >>> Raquel Pau >>> >>> *"Education is the most powerful weapon which you can use to change the >>> world**"* >>> >>> Nelson Mandela >>> >>> personal page: >>> http://sites.google.com/site/raquelpau/ >>> >>> >>> _______________________________________________ >>> forge-dev mailing listforge-dev at lists.jboss.orghttps://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 >>> >> >> >> >> -- >> Raquel Pau >> >> *"Education is the most powerful weapon which you can use to change the >> world**"* >> >> Nelson Mandela >> >> personal page: >> http://sites.google.com/site/raquelpau/ >> >> >> _______________________________________________ >> forge-dev mailing listforge-dev at lists.jboss.orghttps://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 >> > > > > -- > Raquel Pau > > *"Education is the most powerful weapon which you can use to change the > world**"* > > Nelson Mandela > > personal page: > http://sites.google.com/site/raquelpau/ > -- Raquel Pau *"Education is the most powerful weapon which you can use to change the world**"* Nelson Mandela personal page: http://sites.google.com/site/raquelpau/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20140901/6ac886ca/attachment-0001.html From ggastald at redhat.com Mon Sep 1 17:16:07 2014 From: ggastald at redhat.com (George Gastaldi) Date: Mon, 1 Sep 2014 17:16:07 -0400 (EDT) Subject: [forge-dev] creation and test of a forge addon In-Reply-To: References: <53FCB2AC.1070300@redhat.com> <13B72D36-7C86-4B11-A26E-BE68649A43EC@redhat.com> <5404A641.1040305@redhat.com> <5404DE0B.8090204@redhat.com> Message-ID: That's weird. Try emptying your ~/.forge and try again. > Em 01/09/2014, ?s 18:13, Raquel Pau Fern?ndez escreveu: > > Hi, > > Without the generate-dot execution, the mvn install works, but the addon-build-and-install instructions never ends after completing the build. In fact, I don't have any other messages in the console after the "BUILD SUCCESS". > > > 2014-09-01 23:04 GMT+02:00 Raquel Pau Fern?ndez : >> Yes, of course :) >> >> https://github.com/rpau/forge-walkmod-plugin >> >> >> 2014-09-01 22:58 GMT+02:00 George Gastaldi : >> >>> Can you post your pom.xml somewhere? In the meanwhile, remove the generate-dot execution from your pom.xml. >>> It's not used atm. >>> >>> Thanks >>> >>> >>>> On 09/01/2014 05:56 PM, Raquel Pau Fern?ndez wrote: >>>> Thanks for your help! >>>> >>>> Perfect. >>>> >>>> Right now, I have a little problem building the plugin because when I build the project (with Forge - using addon-build-and-install or just with mvn-install) the process never ends..Constantly, mvn is creating the .dot file. >>>> >>>> If you don't know what is happeing I will start again from the scratch. >>>> >>>> If it can help you, my mvn version is 3.2.2 >>>> >>>> The output of mvn is as follows: >>>> .... >>>> Configuring mojo org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final:generate-dot from plugin realm ClassRealm[plugin>org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final, parent: sun.misc.Launcher$AppClassLoader at 2bbd86] >>>> [DEBUG] Configuring mojo 'org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final:generate-dot' with basic configurator --> >>>> [DEBUG] (f) attach = true >>>> [DEBUG] (f) classifier = forge-addon >>>> [DEBUG] (f) includeTransitiveAddons = true >>>> [DEBUG] (f) outputDirectory = C:\Users\rpau\workspace\walkmod\walkmod\target\classes/META-INF/resources >>>> [DEBUG] (f) settings = org.apache.maven.execution.SettingsAdapter at fb8996 >>>> [DEBUG] (f) mavenProject = MavenProject: org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT @ C:\Users\rpau\workspace\walkmod\walkmod\pom.xml >>>> [DEBUG] -- end configuration -- >>>> [INFO] Generating C:\Users\rpau\workspace\walkmod\walkmod\target\classes\META-INF\resources\walkmod-1.0.0-SNAPSHOT.dot >>>> [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\rpau\.m2\repository >>>> [DEBUG] Skipped remote update check for org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT/maven-metadata.xml, locally installed metadata up-to-date. >>>> [DEBUG] Skipped remote update check for org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT/maven-metadata.xml, locally installed metadata up-to-date. >>>> [DEBUG] Skipped remote update check for org.walkmod:walkmod-cmd/maven-metadata.xml, locally cached metadata up-to-date. >>>> [DEBUG] Skipped remote update check for org.walkmod:walkmod-core/maven-metadata.xml, locally cached metadata up-to-date. >>>> [DEBUG] Skipped remote update check for org.walkmod:merger/maven-metadata.xml, locally cached metadata up-to-date. >>>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=128, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=28, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, ConflictResolver.conflictItemCount=49, DefaultDependencyCollector.collectTime=162, DefaultDependencyCollector.transformTime=1} >>>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, ConflictMarker.markTime=0, ConflictMarker.nodeCount=159, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=37, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, ConflictResolver.conflictItemCount=159, DefaultDependencyCollector.collectTime=294, DefaultDependencyCollector.transformTime=3} >>>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, ConflictMarker.markTime=0, ConflictMarker.nodeCount=52, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=24, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=35, DefaultDependencyCollector.collectTime=151, DefaultDependencyCollector.transformTime=1} >>>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=2, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=2, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=2, DefaultDependencyCollector.collectTime=6, DefaultDependencyCollector.transformTime=0} >>>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=23, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=23, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=23, DefaultDependencyCollector.collectTime=8, DefaultDependencyCollector.transformTime=0} >>>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=157, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=36, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, ConflictResolver.conflictItemCount=157, DefaultDependencyCollector.collectTime=10, DefaultDependencyCollector.transformTime=2} >>>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=10, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=10, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, ConflictResolver.conflictItemCount=10, DefaultDependencyCollector.collectTime=41, DefaultDependencyCollector.transformTime=1} >>>> ...continues in the same way... >>>> >>>> Thanks >>>> ...... >>>> >>>> >>>> >>>> 2014-09-01 19:00 GMT+02:00 George Gastaldi : >>>>> Cool, >>>>> >>>>> To generate a JavaSource file is easy: >>>>> >>>>> String fqn = "com.george.app.MyClass"; >>>>> String packageName = org.jboss.forge.roaster.model.util.Types.getPackage(fqn); >>>>> String typeName = org.jboss.forge.roaster.model.util.Types.toSimpleName(fqn); >>>>> JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class); >>>>> JavaClassSource source = Roaster.create(JavaClassSource.class).setPackage(packageName) >>>>> .setName(typeName).setSuperClass(MySuperClass.class); >>>>> facet.saveJavaSource(source); >>>>> >>>>> Best Regards, >>>>> >>>>> George >>>>> >>>>> >>>>>> On 09/01/2014 01:04 PM, Raquel Pau Fern?ndez wrote: >>>>>> Hi, >>>>>> >>>>>> Perfect, it was what I need for the first question! >>>>>> >>>>>> About the second question: I would like to generate a Java source file. This java source file has a qualified name given by the user, and must be generated extending from an specific subclass. So, how can I do that with Forge? >>>>>> >>>>>> Thanks >>>>>> >>>>>> Best regards, >>>>>> >>>>>> >>>>>> >>>>>> 2014-09-01 3:34 GMT+02:00 George Gastaldi : >>>>>>> Hi Raquel, >>>>>>> >>>>>>> Sorry about that, it seems we are experiencing some issues in our infrastructure, we'll fix it asap. >>>>>>> >>>>>>> About your questions: >>>>>>> 1) you need to get the MavenPluginFacet from the Project instance. In your execute() method (assuming your command extends AbstractProjectUICommand), do: >>>>>>> >>>>>>> Project project = getSelectedProject(context); >>>>>>> MavenPluginFacet facet = project.getFacet(MavenPluginFacet.class); >>>>>>> facet.addPlugin(...); >>>>>>> >>>>>>> 2) I haven't fully understood this, could you clarify with an example please? >>>>>>> >>>>>>> I am replying from my phone, so I am not sure if the methods/classes in the example given matches. >>>>>>> >>>>>>> Best Regards, >>>>>>> >>>>>>> George >>>>>>> >>>>>>> Em 31/08/2014, ?s 18:38, Raquel Pau Fern?ndez escreveu: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> Your link was broken. However, I have followed the "How to create a JBoss Forge Addon" of Arun Gupta from http://vimeo.com/jbossdeveloper. >>>>>>>> >>>>>>>> Currently, I have created an addon, the commands and I have installed my addon in my local Forge. All runs perfect! :) >>>>>>>> >>>>>>>> My addon allows: >>>>>>>> >>>>>>>> 1) To Install walkmod: Creates a fixed walkmod.xml and adds a Maven plugin declaration into the user pom.xml. >>>>>>>> 2) To run walkmod: It will run walkmod if it is installed. Otherwise it will run an embedded version. >>>>>>>> 3) To create a walkmod plugin: I need to create a default implementation of a java class that extends an specific class. >>>>>>>> >>>>>>>> So, I have 2 questions: >>>>>>>> 1) How can I modify the current pom.xml of the user? >>>>>>>> 2) How can I create a default implementation of a java class file using the Forge API? >>>>>>>> >>>>>>>> Thanks >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> 2014-08-27 0:57 GMT+02:00 George Gastaldi : >>>>>>>>> Hi Raquel, >>>>>>>>> >>>>>>>>> The stacktrace doesn't show much. See if anything else is displayed oin the logs. >>>>>>>>> >>>>>>>>> In order to create a command in Forge, you need to use the UI addon services. Take a look on: >>>>>>>>> http://forge.jboss.org/addon/org.jboss.forge.addon:ui >>>>>>>>> >>>>>>>>> Let me know how it goes. >>>>>>>>> >>>>>>>>> Em 26/08/2014, ?s 14:03, Raquel Pau Fern?ndez escreveu: >>>>>>>>> >>>>>>>>>> Hi, >>>>>>>>>> >>>>>>>>>> 1) the full stacktrace is printed below. >>>>>>>>>> >>>>>>>>>> 2) I am using as you have mentioned, the version: 2.8.0.Final. Which version do you recommend me? >>>>>>>>>> >>>>>>>>>> 3) What do I mean about POJOs: I have coded a facade controller to run the walkmod (http://www.walkmod.com) commands - and my plugin is about running walkmod from forge. So, I would like to know how to link forge with my facade methods / walkmod commands. In other words, I would like to know if exists some place to configure it or the names of my facade methods must follow some sort of conventions. >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> >>>>>>>>>> ----------------------------Stacktrace---------------------------------- >>>>>>>>>> java.lang.IllegalStateException: Test runner could not locate test class [org.walkmod.forge.WalkmodAddonTest] in any deployed Addon. >>>>>>>>>> >>>>>>>>>> at org.jboss.forge.arquillian.ForgeTestMethodExecutor.invoke(ForgeTestMethodExecutor.java:234) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:109) >>>>>>>>>> >>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>>>>>> >>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>>>>>> >>>>>>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>>>>>> >>>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57) >>>>>>>>>> >>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>>>>>> >>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>>>>>> >>>>>>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>>>>>> >>>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129) >>>>>>>>>> >>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>>>>>> >>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>>>>>> >>>>>>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>>>>>> >>>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102) >>>>>>>>>> >>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>>>>>> >>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>>>>>> >>>>>>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>>>>>> >>>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84) >>>>>>>>>> >>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>>>>>> >>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>>>>>> >>>>>>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>>>>>> >>>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65) >>>>>>>>>> >>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>>>>>> >>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>>>>>> >>>>>>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>>>>>> >>>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:294) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:269) >>>>>>>>>> >>>>>>>>>> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) >>>>>>>>>> >>>>>>>>>> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) >>>>>>>>>> >>>>>>>>>> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) >>>>>>>>>> >>>>>>>>>> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) >>>>>>>>>> >>>>>>>>>> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) >>>>>>>>>> >>>>>>>>>> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) >>>>>>>>>> >>>>>>>>>> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) >>>>>>>>>> >>>>>>>>>> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207) >>>>>>>>>> >>>>>>>>>> at org.junit.runners.ParentRunner.run(ParentRunner.java:309) >>>>>>>>>> >>>>>>>>>> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155) >>>>>>>>>> >>>>>>>>>> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) >>>>>>>>>> >>>>>>>>>> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) >>>>>>>>>> >>>>>>>>>> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) >>>>>>>>>> >>>>>>>>>> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) >>>>>>>>>> >>>>>>>>>> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) >>>>>>>>>> >>>>>>>>>> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> 2014-08-26 18:15 GMT+02:00 George Gastaldi : >>>>>>>>>>> Hi Raquel, >>>>>>>>>>> >>>>>>>>>>> Do you see any stacktraces? Starting from Forge 2.8.0.Final the cause should be displayed as a cause in the exception you are experiencing. >>>>>>>>>>> I am not sure about your other question. What POJOs are you talking about? Can you clarify? >>>>>>>>>>> >>>>>>>>>>> Best Regards, >>>>>>>>>>> >>>>>>>>>>> George Gastaldi >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On 08/26/2014 03:18 AM, Raquel Pau Fern?ndez wrote: >>>>>>>>>>>> Hi, >>>>>>>>>>>> >>>>>>>>>>>> I would like to create a forge addon and I have followed the documentation. >>>>>>>>>>>> >>>>>>>>>>>> I am in the test section of http://forge.jboss.org/document/develop-an-addon and I have the following Exception when I run the first test code from . >>>>>>>>>>>> >>>>>>>>>>>> java.lang.IllegalStateException: Test runner could not locate test class [.....] in any deployed Addon. >>>>>>>>>>>> >>>>>>>>>>>> Obviously, the test needs to fail, but I suspect that I cannot write tests in the same forge addon project. Am I right? How can I correct this Exception? >>>>>>>>>>>> >>>>>>>>>>>> Another question, how does forge link my Forge POJOs with the forge commands? >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Raquel Pau >>>>>>>>>>>> >>>>>>>>>>>> "Education is the most powerful weapon which you can use to change the world" >>>>>>>>>>>> Nelson Mandela >>>>>>>>>>>> >>>>>>>>>>>> personal page: >>>>>>>>>>>> http://sites.google.com/site/raquelpau/ >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> 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 >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Raquel Pau >>>>>>>>>> >>>>>>>>>> "Education is the most powerful weapon which you can use to change the world" >>>>>>>>>> Nelson Mandela >>>>>>>>>> >>>>>>>>>> personal page: >>>>>>>>>> http://sites.google.com/site/raquelpau/ >>>>>>>>>> _______________________________________________ >>>>>>>>>> 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 >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Raquel Pau >>>>>>>> >>>>>>>> "Education is the most powerful weapon which you can use to change the world" >>>>>>>> Nelson Mandela >>>>>>>> >>>>>>>> personal page: >>>>>>>> http://sites.google.com/site/raquelpau/ >>>>>>>> _______________________________________________ >>>>>>>> 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 >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Raquel Pau >>>>>> >>>>>> "Education is the most powerful weapon which you can use to change the world" >>>>>> Nelson Mandela >>>>>> >>>>>> personal page: >>>>>> http://sites.google.com/site/raquelpau/ >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>> >>>> >>>> >>>> -- >>>> Raquel Pau >>>> >>>> "Education is the most powerful weapon which you can use to change the world" >>>> Nelson Mandela >>>> >>>> personal page: >>>> http://sites.google.com/site/raquelpau/ >>>> >>>> >>>> _______________________________________________ >>>> 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 >> >> >> >> >> -- >> Raquel Pau >> >> "Education is the most powerful weapon which you can use to change the world" >> Nelson Mandela >> >> personal page: >> http://sites.google.com/site/raquelpau/ > > > > -- > Raquel Pau > > "Education is the most powerful weapon which you can use to change the world" > Nelson Mandela > > personal page: > http://sites.google.com/site/raquelpau/ > _______________________________________________ > forge-dev mailing list > forge-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/forge-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20140901/0cdefcf6/attachment-0001.html From raquelpau at gmail.com Tue Sep 2 01:06:03 2014 From: raquelpau at gmail.com (=?UTF-8?Q?Raquel_Pau_Fern=C3=A1ndez?=) Date: Tue, 2 Sep 2014 07:06:03 +0200 Subject: [forge-dev] creation and test of a forge addon In-Reply-To: References: <53FCB2AC.1070300@redhat.com> <13B72D36-7C86-4B11-A26E-BE68649A43EC@redhat.com> <5404A641.1040305@redhat.com> <5404DE0B.8090204@redhat.com> Message-ID: Ok, thank you. The process was very slow (minutes), but it worked :) 2014-09-01 23:16 GMT+02:00 George Gastaldi : > That's weird. Try emptying your ~/.forge and try again. > > Em 01/09/2014, ?s 18:13, Raquel Pau Fern?ndez > escreveu: > > Hi, > > Without the generate-dot execution, the mvn install works, but > the addon-build-and-install instructions never ends after completing the > build. In fact, I don't have any other messages in the console after the > "BUILD SUCCESS". > > > 2014-09-01 23:04 GMT+02:00 Raquel Pau Fern?ndez : > >> Yes, of course :) >> >> https://github.com/rpau/forge-walkmod-plugin >> >> >> 2014-09-01 22:58 GMT+02:00 George Gastaldi : >> >> Can you post your pom.xml somewhere? In the meanwhile, remove the >>> generate-dot execution from your pom.xml. >>> It's not used atm. >>> >>> Thanks >>> >>> >>> On 09/01/2014 05:56 PM, Raquel Pau Fern?ndez wrote: >>> >>> Thanks for your help! >>> >>> Perfect. >>> >>> Right now, I have a little problem building the plugin because when I >>> build the project (with Forge - using addon-build-and-install or just with >>> mvn-install) the process never ends..Constantly, mvn is creating the .dot >>> file. >>> >>> If you don't know what is happeing I will start again from the >>> scratch. >>> >>> If it can help you, my mvn version is 3.2.2 >>> >>> The output of mvn is as follows: >>> .... >>> Configuring mojo >>> org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final:generate-dot from >>> plugin realm >>> ClassRealm[plugin>org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final, >>> parent: sun.misc.Launcher$AppClassLoader at 2bbd86] >>> [DEBUG] Configuring mojo >>> 'org.jboss.forge.furnace:furnace-maven-plugin:2.8.1.Final:generate-dot' >>> with basic configurator --> >>> [DEBUG] (f) attach = true >>> [DEBUG] (f) classifier = forge-addon >>> [DEBUG] (f) includeTransitiveAddons = true >>> [DEBUG] (f) outputDirectory = >>> C:\Users\rpau\workspace\walkmod\walkmod\target\classes/META-INF/resources >>> [DEBUG] (f) settings = >>> org.apache.maven.execution.SettingsAdapter at fb8996 >>> [DEBUG] (f) mavenProject = MavenProject: >>> org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT @ >>> C:\Users\rpau\workspace\walkmod\walkmod\pom.xml >>> [DEBUG] -- end configuration -- >>> [INFO] Generating >>> C:\Users\rpau\workspace\walkmod\walkmod\target\classes\META-INF\resources\walkmod-1.0.0-SNAPSHOT.dot >>> [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 >>> for C:\Users\rpau\.m2\repository >>> [DEBUG] Skipped remote update check for >>> org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT/maven-metadata.xml, locally >>> installed metadata up-to-date. >>> [DEBUG] Skipped remote update check for >>> org.walkmod.forge.addon:walkmod:1.0.0-SNAPSHOT/maven-metadata.xml, locally >>> installed metadata up-to-date. >>> [DEBUG] Skipped remote update check for >>> org.walkmod:walkmod-cmd/maven-metadata.xml, locally cached metadata >>> up-to-date. >>> [DEBUG] Skipped remote update check for >>> org.walkmod:walkmod-core/maven-metadata.xml, locally cached metadata >>> up-to-date. >>> [DEBUG] Skipped remote update check for >>> org.walkmod:merger/maven-metadata.xml, locally cached metadata up-to-date. >>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, >>> ConflictMarker.markTime=0, ConflictMarker.nodeCount=128, >>> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, >>> ConflictIdSorter.conflictIdCount=28, >>> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, >>> ConflictResolver.conflictItemCount=49, >>> DefaultDependencyCollector.collectTime=162, >>> DefaultDependencyCollector.transformTime=1} >>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, >>> ConflictMarker.markTime=0, ConflictMarker.nodeCount=159, >>> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, >>> ConflictIdSorter.conflictIdCount=37, >>> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, >>> ConflictResolver.conflictItemCount=159, >>> DefaultDependencyCollector.collectTime=294, >>> DefaultDependencyCollector.transformTime=3} >>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, >>> ConflictMarker.markTime=0, ConflictMarker.nodeCount=52, >>> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, >>> ConflictIdSorter.conflictIdCount=24, >>> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, >>> ConflictResolver.conflictItemCount=35, >>> DefaultDependencyCollector.collectTime=151, >>> DefaultDependencyCollector.transformTime=1} >>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, >>> ConflictMarker.markTime=0, ConflictMarker.nodeCount=2, >>> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, >>> ConflictIdSorter.conflictIdCount=2, >>> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, >>> ConflictResolver.conflictItemCount=2, >>> DefaultDependencyCollector.collectTime=6, >>> DefaultDependencyCollector.transformTime=0} >>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, >>> ConflictMarker.markTime=0, ConflictMarker.nodeCount=23, >>> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, >>> ConflictIdSorter.conflictIdCount=23, >>> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, >>> ConflictResolver.conflictItemCount=23, >>> DefaultDependencyCollector.collectTime=8, >>> DefaultDependencyCollector.transformTime=0} >>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, >>> ConflictMarker.markTime=0, ConflictMarker.nodeCount=157, >>> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, >>> ConflictIdSorter.conflictIdCount=36, >>> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, >>> ConflictResolver.conflictItemCount=157, >>> DefaultDependencyCollector.collectTime=10, >>> DefaultDependencyCollector.transformTime=2} >>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, >>> ConflictMarker.markTime=0, ConflictMarker.nodeCount=10, >>> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, >>> ConflictIdSorter.conflictIdCount=10, >>> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, >>> ConflictResolver.conflictItemCount=10, >>> DefaultDependencyCollector.collectTime=41, >>> DefaultDependencyCollector.transformTime=1} >>> ...continues in the same way... >>> >>> Thanks >>> ...... >>> >>> >>> >>> 2014-09-01 19:00 GMT+02:00 George Gastaldi : >>> >>>> Cool, >>>> >>>> To generate a JavaSource file is easy: >>>> >>>> String fqn = "com.george.app.MyClass"; >>>> String packageName = >>>> org.jboss.forge.roaster.model.util.Types.getPackage(fqn); >>>> String typeName = >>>> org.jboss.forge.roaster.model.util.Types.toSimpleName(fqn); >>>> JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class); >>>> JavaClassSource source = >>>> Roaster.create(JavaClassSource.class).setPackage(packageName) >>>> .setName(typeName).setSuperClass(MySuperClass.class); >>>> facet.saveJavaSource(source); >>>> >>>> Best Regards, >>>> >>>> George >>>> >>>> >>>> On 09/01/2014 01:04 PM, Raquel Pau Fern?ndez wrote: >>>> >>>> Hi, >>>> >>>> Perfect, it was what I need for the first question! >>>> >>>> About the second question: I would like to generate a Java source >>>> file. This java source file has a qualified name given by the user, and >>>> must be generated extending from an specific subclass. So, how can I do >>>> that with Forge? >>>> >>>> Thanks >>>> >>>> Best regards, >>>> >>>> >>>> >>>> 2014-09-01 3:34 GMT+02:00 George Gastaldi : >>>> >>>>> Hi Raquel, >>>>> >>>>> Sorry about that, it seems we are experiencing some issues in our >>>>> infrastructure, we'll fix it asap. >>>>> >>>>> About your questions: >>>>> 1) you need to get the MavenPluginFacet from the Project instance. In >>>>> your execute() method (assuming your command extends >>>>> AbstractProjectUICommand), do: >>>>> >>>>> Project project = getSelectedProject(context); >>>>> MavenPluginFacet facet = project.getFacet(MavenPluginFacet.class); >>>>> facet.addPlugin(...); >>>>> >>>>> 2) I haven't fully understood this, could you clarify with an >>>>> example please? >>>>> >>>>> I am replying from my phone, so I am not sure if the methods/classes >>>>> in the example given matches. >>>>> >>>>> Best Regards, >>>>> >>>>> George >>>>> >>>>> Em 31/08/2014, ?s 18:38, Raquel Pau Fern?ndez >>>>> escreveu: >>>>> >>>>> Hi, >>>>> >>>>> Your link was broken. However, I have followed the "How to create a >>>>> JBoss Forge Addon" of Arun Gupta from http://vimeo.com/jbossdeveloper >>>>> . >>>>> >>>>> Currently, I have created an addon, the commands and I have >>>>> installed my addon in my local Forge. All runs perfect! :) >>>>> >>>>> My addon allows: >>>>> >>>>> 1) To Install walkmod: Creates a fixed walkmod.xml and adds a Maven *plugin >>>>> *declaration into the user pom.xml. >>>>> 2) To run walkmod: It will run walkmod if it is installed. Otherwise >>>>> it will run an embedded version. >>>>> 3) To create a walkmod plugin: I need to create a default >>>>> implementation of a java class that extends an specific class. >>>>> >>>>> So, I have 2 questions: >>>>> 1) How can I modify the current pom.xml of the user? >>>>> 2) How can I create a default implementation of a java class file >>>>> using the Forge API? >>>>> >>>>> Thanks >>>>> >>>>> >>>>> >>>>> 2014-08-27 0:57 GMT+02:00 George Gastaldi : >>>>> >>>>>> Hi Raquel, >>>>>> >>>>>> The stacktrace doesn't show much. See if anything else is displayed >>>>>> oin the logs. >>>>>> >>>>>> In order to create a command in Forge, you need to use the UI addon >>>>>> services. Take a look on: >>>>>> http://forge.jboss.org/addon/org.jboss.forge.addon:ui >>>>>> >>>>>> Let me know how it goes. >>>>>> >>>>>> Em 26/08/2014, ?s 14:03, Raquel Pau Fern?ndez >>>>>> escreveu: >>>>>> >>>>>> Hi, >>>>>> >>>>>> 1) the full stacktrace is printed below. >>>>>> >>>>>> 2) I am using as you have mentioned, the version: 2.8.0.Final. >>>>>> Which version do you recommend me? >>>>>> >>>>>> 3) What do I mean about POJOs: I have coded a facade controller to >>>>>> run the walkmod (http://www.walkmod.com) commands - and my plugin is >>>>>> about running walkmod from forge. So, I would like to know how to link >>>>>> forge with my facade methods / walkmod commands. In other words, I would >>>>>> like to know if exists some place to configure it or the names of my facade >>>>>> methods must follow some sort of conventions. >>>>>> >>>>>> Thanks, >>>>>> >>>>>> >>>>>> ----------------------------Stacktrace---------------------------------- >>>>>> java.lang.IllegalStateException: Test runner could not locate test >>>>>> class [org.walkmod.forge.WalkmodAddonTest] in any deployed Addon. >>>>>> at >>>>>> org.jboss.forge.arquillian.ForgeTestMethodExecutor.invoke(ForgeTestMethodExecutor.java:234) >>>>>> at >>>>>> org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:109) >>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>> at >>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>> at >>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) >>>>>> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) >>>>>> at >>>>>> org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57) >>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>> at >>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>> at >>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) >>>>>> at >>>>>> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142) >>>>>> at >>>>>> org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129) >>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>> at >>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>> at >>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>>>> at >>>>>> org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102) >>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>> at >>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>> at >>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>>>> at >>>>>> org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84) >>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>> at >>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>> at >>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>>>> at >>>>>> org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65) >>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>>> at >>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>>> at >>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) >>>>>> at >>>>>> org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) >>>>>> at >>>>>> org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) >>>>>> at >>>>>> org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:294) >>>>>> at >>>>>> org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:269) >>>>>> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) >>>>>> at >>>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) >>>>>> at >>>>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) >>>>>> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) >>>>>> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) >>>>>> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) >>>>>> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) >>>>>> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) >>>>>> at >>>>>> org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193) >>>>>> at >>>>>> org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345) >>>>>> at >>>>>> org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49) >>>>>> at >>>>>> org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207) >>>>>> at org.junit.runners.ParentRunner.run(ParentRunner.java:309) >>>>>> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155) >>>>>> at >>>>>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) >>>>>> at >>>>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) >>>>>> at >>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) >>>>>> at >>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) >>>>>> at >>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) >>>>>> at >>>>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) >>>>>> >>>>>> >>>>>> >>>>>> 2014-08-26 18:15 GMT+02:00 George Gastaldi : >>>>>> >>>>>>> Hi Raquel, >>>>>>> >>>>>>> Do you see any stacktraces? Starting from Forge 2.8.0.Final the >>>>>>> cause should be displayed as a cause in the exception you are experiencing. >>>>>>> I am not sure about your other question. What POJOs are you talking >>>>>>> about? Can you clarify? >>>>>>> >>>>>>> Best Regards, >>>>>>> >>>>>>> George Gastaldi >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 08/26/2014 03:18 AM, Raquel Pau Fern?ndez wrote: >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I would like to create a forge addon and I have followed the >>>>>>> documentation. >>>>>>> >>>>>>> I am in the test section of >>>>>>> http://forge.jboss.org/document/develop-an-addon and I have the >>>>>>> following Exception when I run the first test code from . >>>>>>> >>>>>>> java.lang.IllegalStateException: Test runner could not locate test >>>>>>> class [.....] in any deployed Addon. >>>>>>> >>>>>>> Obviously, the test needs to fail, but I suspect that I cannot >>>>>>> write tests in the same forge addon project. Am I right? How can I correct >>>>>>> this Exception? >>>>>>> >>>>>>> Another question, how does forge link my Forge POJOs with the >>>>>>> forge commands? >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Raquel Pau >>>>>>> >>>>>>> *"Education is the most powerful weapon which you can use to change >>>>>>> the world**"* >>>>>>> >>>>>>> Nelson Mandela >>>>>>> >>>>>>> personal page: >>>>>>> http://sites.google.com/site/raquelpau/ >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> forge-dev mailing listforge-dev at lists.jboss.orghttps://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 >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Raquel Pau >>>>>> >>>>>> *"Education is the most powerful weapon which you can use to change >>>>>> the world**"* >>>>>> >>>>>> Nelson Mandela >>>>>> >>>>>> personal page: >>>>>> http://sites.google.com/site/raquelpau/ >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Raquel Pau >>>>> >>>>> *"Education is the most powerful weapon which you can use to change >>>>> the world**"* >>>>> >>>>> Nelson Mandela >>>>> >>>>> personal page: >>>>> http://sites.google.com/site/raquelpau/ >>>>> >>>>> _______________________________________________ >>>>> 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 >>>>> >>>> >>>> >>>> >>>> -- >>>> Raquel Pau >>>> >>>> *"Education is the most powerful weapon which you can use to change the >>>> world**"* >>>> >>>> Nelson Mandela >>>> >>>> personal page: >>>> http://sites.google.com/site/raquelpau/ >>>> >>>> >>>> _______________________________________________ >>>> forge-dev mailing listforge-dev at lists.jboss.orghttps://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 >>>> >>> >>> >>> >>> -- >>> Raquel Pau >>> >>> *"Education is the most powerful weapon which you can use to change the >>> world**"* >>> >>> Nelson Mandela >>> >>> personal page: >>> http://sites.google.com/site/raquelpau/ >>> >>> >>> _______________________________________________ >>> forge-dev mailing listforge-dev at lists.jboss.orghttps://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 >>> >> >> >> >> -- >> Raquel Pau >> >> *"Education is the most powerful weapon which you can use to change the >> world**"* >> >> Nelson Mandela >> >> personal page: >> http://sites.google.com/site/raquelpau/ >> > > > > -- > Raquel Pau > > *"Education is the most powerful weapon which you can use to change the > world**"* > > Nelson Mandela > > personal page: > http://sites.google.com/site/raquelpau/ > > _______________________________________________ > 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 > -- Raquel Pau *"Education is the most powerful weapon which you can use to change the world**"* Nelson Mandela personal page: http://sites.google.com/site/raquelpau/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20140902/44984e7d/attachment-0001.html From lincolnbaxter at gmail.com Wed Sep 3 11:29:15 2014 From: lincolnbaxter at gmail.com (Lincoln Baxter, III) Date: Wed, 3 Sep 2014 11:29:15 -0400 Subject: [forge-dev] Forge Meeting Minutes - 2014-09-03 Message-ID: Minutes: http://transcripts.jboss.org/meeting/irc.freenode.org/forge/2014/forge.2014-09-03-15.04.html Minutes (text): http://transcripts.jboss.org/meeting/irc.freenode.org/forge/2014/forge.2014-09-03-15.04.txt Log: http://transcripts.jboss.org/meeting/irc.freenode.org/forge/2014/forge.2014-09-03-15.04.log.html Meeting summary --------------- * Agenda (lincolnthree, 15:05:54) * Status Reports (lincolnthree, 15:09:26) * Some JBDS blocking issues (CLI crashes and Cheatsheet [in progress]) * Conference Updates (JavaOne and Devoxx BE) (lincolnthree, 15:21:29) * We currently have not started any conference material for JavaOne or Devoxx BE (lincolnthree, 15:22:31) * we will work on content creation next week via hangout (lincolnthree, 15:27:19) * Website Status (lincolnthree, 15:27:21) * We are currently waiting for Erin to come back with the updated designs (lincolnthree, 15:27:42) * I would like to have at least the front splash page implemented by JavaOne (lincolnthree, 15:27:52) Meeting ended at 15:28:03 UTC. -- Lincoln Baxter, III http://ocpsoft.org "Simpler is better." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20140903/0c65f772/attachment.html From forge-dev at lists.jboss.org Thu Sep 4 12:06:25 2014 From: forge-dev at lists.jboss.org (forge-dev at lists.jboss.org) Date: Thu, 04 Sep 2014 12:06:25 EDT Subject: [forge-dev] Custom Templates by Project In-Reply-To: <652953364.15956026.1401861058080.JavaMail.zimbra@redhat.com> Message-ID: <210570305.11409846815899.JavaMail.jive@jive-app01.app.mwc.hst.phx2.redhat.com> Hi I am using forge 2.8.1.Final but i can't find any way to introduce project level templates for angularjs scaffolding is there any documentation about this subject ?? thanks Posted by forums Original post: https://developer.jboss.org/message/902938#902938 From lincolnbaxter at gmail.com Wed Sep 10 11:45:44 2014 From: lincolnbaxter at gmail.com (Lincoln Baxter, III) Date: Wed, 10 Sep 2014 11:45:44 -0400 Subject: [forge-dev] Forge Meeting Minutes - 2014-09-10 Message-ID: Minutes: http://transcripts.jboss.org/meeting/irc.freenode.org/forge/2014/forge.2014-09-10-15.04.html Minutes (text): http://transcripts.jboss.org/meeting/irc.freenode.org/forge/2014/forge.2014-09-10-15.04.txt Log: http://transcripts.jboss.org/meeting/irc.freenode.org/forge/2014/forge.2014-09-10-15.04.log.html Meeting summary --------------- * Agenda (lincolnthree, 15:05:38) * Conference Prep Plans (lincolnthree, 15:06:38) * Status Reports & JBDS status (gastaldi, 15:16:25) * I'm working on FORGE-2003, we dont want to release to the public with this kind of bug in the core resolver (lincolnthree, 15:20:18) * Website Status (lincolnthree, 15:27:04) * all changes to JBDS should be done by Thursday night (GMT-4) (gastaldi, 15:31:43) * LINK: https://issues.jboss.org/browse/JBIDE-18223?filter=12321870&jql=project%20%3D%20JBIDE%20AND%20affectedVersion%20%3E%3D%204.2.0.Beta1%20AND%20status%20not%20in%20(Closed)%20AND%20component%20%3D%20forge%20ORDER%20BY%20status%20ASC (lincolnthree, 15:32:29) * LINK: http://imgur.com/0V8meQM (lincolnthree, 15:39:11) * http://imgur.com/0V8meQM (lincolnthree, 15:39:13) -- Lincoln Baxter, III http://ocpsoft.org "Simpler is better." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20140910/1a0ac38b/attachment.html From lincolnbaxter at gmail.com Thu Sep 11 17:46:17 2014 From: lincolnbaxter at gmail.com (Lincoln Baxter, III) Date: Thu, 11 Sep 2014 17:46:17 -0400 Subject: [forge-dev] Forge 2.10.0.Final Released! Message-ID: Go get it! Several key features fixed! Developing Addons just got easier :) http://forge.jboss.org/download Bug - [FORGE-2003 ] - Forge workspace resolver fails to resolve local resource dependencies that are specified as - [FORGE-2008 ] - Broken history in Forge console Component Upgrade - [FORGE-2009 ] - Upgrade to Roaster 2.8.0.Final Enhancement - [FORGE-2002 ] - javaee-setup adds JavaEE 6 POM as a managed dependency when --javaEEVersion 7 is chosen - [FORGE-2004 ] - UIContext.getSelection() should return a UISelection object - [FORGE-2006 ] - Add @PreMatching to the CORS Filter - [FORGE-2007 ] - JPA: Generate Entities From Tables wizard should tell people when something has gone wrong Feature Request - [FORGE-2005 ] - Display the project build errors after a command is executed when in a project context -- Lincoln Baxter, III http://ocpsoft.org "Simpler is better." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20140911/2bd1935f/attachment.html From lincolnbaxter at gmail.com Wed Sep 17 11:29:47 2014 From: lincolnbaxter at gmail.com (Lincoln Baxter, III) Date: Wed, 17 Sep 2014 11:29:47 -0400 Subject: [forge-dev] Forge Meeting Minutes - 2014-09-17 Message-ID: This week's meeting cancelled due to high work-load. Everyone knows what they are working on. We are getting ready for the JBDS8 release and for JavaOne. -- Lincoln Baxter, III http://ocpsoft.org "Simpler is better." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20140917/d9e7b1f2/attachment.html From lincolnbaxter at gmail.com Wed Sep 24 11:19:42 2014 From: lincolnbaxter at gmail.com (Lincoln Baxter, III) Date: Wed, 24 Sep 2014 11:19:42 -0400 Subject: [forge-dev] Forge Meeting Minutes - 2014-09-24 Message-ID: Minutes: http://transcripts.jboss.org/meeting/irc.freenode.org/forge/2014/forge.2014-09-24-15.06.html Minutes (text): http://transcripts.jboss.org/meeting/irc.freenode.org/forge/2014/forge.2014-09-24-15.06.txt Log: http://transcripts.jboss.org/meeting/irc.freenode.org/forge/2014/forge.2014-09-24-15.06.log.html Meeting summary --------------- * Agenda (lincolnthree, 15:06:46) * JBDS status (lincolnthree, 15:07:04) * will be doing a forge release on Friday the 26th to get into JBDS CR2 (lincolnthree, 15:13:57) * Website status (lincolnthree, 15:15:18) * J1 / Conf status (lincolnthree, 15:16:19) * george and i are still working on our J1 presos like madmen (lincolnthree, 15:16:32) Meeting ended at 15:18:43 UTC. -- Lincoln Baxter, III http://ocpsoft.org "Simpler is better." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20140924/26e37f7f/attachment.html From ivan.st.ivanov at gmail.com Mon Sep 29 14:49:31 2014 From: ivan.st.ivanov at gmail.com (ivan.st.ivanov at gmail.com) Date: Mon, 29 Sep 2014 18:49:31 +0000 Subject: [forge-dev] =?windows-1251?b?wO3z6+jw4O3uIPH64ejy6OU6IEZvcmdlIGhh?= =?windows-1251?b?Y2sgbmlnaHQgQCDi8iAzMCDR5e/yLiAyMDE0IDIxOjMwIC0g?= =?windows-1251?q?23=3A30_=28Ivan_St=2E_Ivanov=29?= Message-ID: <089e0160a4982fddc0050438ba46@google.com> ???? ??????? ?? ????????? ? ?????????? ?? ????????? ??. ????????: Forge hack night With Forge 2 finally out, it is time to develop the killer addons for it. If you want to create a new addon, if you want to migrate your existing Forge 1 plugin or if you just want to feel the Forge developer or user experience, you are more than welcome to this regular night hacking sessions. Pick up a JIRA issue and meet in the web chat with the experienced Forge developers! Or just come and say Hi! ????: ?? 30 ????. 2014 21:30 ? 23:30 ????? ????: http://webchat.freenode.net/ channel #forge ????????: Ivan St. Ivanov ???: * Ivan St. Ivanov- ??????????? * forge-dev at lists.jboss.org ?????? ?? Google ????????: https://www.google.com/calendar/ ????????? ???? ????? ?? ???? ???????? ?? ????? forge-dev at lists.jboss.org, ?????? ??? ???? ?? ?????????? ?? ???? ???????. ???????? ???? ???????, ?? ?? ????????????? ???????????? ?? ?????? ???????? ?? ????. ????? ????, ?????? ?? ?? ???????????? ?????? ? Google ???????? ?? ????? https://www.google.com/calendar/, ???????? ?? ??????????? ??????????? ?? ??????????? ?? ????? ?? ????????. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20140929/18575e5b/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/calendar Size: 1669 bytes Desc: not available Url : http://lists.jboss.org/pipermail/forge-dev/attachments/20140929/18575e5b/attachment-0002.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: invite.ics Type: application/ics Size: 1718 bytes Desc: not available Url : http://lists.jboss.org/pipermail/forge-dev/attachments/20140929/18575e5b/attachment-0003.bin