You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Vincent Massol (JIRA)" <ji...@codehaus.org> on 2005/04/23 08:54:46 UTC

[jira] Created: (MNG-348) Create Verifier plugin

Create Verifier plugin
----------------------

         Key: MNG-348
         URL: http://jira.codehaus.org/browse/MNG-348
     Project: m2
        Type: Task
  Components: maven-plugins  
    Versions: 2.0-alpha-1    
    Reporter: Vincent Massol
 Assigned to: Vincent Massol 


Create a plugin that will allow verifying existence and contents of files and directories. It could be used when performing integration tests, for example when writing m2 plugins. It could be later on expanded for other types of tests too.

The way it'll work is that it'll have a configuration similar to:

<verifications>
  <files>
    <file>
      <location>${basedir}/target/clover/clover.db</location>
      <contains>[enter a regexp here - This is optional]</contains>
      <test>exist (default)|notfound</test>
    </file>
    <file>[...]
  </files>
</verifications>

This file will be called verifications.xml (for example) in user's projects and the plugin will look for it by default in src/test/verifier/verifications.xml

This plugin will be bound to an integration testing phase that Brett will add to maven-core/src/main/resources/META-INF/plexus/components.xml.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-348) Create Verifier plugin

Posted by "Vincent Massol (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-348?page=all ]

Vincent Massol updated MNG-348:
-------------------------------

    Attachment: maven-verifier-plugin_try1.zip

Unit tests are passing. Now I'm stuck when doing integration tests (i.e. when trying to call "m2 verifier:verify" in another m2 project). Several pbs:

1/ m2 is looking for a 1.0-SNAPSHOT version even though the version is 1.0-alpha-2-SNAPSHOT
2/ when I modify the version to be 1.0-SNAPSHOT (just to try it out), I get the following exception:

org.apache.maven.reactor.ReactorException: Error executing project within the reactor
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:144)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:233)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:303)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:363)
Caused by: org.apache.maven.lifecycle.LifecycleExecutionException: Error during lifecycle execution
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:152)
        at org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:212)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:136)
        ... 9 more
Caused by: java.lang.ClassCastException
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:382)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeMojo(DefaultLifecycleExecutor.java:393)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        ... 11 more

3/ I have used the ${} notation in the javadoc tags but I don't think this is supported by m2 alpha1. I've also tried using # instead without much success.

How do I make it work with m2 alpha1?

Thanks

> Create Verifier plugin
> ----------------------
>
>          Key: MNG-348
>          URL: http://jira.codehaus.org/browse/MNG-348
>      Project: m2
>         Type: Task
>   Components: maven-plugins
>     Versions: 2.0-alpha-1
>     Reporter: Vincent Massol
>     Assignee: Vincent Massol
>  Attachments: maven-verifier-plugin_try1.zip
>
>
> Create a plugin that will allow verifying existence and contents of files and directories. It could be used when performing integration tests, for example when writing m2 plugins. It could be later on expanded for other types of tests too.
> The way it'll work is that it'll have a configuration similar to:
> <verifications>
>   <files>
>     <file>
>       <location>${basedir}/target/clover/clover.db</location>
>       <contains>[enter a regexp here - This is optional]</contains>
>       <test>exist (default)|notfound</test>
>     </file>
>     <file>[...]
>   </files>
> </verifications>
> This file will be called verifications.xml (for example) in user's projects and the plugin will look for it by default in src/test/verifier/verifications.xml
> This plugin will be bound to an integration testing phase that Brett will add to maven-core/src/main/resources/META-INF/plexus/components.xml.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-348) Create Verifier plugin

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-348?page=all ]

Brett Porter updated MNG-348:
-----------------------------

    Fix Version: 2.0-alpha-2

> Create Verifier plugin
> ----------------------
>
>          Key: MNG-348
>          URL: http://jira.codehaus.org/browse/MNG-348
>      Project: m2
>         Type: Task
>   Components: maven-plugins
>     Versions: 2.0-alpha-1
>     Reporter: Vincent Massol
>     Assignee: Vincent Massol
>      Fix For: 2.0-alpha-2
>  Attachments: maven-verifier-plugin_try1.zip
>
>
> Create a plugin that will allow verifying existence and contents of files and directories. It could be used when performing integration tests, for example when writing m2 plugins. It could be later on expanded for other types of tests too.
> The way it'll work is that it'll have a configuration similar to:
> <verifications>
>   <files>
>     <file>
>       <location>${basedir}/target/clover/clover.db</location>
>       <contains>[enter a regexp here - This is optional]</contains>
>       <test>exist (default)|notfound</test>
>     </file>
>     <file>[...]
>   </files>
> </verifications>
> This file will be called verifications.xml (for example) in user's projects and the plugin will look for it by default in src/test/verifier/verifications.xml
> This plugin will be bound to an integration testing phase that Brett will add to maven-core/src/main/resources/META-INF/plexus/components.xml.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-348) Create Verifier plugin

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-348?page=comments#action_38077 ]
     
Brett Porter commented on MNG-348:
----------------------------------

1) yes, known issue with m2-alpha-1. You specify the version in your POM, but we need a better way to discover that where they typically aren't configured in the POM. For the verifier, I think it is wise to always add it with the version to the POM.

2) sounds like you are building with alpha-2 and running in alpha-1 (you probably have a dependency on maven-plugin-api in META-INF/maven/plugin.xml, which will conflict with maven-plugin in $M2_HOME/lib). Rebuild with alpha-1. Specifically, the CCE is because Plugin.class of the plugin != Plugin.class of $M2_HOME/lib

3) probably also a symptom of mixing builds as the ${} was only introduced recently. No reason why #... shouldn't work though.

I think it might be best to make it work with alpha-2 now and track SVN for a while. We're only 2.5 weeks out from the release.



> Create Verifier plugin
> ----------------------
>
>          Key: MNG-348
>          URL: http://jira.codehaus.org/browse/MNG-348
>      Project: m2
>         Type: Task
>   Components: maven-plugins
>     Versions: 2.0-alpha-1
>     Reporter: Vincent Massol
>     Assignee: Vincent Massol
>  Attachments: maven-verifier-plugin_try1.zip
>
>
> Create a plugin that will allow verifying existence and contents of files and directories. It could be used when performing integration tests, for example when writing m2 plugins. It could be later on expanded for other types of tests too.
> The way it'll work is that it'll have a configuration similar to:
> <verifications>
>   <files>
>     <file>
>       <location>${basedir}/target/clover/clover.db</location>
>       <contains>[enter a regexp here - This is optional]</contains>
>       <test>exist (default)|notfound</test>
>     </file>
>     <file>[...]
>   </files>
> </verifications>
> This file will be called verifications.xml (for example) in user's projects and the plugin will look for it by default in src/test/verifier/verifications.xml
> This plugin will be bound to an integration testing phase that Brett will add to maven-core/src/main/resources/META-INF/plexus/components.xml.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-348) Create Verifier plugin

Posted by "Vincent Massol (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-348?page=all ]

Vincent Massol updated MNG-348:
-------------------------------

    Attachment: maven-verifier-plugin-workingversion1.zip

First working version ready to be committed to SVN trunk. Works with m2 alpha 2 from SVN trunk.

> Create Verifier plugin
> ----------------------
>
>          Key: MNG-348
>          URL: http://jira.codehaus.org/browse/MNG-348
>      Project: m2
>         Type: Task
>   Components: maven-plugins
>     Versions: 2.0-alpha-1
>     Reporter: Vincent Massol
>     Assignee: Vincent Massol
>      Fix For: 2.0-alpha-2
>  Attachments: maven-verifier-plugin-workingversion1.zip, maven-verifier-plugin_try1.zip
>
>
> Create a plugin that will allow verifying existence and contents of files and directories. It could be used when performing integration tests, for example when writing m2 plugins. It could be later on expanded for other types of tests too.
> The way it'll work is that it'll have a configuration similar to:
> <verifications>
>   <files>
>     <file>
>       <location>${basedir}/target/clover/clover.db</location>
>       <contains>[enter a regexp here - This is optional]</contains>
>       <test>exist (default)|notfound</test>
>     </file>
>     <file>[...]
>   </files>
> </verifications>
> This file will be called verifications.xml (for example) in user's projects and the plugin will look for it by default in src/test/verifier/verifications.xml
> This plugin will be bound to an integration testing phase that Brett will add to maven-core/src/main/resources/META-INF/plexus/components.xml.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org