Sorry for the late reply.

It looks right from what I'm seeing.
Any chance you could put your code up on github, or send me a zip?

Thanks,
Lincoln

On Fri, Sep 23, 2011 at 10:22 AM, Cordenier Christophe <Christophe.Cordenier@atos.net> wrote:

Sure

 

I tried with a Facet that @RequiresProject but got it simplified for testing purpose, i have removed javax.inject dependencies but still not working.

 

I must miss something.

 

See :

 

package net.atos.test;

 

import javax.inject.Inject;

import javax.inject.Named;

 

import org.jboss.forge.shell.ShellPrompt;

import org.jboss.forge.shell.plugins.Alias;

import org.jboss.forge.shell.plugins.Command;

import org.jboss.forge.shell.plugins.DefaultCommand;

import org.jboss.forge.shell.plugins.Option;

import org.jboss.forge.shell.plugins.PipeOut;

 

@Alias("forgest")

@Named("forgest")

public class ForgestPlugin

                               implements org.jboss.forge.shell.plugins.Plugin {

 

                @Inject

                private ShellPrompt prompt;

 

                @DefaultCommand

                public void exampleDefaultCommand(PipeOut out, @Option String opt) {

                               out.println(">> invoked default command with option value: " + opt);

                }

 

                public @Command("run")

                void run(PipeOut out, @Option(name = "value") final String arg) {

                               System.out.println("Executed default command with value: " + arg);

                }

}

 

and pom.xml

 

<?xml version="1.0" encoding="UTF-8"?>

<project

                xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"

                xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

                <modelVersion>4.0.0</modelVersion>

                <groupId>net.atos.test</groupId>

                <artifactId>forgest</artifactId>

                <version>1.0.0-SNAPSHOT</version>

                <properties>

                               <forge.api.version>1.0.0.Beta2</forge.api.version>

                </properties>

                <dependencies>

                               <dependency>

                                               <groupId>org.jboss.forge</groupId>

                                               <artifactId>forge-test-harness</artifactId>

                                               <version>${forge.api.version}</version>

                                               <scope>test</scope>

                               </dependency>

                               <dependency>

                                               <groupId>org.jboss.forge</groupId>

                                               <artifactId>forge-shell</artifactId>

                                               <version>${forge.api.version}</version>

                                               <scope>test</scope>

                               </dependency>

                               <dependency>

                                               <groupId>org.jboss.forge</groupId>

                                               <artifactId>forge-shell-api</artifactId>

                                               <version>1.0.0.Beta2</version>

                                               <scope>provided</scope>

                               </dependency>

                </dependencies>

                <repositories>

                               <repository>

                                               <id>JBOSS_NEXUS</id>

                                               <url>http://repository.jboss.org/nexus/content/groups/public</url>

                               </repository>

                </repositories>

                <build>

                               <finalName>forgest</finalName>

                               <plugins>

                                               <plugin>

                                                               <artifactId>maven-compiler-plugin</artifactId>

                                                               <version>2.3.2</version>

                                                               <configuration>

                                                                              <source>1.6</source>

                                                                              <target>1.6</target>

                                                               </configuration>

                                               </plugin>

                               </plugins>

                </build>

</project>

 

Regards

Christophe

 

De : Lincoln Baxter, III [mailto:lincolnbaxter@gmail.com]
Envoyé : vendredi 23 septembre 2011 16:14


À : Cordenier Christophe
Cc : forge-users@lists.jboss.org
Objet : Re: [forge-users] Problem installing new commands 1.0.0-Beta2

 

Does your login require a project? @RequiresProject?  Or any facets?

If so, have those conditions been met? Could you please paste your plugin class code? Are you including any 3rd party dependencies in the project?

It looks like you included javax.inject.  Could you also paste your pom.xml? Thanks

--
Lincoln Baxter's Droid
http://ocpsoft.com
"Keep it Simple"

On Sep 23, 2011 10:10 AM, "Cordenier Christophe" <Christophe.Cordenier@atos.net> wrote:
> Actually, this is what i did, close and restart.
>
> I am currently comparing forge tools for future needs, and i really appreciate seam forge, since it's non intrusive as Spring ROO can be with all its aspectj's files. But i'am stuck with this issue.
>
> Christophe.
>
> De : Lincoln Baxter, III [mailto:lincolnbaxter@gmail.com]
> Envoyé : vendredi 23 septembre 2011 16:05
> À : Cordenier Christophe
> Cc : forge-users@lists.jboss.org
> Objet : Re: [forge-users] Problem installing new commands 1.0.0-Beta2
>
>
> If you want to more rapidly test the plugin, I recommend writing a test case with the forge test harness :)
>
> --
> Lincoln Baxter's Droid
> http://ocpsoft.com
> "Keep it Simple"
> On Sep 23, 2011 10:03 AM, "Lincoln Baxter, III" <lincolnbaxter@gmail.com<mailto:lincolnbaxter@gmail.com>> wrote:
>> You need to actually close forge and restart it at the moment. We changed
>> how plains are loaded and haven't gotten hot-loading back yet :/ its coming
>> though. Never fear :)
>>
>> --
>> Lincoln Baxter's Droid
>> http://ocpsoft.com
>> "Keep it Simple"
>> On Sep 23, 2011 4:02 AM, "Cordenier Christophe" <
>> Christophe.Cordenier@atos.net<mailto:Christophe.Cordenier@atos.net>> wrote:
>>> Hi
>>>
>>> I am currently testing seam forge 1.0.0-beta2 and especially trying to
>> create custom plugins. But after following the documentation and installing
>> the plugin successfully, seam forge still does not recognize my new
>> commands...
>>>
>>> After setting the @Alias and @Named of my plugin to "forgest",
>> implementing a default command and let the sample one 'run' as is. i
>> installed my new plugin as follows :
>>>
>>> [no project] Temp $ forge source-plugin d:\Temp\forgest
>>> ***INFO*** Invoking build with underlying build system.
>>> [INFO] Scanning for projects...
>>> [INFO]
>>> [INFO]
>> ------------------------------------------------------------------------
>>> [INFO] Building forgest 1.0.0-SNAPSHOT
>>> [INFO]
>> ------------------------------------------------------------------------
>>> [INFO]
>>> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ forgest ---
>>> [INFO] Deleting d:\Temp\forgest\target
>>> [INFO]
>>> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
>> forgest
>>> ---
>>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources,
>>> i.e. build is platform dependent!
>>> [INFO] Copying 2 resources
>>> [INFO]
>>> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ forgest
>> ---
>>> [WARNING] File encoding has not been set, using platform encoding Cp1252,
>> i.e. b
>>> uild is platform dependent!
>>> [INFO] Compiling 1 source file to d:\Temp\forgest\target\classes
>>> [INFO]
>>> [INFO] --- maven-resources-plugin:2.4.3:testResources
>> (default-testResources) @
>>> forgest ---
>>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources,
>>> i.e. build is platform dependent!
>>> [INFO] Copying 0 resource
>>> [INFO]
>>> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
>> forge
>>> st ---
>>> [INFO] Nothing to compile - all classes are up to date
>>> [INFO]
>>> [INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ forgest ---
>>> [INFO] Surefire report directory: d:\Temp\forgest\target\surefire-reports
>>>
>>> -------------------------------------------------------
>>> T E S T S
>>> -------------------------------------------------------
>>> There are no tests to run.
>>>
>>> Results :
>>>
>>> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>>>
>>> [INFO]
>>> [INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ forgest ---
>>> [INFO] Building jar: d:\Temp\forgest\target\forgest.jar
>>> [INFO]
>> ------------------------------------------------------------------------
>>> [INFO] BUILD SUCCESS
>>> [INFO]
>> ------------------------------------------------------------------------
>>> [INFO] Total time: 5.141s
>>> [INFO] Finished at: Fri Sep 23 09:48:00 CEST 2011
>>> [INFO] Final Memory: 9M/22M
>>> [INFO]
>> ------------------------------------------------------------------------
>>> ***SUCCESS*** Build successful.
>>> ***INFO*** Installing plugin artifact.
>>> ? An existing installation for version [1.0.0-SNAPSHOT] of this plugin was
>> foun
>>> d. Replace it? [Y/n] Y
>>> Warning: The encoding 'UTF-8' is not supported by the Java runtime.
>>> Warning: The encoding 'UTF-8' is not supported by the Java runtime.
>>> Warning: The encoding 'UTF-8' is not supported by the Java runtime.
>>> ***SUCCESS*** Installed from [forgest] successfully.
>>> ***INFO*** Please restart Forge to complete plugin installation.
>>> Wrote D:\/Documents and
>> Settings/a136316/.forge/plugins/net/atos/test/forgest/1.
>>> 0.0-SNAPSHOT/forgest.jar
>>> Wrote D:\/Documents and
>> Settings/a136316/.forge/plugins/net/atos/test/forgest/1.
>>> 0.0-SNAPSHOT/module.xml
>>> Wrote D:\/Documents and
>> Settings/a136316/.forge/plugins/net/atos/test/forgest/de
>>> pendencies/1.0.0-SNAPSHOT/javax.inject-1.jar
>>> Wrote D:\/Documents and
>> Settings/a136316/.forge/plugins/net/atos/test/forgest/de
>>> pendencies/1.0.0-SNAPSHOT/module.xml
>>> Wrote D:\/Documents and
>> Settings/a136316/.forge/plugins/org/jboss/forge/plugins/
>>> main/module.xml
>>> [no project] Temp $ forge restart
>>> Windows? Really? Okay...
>>>
>>> [no project] Temp $ forgest
>>> ***ERROR*** No such command: forgest
>>>
>>> Any clue ?
>>>
>>> Christophe Cordenier
>>>
>>> ________________________________
>>>
>>> Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage
>> exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret
>> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
>> imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne
>> pouvant ?tre assur?e sur Internet, la responsabilit? d'Atos ne pourra ?tre
>> recherch?e quant au contenu de ce message. Bien que les meilleurs efforts
>> soient faits pour maintenir cette transmission exempte de tout virus,
>> l'exp?diteur ne donne aucune garantie ? cet ?gard et sa responsabilit? ne
>> saurait ?tre recherch?e pour tout dommage r?sultant d'un virus transmis.
>>>
>>> This e-mail and the documents attached are confidential and intended
>> solely for the addressee; it may also be privileged. If you receive this
>> e-mail in error, please notify the sender immediately and destroy it. As its
>> integrity cannot be secured on the Internet, the Atos liability cannot be
>> triggered for the message content. Although the sender endeavours to
>> maintain a computer virus-free network, the sender does not warrant that
>> this transmission is virus-free and will not be liable for any damages
>> resulting from any virus transmitted.
>
> ________________________________
>
> Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité d'Atos ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.
>
> This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.




Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité d'Atos ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

_______________________________________________
forge-users mailing list
forge-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-users




--
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"