Re: first plugin

2010-10-05 Thread Leon Rosenberg
Hello,

thanks for the help.

the plugin.xml (packaged) looks like follows:
?xml version=1.0 encoding=UTF-8?
plugin
  description/description
  groupIdnet.anotheria/groupId
  artifactIdmaven-ano-doc-plugin/artifactId
  version1.0-SNAPSHOT/version
  goalPrefixano-doc/goalPrefix
  isolatedRealmfalse/isolatedRealm
  inheritedByDefaulttrue/inheritedByDefault
  mojos/
  dependencies
dependency
  groupIdorg.apache.maven/groupId
  artifactIdmaven-plugin-api/artifactId
  typejar/type
  version2.0/version
/dependency
  /dependencies
/plugin

mvn help:describe  fails:
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Error building POM (may not be this project's POM).


Project ID: org.apache.maven.plugins:maven-help-plugin

Reason: Error getting POM for
'org.apache.maven.plugins:maven-help-plugin' from the repository:
Failed to resolve artifact, possibly due to a repository list that is
not appropriately equipped for this artifact's metadata.
  org.apache.maven.plugins:maven-help-plugin:pom:2.2-SNAPSHOT

from the specified remote repositories:
  nexus (http://nexus.anotheria.net/nexus/content/groups/public)

 for project org.apache.maven.plugins:maven-help-plugin




On Tue, Oct 5, 2010 at 12:21 AM, Justin Edelson
jus...@justinedelson.com wrote:
 Hard to tell from this code. Check the plugin.xml file which is being
 generated. Also mvn help:describe (which uses the plugin.xml
 descriptor IIRC).

 Also, my guess is that you don't actually want to include this line:
 * @execute phase=generate-sources

 But I doubt that's the source of the error below.

 Justin



 On Mon, Oct 4, 2010 at 5:50 PM, Leon Rosenberg rosenberg.l...@gmail.com 
 wrote:
 Hello,

 I'm currently writing my first plugin and am struggling with very basics.
 From the guide 
 (http://maven.apache.org/guides/plugin/guide-java-plugin-development.html)
 I understood that if I
 specify a goal in a javadoc annotation I will able to call it later
 directly, but I fail to achieve it. In my plugin I'm annotating the
 code with generate:


 /**
  * Generates ano-doc classes.
  *
  * @goal generate
  * @phase generate-sources
  * @execute phase=generate-sources
  *
  */
 public class GeneratorMojo extends AbstractMojo{

        public void execute() throws MojoExecutionException, 
 MojoFailureException {
                getLog().info(Y HEI);

        }

 }

 After the packaging, and installing, and running from the directory I
 want to use it:
 anot...@colin:~/projects/aos/ano-site$ mvn ano-doc:generate
 [INFO] Scanning for projects...
 [INFO] 
 
 [ERROR] BUILD FAILURE
 [INFO] 
 
 [INFO] Required goal not found: ano-doc:generate in
 net.anotheria:maven-ano-doc-plugin:1.0-SNAPSHOT
 [INFO] 
 
 [INFO] For more information, run Maven with the -e switch
 [INFO] 
 
 [INFO] Total time:  1 second
 [INFO] Finished at: Mon Oct 04 23:48:07 CEST 2010
 [INFO] Final Memory: 8M/81M


 My plugin pom looks like this:
 project
  modelVersion4.0.0/modelVersion
  groupIdnet.anotheria/groupId
  artifactIdmaven-ano-doc-plugin/artifactId
  packagingmaven-plugin/packaging
  version1.0-SNAPSHOT/version
  nameAnoDoc Generator for Maven/name

        distributionManagement
                !--omited--
        /distributionManagement

  dependencies
    dependency
      groupIdorg.apache.maven/groupId
      artifactIdmaven-plugin-api/artifactId
      version2.0/version
    /dependency
  /dependencies
 /project

 my pom in which I intend to use the new project :
  build
        plugins
      plugin
        groupIdnet.anotheria/groupId
        artifactIdmaven-ano-doc-plugin/artifactId
        version1.0-SNAPSHOT/version
        executions
          execution
            phasegenerate-sources/phase
            goals
              goalgenerate/goal
            /goals
          /execution
        /executions
      /plugin
    /plugins
  /build


 any help would be greatly appreciated
 regards
 Leon

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: 

Re: first plugin

2010-10-05 Thread Leon Rosenberg
ok, resolved, my error, i forgot to explicitly include the compile
plugin, therefor my plugin was packaged but contained no classes.
thanx for the help. now i only need to force the using project to add
generated classes to the source dirs ;-)

regards
Leon

On Tue, Oct 5, 2010 at 8:11 AM, Leon Rosenberg rosenberg.l...@gmail.com wrote:
 Hello,

 thanks for the help.

 the plugin.xml (packaged) looks like follows:
 ?xml version=1.0 encoding=UTF-8?
 plugin
  description/description
  groupIdnet.anotheria/groupId
  artifactIdmaven-ano-doc-plugin/artifactId
  version1.0-SNAPSHOT/version
  goalPrefixano-doc/goalPrefix
  isolatedRealmfalse/isolatedRealm
  inheritedByDefaulttrue/inheritedByDefault
  mojos/
  dependencies
    dependency
      groupIdorg.apache.maven/groupId
      artifactIdmaven-plugin-api/artifactId
      typejar/type
      version2.0/version
    /dependency
  /dependencies
 /plugin

 mvn help:describe  fails:
 [INFO] Scanning for projects...
 [INFO] Searching repository for plugin with prefix: 'help'.
 [INFO] 
 
 [ERROR] BUILD ERROR
 [INFO] 
 
 [INFO] Error building POM (may not be this project's POM).


 Project ID: org.apache.maven.plugins:maven-help-plugin

 Reason: Error getting POM for
 'org.apache.maven.plugins:maven-help-plugin' from the repository:
 Failed to resolve artifact, possibly due to a repository list that is
 not appropriately equipped for this artifact's metadata.
  org.apache.maven.plugins:maven-help-plugin:pom:2.2-SNAPSHOT

 from the specified remote repositories:
  nexus (http://nexus.anotheria.net/nexus/content/groups/public)

  for project org.apache.maven.plugins:maven-help-plugin




 On Tue, Oct 5, 2010 at 12:21 AM, Justin Edelson
 jus...@justinedelson.com wrote:
 Hard to tell from this code. Check the plugin.xml file which is being
 generated. Also mvn help:describe (which uses the plugin.xml
 descriptor IIRC).

 Also, my guess is that you don't actually want to include this line:
 * @execute phase=generate-sources

 But I doubt that's the source of the error below.

 Justin



 On Mon, Oct 4, 2010 at 5:50 PM, Leon Rosenberg rosenberg.l...@gmail.com 
 wrote:
 Hello,

 I'm currently writing my first plugin and am struggling with very basics.
 From the guide 
 (http://maven.apache.org/guides/plugin/guide-java-plugin-development.html)
 I understood that if I
 specify a goal in a javadoc annotation I will able to call it later
 directly, but I fail to achieve it. In my plugin I'm annotating the
 code with generate:


 /**
  * Generates ano-doc classes.
  *
  * @goal generate
  * @phase generate-sources
  * @execute phase=generate-sources
  *
  */
 public class GeneratorMojo extends AbstractMojo{

        public void execute() throws MojoExecutionException, 
 MojoFailureException {
                getLog().info(Y HEI);

        }

 }

 After the packaging, and installing, and running from the directory I
 want to use it:
 anot...@colin:~/projects/aos/ano-site$ mvn ano-doc:generate
 [INFO] Scanning for projects...
 [INFO] 
 
 [ERROR] BUILD FAILURE
 [INFO] 
 
 [INFO] Required goal not found: ano-doc:generate in
 net.anotheria:maven-ano-doc-plugin:1.0-SNAPSHOT
 [INFO] 
 
 [INFO] For more information, run Maven with the -e switch
 [INFO] 
 
 [INFO] Total time:  1 second
 [INFO] Finished at: Mon Oct 04 23:48:07 CEST 2010
 [INFO] Final Memory: 8M/81M


 My plugin pom looks like this:
 project
  modelVersion4.0.0/modelVersion
  groupIdnet.anotheria/groupId
  artifactIdmaven-ano-doc-plugin/artifactId
  packagingmaven-plugin/packaging
  version1.0-SNAPSHOT/version
  nameAnoDoc Generator for Maven/name

        distributionManagement
                !--omited--
        /distributionManagement

  dependencies
    dependency
      groupIdorg.apache.maven/groupId
      artifactIdmaven-plugin-api/artifactId
      version2.0/version
    /dependency
  /dependencies
 /project

 my pom in which I intend to use the new project :
  build
        plugins
      plugin
        groupIdnet.anotheria/groupId
        artifactIdmaven-ano-doc-plugin/artifactId
        version1.0-SNAPSHOT/version
        executions
          execution
            phasegenerate-sources/phase
            goals
              goalgenerate/goal
            /goals
          /execution
        /executions
      /plugin
    /plugins
  /build


 any help would be greatly appreciated
 regards
 Leon

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



 

Re: first plugin

2010-10-05 Thread Jörg Schaible
Hi Leon,

Leon Rosenberg wrote:

 ok, resolved, my error, i forgot to explicitly include the compile
 plugin, therefor my plugin was packaged but contained no classes.
 thanx for the help. now i only need to force the using project to add
 generated classes to the source dirs ;-)

What do you mean with include the compile plugin ?

- Jörg


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: first plugin

2010-10-05 Thread Leon Rosenberg
Hello Jörg,

basically add this to my pom

  build
finalName${artifactId}-${version}/finalName
sourceDirectory${project.basedir}/java/sourceDirectory
plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
version2.3.2/version
configuration
source1.6/source
target1.6/target
/configuration
/plugin
  /plugins
  /build


On Tue, Oct 5, 2010 at 11:16 AM, Jörg Schaible joerg.schai...@gmx.de wrote:
 Hi Leon,

 Leon Rosenberg wrote:

 ok, resolved, my error, i forgot to explicitly include the compile
 plugin, therefor my plugin was packaged but contained no classes.
 thanx for the help. now i only need to force the using project to add
 generated classes to the source dirs ;-)

 What do you mean with include the compile plugin ?

 - Jörg


 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: first plugin

2010-10-05 Thread Wendy Smoak
On Tue, Oct 5, 2010 at 7:10 AM, Leon Rosenberg rosenberg.l...@gmail.com wrote:
 basically add this to my pom
...
    sourceDirectory${project.basedir}/java/sourceDirectory

Did you add this at the same time?  If so, that's what did it...
without that Maven would expect the classes to be in src/main/java, so
nothing would have been compiled.

-- 
Wendy

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: first plugin

2010-10-05 Thread Leon Rosenberg
i have had the sources in src/main/java previously but that didn't
help either :-)

but it works now ;-)

the last thing i'm struggling with now is that hudson is executing my
builds with jre, not jdk, therefore my apt processors do not work.

On Tue, Oct 5, 2010 at 2:52 PM, Wendy Smoak wsm...@gmail.com wrote:
 On Tue, Oct 5, 2010 at 7:10 AM, Leon Rosenberg rosenberg.l...@gmail.com 
 wrote:
 basically add this to my pom
 ...
    sourceDirectory${project.basedir}/java/sourceDirectory

 Did you add this at the same time?  If so, that's what did it...
 without that Maven would expect the classes to be in src/main/java, so
 nothing would have been compiled.

 --
 Wendy

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: first plugin

2010-10-04 Thread Justin Edelson
Hard to tell from this code. Check the plugin.xml file which is being
generated. Also mvn help:describe (which uses the plugin.xml
descriptor IIRC).

Also, my guess is that you don't actually want to include this line:
* @execute phase=generate-sources

But I doubt that's the source of the error below.

Justin



On Mon, Oct 4, 2010 at 5:50 PM, Leon Rosenberg rosenberg.l...@gmail.com wrote:
 Hello,

 I'm currently writing my first plugin and am struggling with very basics.
 From the guide 
 (http://maven.apache.org/guides/plugin/guide-java-plugin-development.html)
 I understood that if I
 specify a goal in a javadoc annotation I will able to call it later
 directly, but I fail to achieve it. In my plugin I'm annotating the
 code with generate:


 /**
  * Generates ano-doc classes.
  *
  * @goal generate
  * @phase generate-sources
  * @execute phase=generate-sources
  *
  */
 public class GeneratorMojo extends AbstractMojo{

        public void execute() throws MojoExecutionException, 
 MojoFailureException {
                getLog().info(Y HEI);

        }

 }

 After the packaging, and installing, and running from the directory I
 want to use it:
 anot...@colin:~/projects/aos/ano-site$ mvn ano-doc:generate
 [INFO] Scanning for projects...
 [INFO] 
 
 [ERROR] BUILD FAILURE
 [INFO] 
 
 [INFO] Required goal not found: ano-doc:generate in
 net.anotheria:maven-ano-doc-plugin:1.0-SNAPSHOT
 [INFO] 
 
 [INFO] For more information, run Maven with the -e switch
 [INFO] 
 
 [INFO] Total time:  1 second
 [INFO] Finished at: Mon Oct 04 23:48:07 CEST 2010
 [INFO] Final Memory: 8M/81M


 My plugin pom looks like this:
 project
  modelVersion4.0.0/modelVersion
  groupIdnet.anotheria/groupId
  artifactIdmaven-ano-doc-plugin/artifactId
  packagingmaven-plugin/packaging
  version1.0-SNAPSHOT/version
  nameAnoDoc Generator for Maven/name

        distributionManagement
                !--omited--
        /distributionManagement

  dependencies
    dependency
      groupIdorg.apache.maven/groupId
      artifactIdmaven-plugin-api/artifactId
      version2.0/version
    /dependency
  /dependencies
 /project

 my pom in which I intend to use the new project :
  build
        plugins
      plugin
        groupIdnet.anotheria/groupId
        artifactIdmaven-ano-doc-plugin/artifactId
        version1.0-SNAPSHOT/version
        executions
          execution
            phasegenerate-sources/phase
            goals
              goalgenerate/goal
            /goals
          /execution
        /executions
      /plugin
    /plugins
  /build


 any help would be greatly appreciated
 regards
 Leon

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: First plugin

2004-07-23 Thread Charles Daniels
 -Original Message-
 From: STRAYER, JON (SBCSI) [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 23, 2004 4:23 PM
 To: 'Maven Users List'
 Subject: First plugin


 I'm working on my first plugin.  Should I need to delete it
 from the cache each time in install it?

 Maven doesn't seem to pick up the changes otherwise.

You should simply execute the plugin:uninstall goal before plugin:install.
No need to manually delete the cache, as plugin:uninstall will invalidate it
for you.  From what I've found, you really only need to run plugin:uninstall
if you have added or removed a goal/preGoal/postGoal in your plugin.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]