You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Anuerin Diaz <ra...@gmail.com> on 2005/11/07 15:16:09 UTC

Re: [m2] ant bug with EnumeratedAttribute task parameters=

hi,

  the attachments caused my mail to bounce so you can access the files
using this link (combined to a single file, 8KB in total) :

    http://ramfree17.org/hasty/maven/antrun_issue.zip


ciao!

On 11/7/05, Anuerin Diaz <ra...@gmail.com> wrote:
> hi,
>
>  the ant-run plugin (or the launcher) seems unable to properly
> convert attributes that are of the type EnumeratedAttribute[1]. the
> execution always fail with an error that the attribute being set is
> not supported by the class.
>
>  i have attached 3 files to serve as a test case for this.
>
>  1. "sample.zip" - contains the project that will serve as the main
> test case. it really is just the plugin tutorial and i just added the
> followign in the pom.xml so my test Task will be called during compile
> time:
>
> <build>
>   <extensions>
>        <extension>
>                <groupId>testbed</groupId>
>                <artifactId>tests</artifactId>
>                <version>1.0</version>
>        </extension>
>        <extension>
>                <groupId>ant</groupId>
>                <artifactId>ant</artifactId>
>                <version>1.5</version>
>        </extension>
>   </extensions>
>  <plugins>
>     <plugin>
>        <artifactId>maven-antrun-plugin</artifactId>
>        <executions>
>           <execution>
>              <phase>compile</phase>
>                 <configuration>
>                    <tasks>
>                       <ant
>                           target = "test-run"
>                           antfile = "${basedir}/build.xml">
>
>                           <property name="paramValue"  value="FirstValue"/>
>                        </ant>
>                    </tasks>
>                 </configuration>
>                 <goals>
>                    <goal>run</goal>
>                  </goals>
>            </execution>
>         </executions>
>      </plugin>
>   </plugins>
> </build>
>
>   2. "testbed.zip" - contains the test Ant Task jar file. the test
> Task has one attribute that is derived from EnumeratedAttribute.
>
>   3.  "testbed-src.zip" - contains the source code for the testbed
> artifact (in case somebody is interested).
>
>
>   i think the problem is just with the launcher since the task runs
> fairly well from normal Ant invocation. i found this problem when i
> was trying to use the <ejbjar/> task in the ant-optinoal package.
> anybody have an idea how to work around this?
>
>   thanks.
>
> [1] http://ant.apache.org/manual/develop.html#set-magic
>
> ciao!
>
> --
>
> "Programming, an artform that fights back"
>
> Anuerin G. Diaz
> Registered Linux User #246176
> Friendly Linux Board @ http://mandrivausers.org/index.php
> http://capsule.ramfree17.org , when you absolutely have nothing else
> better to do
>
>
>


--

"Programming, an artform that fights back"

Anuerin G. Diaz
Registered Linux User #246176
Friendly Linux Board @ http://mandrivausers.org/index.php
http://capsule.ramfree17.org , when you absolutely have nothing else
better to do

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


Re: [m2] ant bug with EnumeratedAttribute task parameters=

Posted by Anuerin Diaz <ra...@gmail.com>.
ok, the mvn clean install did not work. so just to get going i just
extracted the manifest folder of the original plugin jar and added it
manually to the hijacked jar. i am still stumped on this stack trace
even if the same buildfile executes perfectly fine with the same jar
file...

=========================
Embedded error: The following error occurred while executing this line:
C:\Temp\workdir\sample-plugin\build.xml:9: Class
sample.ant.ComplexTask doesn't support the "parameter" attribute.
[INFO] ----------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error
executing ant tasks
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:544)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:469)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:448)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301
)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        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:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error
executing ant tasks
        at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:66)
        at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:60)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:399)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:519)
        ... 16 more
Caused by: The following error occurred while executing this line:
C:\Temp\workdir\sample-plugin\build.xml:9: Class
sample.ant.ComplexTask doesn't support the "parameter" attribute.
        at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:388)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:60)
        ... 19 more
Caused by: C:\Temp\workdir\sample-plugin\build.xml:9: Class
sample.ant.ComplexTask doesn't support the "parameter" attribute.

        at org.apache.tools.ant.IntrospectionHelper.setAttribute(IntrospectionHelper.java:516)
        at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:368)
        at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:322)
        at org.apache.tools.ant.Task.maybeConfigure(Task.java:254)
        at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:189)
        at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:158)
        at org.apache.tools.ant.Task.perform(Task.java:363)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
        ... 23 more
=========================

ciao!


On 11/8/05, Anuerin Diaz <ra...@gmail.com> wrote:
> not really but is it the same if I did a "mvn clean package" and "mvn
> install"? sounds weird but since i was using a customized settings
> file i created a batch file to do the "clean package" step in one
> call.
>
>  i have also tried deleting the plugin folder in my local repository
> to ensure that the jar file is being copied. anyway i will try doing
> the "clean install" later when i get to the office and see what
> happens. i am just a little bit puzzled why my own jar file did not
> have those two files and i already reviewed the pom files for the
> antrun plugin and its parent. i maybe too green in the gills but i
> dont see any special configuration to have it included.
>
> ciao!
>
> On 11/8/05, Brett Porter <br...@gmail.com> wrote:
> > Did you run "mvn clean install" to install it?
> >
> > - Brett
> >
> > On 11/8/05, Anuerin Diaz <ra...@gmail.com> wrote:
> > > hi again,
> > >
> > >    im trying to debug the problem below (hoping i can find a
> > > workaround) but since policy prevents me from installing subversion in
> > > my workstation (even if it doesnt entail a real installer), i just
> > > manually retrieved the maven-antrun-plugin from
> > > http://svn.apache.org/viewcvs.cgi/maven/components/trunk/maven-plugins/maven-antrun-plugin/
> > >
> > >   i am pretty sure that i have copied the correct structure (sans the
> > > site directory) and the latest versions of each source/resource
> > > file[1]. i edited the pom and based it on the pom included in the
> > > original antrun plugin jar file. my project pom looks like this
> > >
> > >   <groupId>org.apache.maven.plugins</groupId>
> > >   <artifactId>maven-antrun-plugin</artifactId>
> > >   <packaging>maven-plugin</packaging>
> > >   <name>Maven AntRun Plugin</name>
> > >   <version>1.0</version>
> > >
> > >   <dependencies>
> > >     <dependency>
> > >       <groupId>org.apache.maven</groupId>
> > >       <artifactId>maven-plugin-tools-api</artifactId>
> > >       <version>2.0</version>
> > >     </dependency>
> > >         <dependency>
> > >       <groupId>ant</groupId>
> > >       <artifactId>ant</artifactId>
> > >       <version>1.6.2</version>
> > >     </dependency>
> > >
> > >   </dependencies>
> > >
> > >
> > > i just inserted some printout statements to help get an idea how
> > > things are done (my java skills need some more work). the 'impromptu'
> > > project compiles and installs fine in my local repository but using
> > > the plugin causes this error:
> > >
> > > ========================
> > > [ERROR] Nonexistent component:
> > > org.codehaus.plexus.component.configurator.ComponentConfiguratoroverride
> > > [INFO] ----------------------------------------------------------------------------
> > > [ERROR] BUILD ERROR
> > > [INFO] ----------------------------------------------------------------------------
> > > [INFO] Internal error in the plugin manager executing goal
> > > 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run': Unable to find
> > > the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run' in the
> > > plugin 'org.apache.maven.plugins:maven-antrun-plugin'
> > >
> > > Component descriptor cannot be found in the component repository:
> > > org.codehaus.plexus.component.configurator.ComponentConfigu
> > > ratoroverride.
> > > ==================
> > >
> > > i noticed that the original plugin jar file has the
> > > META-INF/plexus/component.xml and META-INF/maven/plugin.xml. My
> > > 'hijacked'  antrun plugin does no thave these files. can you point to
> > > me what i missed? thanks.
> > >
> > >
> > > [1] dir /s /b /a-d antrun\src
> > > src\main\java\org\apache\maven\plugin\antrun\AbstractAntMojo.java
> > > src\main\java\org\apache\maven\plugin\antrun\AntPropertyHelper.java
> > > src\main\java\org\apache\maven\plugin\antrun\AntRunMojo.java
> > > src\main\java\org\apache\maven\plugin\antrun\components\AntTargetConverter.java
> > > src\resources\META-INF\plexus\components.xml
> > >
> > > ciao!
> > >
> > >
> > > On 11/7/05, Anuerin Diaz <ra...@gmail.com> wrote:
> > > > hi,
> > > >
> > > >  the attachments caused my mail to bounce so you can access the files
> > > > using this link (combined to a single file, 8KB in total) :
> > > >
> > > >    http://ramfree17.org/hasty/maven/antrun_issue.zip
> > > >
> > > >
> > > > ciao!
> > > >
> > > > On 11/7/05, Anuerin Diaz <ra...@gmail.com> wrote:
> > > > > hi,
> > > > >
> > > > >  the ant-run plugin (or the launcher) seems unable to properly
> > > > > convert attributes that are of the type EnumeratedAttribute[1]. the
> > > > > execution always fail with an error that the attribute being set is
> > > > > not supported by the class.
> > > > >
> > > > >  i have attached 3 files to serve as a test case for this.
> > > > >
> > > > >  1. "sample.zip" - contains the project that will serve as the main
> > > > > test case. it really is just the plugin tutorial and i just added the
> > > > > followign in the pom.xml so my test Task will be called during compile
> > > > > time:
> > > > >
> > > > > <build>
> > > > >   <extensions>
> > > > >        <extension>
> > > > >                <groupId>testbed</groupId>
> > > > >                <artifactId>tests</artifactId>
> > > > >                <version>1.0</version>
> > > > >        </extension>
> > > > >        <extension>
> > > > >                <groupId>ant</groupId>
> > > > >                <artifactId>ant</artifactId>
> > > > >                <version>1.5</version>
> > > > >        </extension>
> > > > >   </extensions>
> > > > >  <plugins>
> > > > >     <plugin>
> > > > >        <artifactId>maven-antrun-plugin</artifactId>
> > > > >        <executions>
> > > > >           <execution>
> > > > >              <phase>compile</phase>
> > > > >                 <configuration>
> > > > >                    <tasks>
> > > > >                       <ant
> > > > >                           target = "test-run"
> > > > >                           antfile = "${basedir}/build.xml">
> > > > >
> > > > >                           <property name="paramValue"  value="FirstValue"/>
> > > > >                        </ant>
> > > > >                    </tasks>
> > > > >                 </configuration>
> > > > >                 <goals>
> > > > >                    <goal>run</goal>
> > > > >                  </goals>
> > > > >            </execution>
> > > > >         </executions>
> > > > >      </plugin>
> > > > >   </plugins>
> > > > > </build>
> > > > >
> > > > >   2. "testbed.zip" - contains the test Ant Task jar file. the test
> > > > > Task has one attribute that is derived from EnumeratedAttribute.
> > > > >
> > > > >   3.  "testbed-src.zip" - contains the source code for the testbed
> > > > > artifact (in case somebody is interested).
> > > > >
> > > > >
> > > > >   i think the problem is just with the launcher since the task runs
> > > > > fairly well from normal Ant invocation. i found this problem when i
> > > > > was trying to use the <ejbjar/> task in the ant-optinoal package.
> > > > > anybody have an idea how to work around this?
> > > > >
> > > > >   thanks.
> > > > >
> > > > > [1] http://ant.apache.org/manual/develop.html#set-magic
> > > > >
> > > > > ciao!
> > > > >
> > > > > --
> > > > >
> > > > > "Programming, an artform that fights back"
> > > > >
> > > > > Anuerin G. Diaz
> > > > > Registered Linux User #246176
> > > > > Friendly Linux Board @ http://mandrivausers.org/index.php
> > > > > http://capsule.ramfree17.org , when you absolutely have nothing else
> > > > > better to do
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > >
> > > > "Programming, an artform that fights back"
> > > >
> > > > Anuerin G. Diaz
> > > > Registered Linux User #246176
> > > > Friendly Linux Board @ http://mandrivausers.org/index.php
> > > > http://capsule.ramfree17.org , when you absolutely have nothing else
> > > > better to do
> > > >
> > >
> > >
> > > --
> > >
> > > "Programming, an artform that fights back"
> > >
> > > Anuerin G. Diaz
> > > Registered Linux User #246176
> > > Friendly Linux Board @ http://mandrivausers.org/index.php
> > > http://capsule.ramfree17.org , when you absolutely have nothing else
> > > better to do
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
>
> "Programming, an artform that fights back"
>
> Anuerin G. Diaz
> Registered Linux User #246176
> Friendly Linux Board @ http://mandrivausers.org/index.php
> http://capsule.ramfree17.org , when you absolutely have nothing else
> better to do
>


--

"Programming, an artform that fights back"

Anuerin G. Diaz
Registered Linux User #246176
Friendly Linux Board @ http://mandrivausers.org/index.php
http://capsule.ramfree17.org , when you absolutely have nothing else
better to do

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


Re: [m2] ant bug with EnumeratedAttribute task parameters=

Posted by Anuerin Diaz <ra...@gmail.com>.
not really but is it the same if I did a "mvn clean package" and "mvn
install"? sounds weird but since i was using a customized settings
file i created a batch file to do the "clean package" step in one
call.

 i have also tried deleting the plugin folder in my local repository
to ensure that the jar file is being copied. anyway i will try doing
the "clean install" later when i get to the office and see what
happens. i am just a little bit puzzled why my own jar file did not
have those two files and i already reviewed the pom files for the
antrun plugin and its parent. i maybe too green in the gills but i
dont see any special configuration to have it included.

ciao!

On 11/8/05, Brett Porter <br...@gmail.com> wrote:
> Did you run "mvn clean install" to install it?
>
> - Brett
>
> On 11/8/05, Anuerin Diaz <ra...@gmail.com> wrote:
> > hi again,
> >
> >    im trying to debug the problem below (hoping i can find a
> > workaround) but since policy prevents me from installing subversion in
> > my workstation (even if it doesnt entail a real installer), i just
> > manually retrieved the maven-antrun-plugin from
> > http://svn.apache.org/viewcvs.cgi/maven/components/trunk/maven-plugins/maven-antrun-plugin/
> >
> >   i am pretty sure that i have copied the correct structure (sans the
> > site directory) and the latest versions of each source/resource
> > file[1]. i edited the pom and based it on the pom included in the
> > original antrun plugin jar file. my project pom looks like this
> >
> >   <groupId>org.apache.maven.plugins</groupId>
> >   <artifactId>maven-antrun-plugin</artifactId>
> >   <packaging>maven-plugin</packaging>
> >   <name>Maven AntRun Plugin</name>
> >   <version>1.0</version>
> >
> >   <dependencies>
> >     <dependency>
> >       <groupId>org.apache.maven</groupId>
> >       <artifactId>maven-plugin-tools-api</artifactId>
> >       <version>2.0</version>
> >     </dependency>
> >         <dependency>
> >       <groupId>ant</groupId>
> >       <artifactId>ant</artifactId>
> >       <version>1.6.2</version>
> >     </dependency>
> >
> >   </dependencies>
> >
> >
> > i just inserted some printout statements to help get an idea how
> > things are done (my java skills need some more work). the 'impromptu'
> > project compiles and installs fine in my local repository but using
> > the plugin causes this error:
> >
> > ========================
> > [ERROR] Nonexistent component:
> > org.codehaus.plexus.component.configurator.ComponentConfiguratoroverride
> > [INFO] ----------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO] ----------------------------------------------------------------------------
> > [INFO] Internal error in the plugin manager executing goal
> > 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run': Unable to find
> > the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run' in the
> > plugin 'org.apache.maven.plugins:maven-antrun-plugin'
> >
> > Component descriptor cannot be found in the component repository:
> > org.codehaus.plexus.component.configurator.ComponentConfigu
> > ratoroverride.
> > ==================
> >
> > i noticed that the original plugin jar file has the
> > META-INF/plexus/component.xml and META-INF/maven/plugin.xml. My
> > 'hijacked'  antrun plugin does no thave these files. can you point to
> > me what i missed? thanks.
> >
> >
> > [1] dir /s /b /a-d antrun\src
> > src\main\java\org\apache\maven\plugin\antrun\AbstractAntMojo.java
> > src\main\java\org\apache\maven\plugin\antrun\AntPropertyHelper.java
> > src\main\java\org\apache\maven\plugin\antrun\AntRunMojo.java
> > src\main\java\org\apache\maven\plugin\antrun\components\AntTargetConverter.java
> > src\resources\META-INF\plexus\components.xml
> >
> > ciao!
> >
> >
> > On 11/7/05, Anuerin Diaz <ra...@gmail.com> wrote:
> > > hi,
> > >
> > >  the attachments caused my mail to bounce so you can access the files
> > > using this link (combined to a single file, 8KB in total) :
> > >
> > >    http://ramfree17.org/hasty/maven/antrun_issue.zip
> > >
> > >
> > > ciao!
> > >
> > > On 11/7/05, Anuerin Diaz <ra...@gmail.com> wrote:
> > > > hi,
> > > >
> > > >  the ant-run plugin (or the launcher) seems unable to properly
> > > > convert attributes that are of the type EnumeratedAttribute[1]. the
> > > > execution always fail with an error that the attribute being set is
> > > > not supported by the class.
> > > >
> > > >  i have attached 3 files to serve as a test case for this.
> > > >
> > > >  1. "sample.zip" - contains the project that will serve as the main
> > > > test case. it really is just the plugin tutorial and i just added the
> > > > followign in the pom.xml so my test Task will be called during compile
> > > > time:
> > > >
> > > > <build>
> > > >   <extensions>
> > > >        <extension>
> > > >                <groupId>testbed</groupId>
> > > >                <artifactId>tests</artifactId>
> > > >                <version>1.0</version>
> > > >        </extension>
> > > >        <extension>
> > > >                <groupId>ant</groupId>
> > > >                <artifactId>ant</artifactId>
> > > >                <version>1.5</version>
> > > >        </extension>
> > > >   </extensions>
> > > >  <plugins>
> > > >     <plugin>
> > > >        <artifactId>maven-antrun-plugin</artifactId>
> > > >        <executions>
> > > >           <execution>
> > > >              <phase>compile</phase>
> > > >                 <configuration>
> > > >                    <tasks>
> > > >                       <ant
> > > >                           target = "test-run"
> > > >                           antfile = "${basedir}/build.xml">
> > > >
> > > >                           <property name="paramValue"  value="FirstValue"/>
> > > >                        </ant>
> > > >                    </tasks>
> > > >                 </configuration>
> > > >                 <goals>
> > > >                    <goal>run</goal>
> > > >                  </goals>
> > > >            </execution>
> > > >         </executions>
> > > >      </plugin>
> > > >   </plugins>
> > > > </build>
> > > >
> > > >   2. "testbed.zip" - contains the test Ant Task jar file. the test
> > > > Task has one attribute that is derived from EnumeratedAttribute.
> > > >
> > > >   3.  "testbed-src.zip" - contains the source code for the testbed
> > > > artifact (in case somebody is interested).
> > > >
> > > >
> > > >   i think the problem is just with the launcher since the task runs
> > > > fairly well from normal Ant invocation. i found this problem when i
> > > > was trying to use the <ejbjar/> task in the ant-optinoal package.
> > > > anybody have an idea how to work around this?
> > > >
> > > >   thanks.
> > > >
> > > > [1] http://ant.apache.org/manual/develop.html#set-magic
> > > >
> > > > ciao!
> > > >
> > > > --
> > > >
> > > > "Programming, an artform that fights back"
> > > >
> > > > Anuerin G. Diaz
> > > > Registered Linux User #246176
> > > > Friendly Linux Board @ http://mandrivausers.org/index.php
> > > > http://capsule.ramfree17.org , when you absolutely have nothing else
> > > > better to do
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > >
> > > "Programming, an artform that fights back"
> > >
> > > Anuerin G. Diaz
> > > Registered Linux User #246176
> > > Friendly Linux Board @ http://mandrivausers.org/index.php
> > > http://capsule.ramfree17.org , when you absolutely have nothing else
> > > better to do
> > >
> >
> >
> > --
> >
> > "Programming, an artform that fights back"
> >
> > Anuerin G. Diaz
> > Registered Linux User #246176
> > Friendly Linux Board @ http://mandrivausers.org/index.php
> > http://capsule.ramfree17.org , when you absolutely have nothing else
> > better to do
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--

"Programming, an artform that fights back"

Anuerin G. Diaz
Registered Linux User #246176
Friendly Linux Board @ http://mandrivausers.org/index.php
http://capsule.ramfree17.org , when you absolutely have nothing else
better to do

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


Re: [m2] ant bug with EnumeratedAttribute task parameters=

Posted by Brett Porter <br...@gmail.com>.
Did you run "mvn clean install" to install it?

- Brett

On 11/8/05, Anuerin Diaz <ra...@gmail.com> wrote:
> hi again,
>
>    im trying to debug the problem below (hoping i can find a
> workaround) but since policy prevents me from installing subversion in
> my workstation (even if it doesnt entail a real installer), i just
> manually retrieved the maven-antrun-plugin from
> http://svn.apache.org/viewcvs.cgi/maven/components/trunk/maven-plugins/maven-antrun-plugin/
>
>   i am pretty sure that i have copied the correct structure (sans the
> site directory) and the latest versions of each source/resource
> file[1]. i edited the pom and based it on the pom included in the
> original antrun plugin jar file. my project pom looks like this
>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-antrun-plugin</artifactId>
>   <packaging>maven-plugin</packaging>
>   <name>Maven AntRun Plugin</name>
>   <version>1.0</version>
>
>   <dependencies>
>     <dependency>
>       <groupId>org.apache.maven</groupId>
>       <artifactId>maven-plugin-tools-api</artifactId>
>       <version>2.0</version>
>     </dependency>
>         <dependency>
>       <groupId>ant</groupId>
>       <artifactId>ant</artifactId>
>       <version>1.6.2</version>
>     </dependency>
>
>   </dependencies>
>
>
> i just inserted some printout statements to help get an idea how
> things are done (my java skills need some more work). the 'impromptu'
> project compiles and installs fine in my local repository but using
> the plugin causes this error:
>
> ========================
> [ERROR] Nonexistent component:
> org.codehaus.plexus.component.configurator.ComponentConfiguratoroverride
> [INFO] ----------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] Internal error in the plugin manager executing goal
> 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run': Unable to find
> the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run' in the
> plugin 'org.apache.maven.plugins:maven-antrun-plugin'
>
> Component descriptor cannot be found in the component repository:
> org.codehaus.plexus.component.configurator.ComponentConfigu
> ratoroverride.
> ==================
>
> i noticed that the original plugin jar file has the
> META-INF/plexus/component.xml and META-INF/maven/plugin.xml. My
> 'hijacked'  antrun plugin does no thave these files. can you point to
> me what i missed? thanks.
>
>
> [1] dir /s /b /a-d antrun\src
> src\main\java\org\apache\maven\plugin\antrun\AbstractAntMojo.java
> src\main\java\org\apache\maven\plugin\antrun\AntPropertyHelper.java
> src\main\java\org\apache\maven\plugin\antrun\AntRunMojo.java
> src\main\java\org\apache\maven\plugin\antrun\components\AntTargetConverter.java
> src\resources\META-INF\plexus\components.xml
>
> ciao!
>
>
> On 11/7/05, Anuerin Diaz <ra...@gmail.com> wrote:
> > hi,
> >
> >  the attachments caused my mail to bounce so you can access the files
> > using this link (combined to a single file, 8KB in total) :
> >
> >    http://ramfree17.org/hasty/maven/antrun_issue.zip
> >
> >
> > ciao!
> >
> > On 11/7/05, Anuerin Diaz <ra...@gmail.com> wrote:
> > > hi,
> > >
> > >  the ant-run plugin (or the launcher) seems unable to properly
> > > convert attributes that are of the type EnumeratedAttribute[1]. the
> > > execution always fail with an error that the attribute being set is
> > > not supported by the class.
> > >
> > >  i have attached 3 files to serve as a test case for this.
> > >
> > >  1. "sample.zip" - contains the project that will serve as the main
> > > test case. it really is just the plugin tutorial and i just added the
> > > followign in the pom.xml so my test Task will be called during compile
> > > time:
> > >
> > > <build>
> > >   <extensions>
> > >        <extension>
> > >                <groupId>testbed</groupId>
> > >                <artifactId>tests</artifactId>
> > >                <version>1.0</version>
> > >        </extension>
> > >        <extension>
> > >                <groupId>ant</groupId>
> > >                <artifactId>ant</artifactId>
> > >                <version>1.5</version>
> > >        </extension>
> > >   </extensions>
> > >  <plugins>
> > >     <plugin>
> > >        <artifactId>maven-antrun-plugin</artifactId>
> > >        <executions>
> > >           <execution>
> > >              <phase>compile</phase>
> > >                 <configuration>
> > >                    <tasks>
> > >                       <ant
> > >                           target = "test-run"
> > >                           antfile = "${basedir}/build.xml">
> > >
> > >                           <property name="paramValue"  value="FirstValue"/>
> > >                        </ant>
> > >                    </tasks>
> > >                 </configuration>
> > >                 <goals>
> > >                    <goal>run</goal>
> > >                  </goals>
> > >            </execution>
> > >         </executions>
> > >      </plugin>
> > >   </plugins>
> > > </build>
> > >
> > >   2. "testbed.zip" - contains the test Ant Task jar file. the test
> > > Task has one attribute that is derived from EnumeratedAttribute.
> > >
> > >   3.  "testbed-src.zip" - contains the source code for the testbed
> > > artifact (in case somebody is interested).
> > >
> > >
> > >   i think the problem is just with the launcher since the task runs
> > > fairly well from normal Ant invocation. i found this problem when i
> > > was trying to use the <ejbjar/> task in the ant-optinoal package.
> > > anybody have an idea how to work around this?
> > >
> > >   thanks.
> > >
> > > [1] http://ant.apache.org/manual/develop.html#set-magic
> > >
> > > ciao!
> > >
> > > --
> > >
> > > "Programming, an artform that fights back"
> > >
> > > Anuerin G. Diaz
> > > Registered Linux User #246176
> > > Friendly Linux Board @ http://mandrivausers.org/index.php
> > > http://capsule.ramfree17.org , when you absolutely have nothing else
> > > better to do
> > >
> > >
> > >
> >
> >
> > --
> >
> > "Programming, an artform that fights back"
> >
> > Anuerin G. Diaz
> > Registered Linux User #246176
> > Friendly Linux Board @ http://mandrivausers.org/index.php
> > http://capsule.ramfree17.org , when you absolutely have nothing else
> > better to do
> >
>
>
> --
>
> "Programming, an artform that fights back"
>
> Anuerin G. Diaz
> Registered Linux User #246176
> Friendly Linux Board @ http://mandrivausers.org/index.php
> http://capsule.ramfree17.org , when you absolutely have nothing else
> better to do
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: [m2] ant bug with EnumeratedAttribute task parameters=

Posted by Anuerin Diaz <ra...@gmail.com>.
hi again,

   im trying to debug the problem below (hoping i can find a
workaround) but since policy prevents me from installing subversion in
my workstation (even if it doesnt entail a real installer), i just
manually retrieved the maven-antrun-plugin from
http://svn.apache.org/viewcvs.cgi/maven/components/trunk/maven-plugins/maven-antrun-plugin/

  i am pretty sure that i have copied the correct structure (sans the
site directory) and the latest versions of each source/resource
file[1]. i edited the pom and based it on the pom included in the
original antrun plugin jar file. my project pom looks like this

  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-antrun-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <name>Maven AntRun Plugin</name>
  <version>1.0</version>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-tools-api</artifactId>
      <version>2.0</version>
    </dependency>
	<dependency>
      <groupId>ant</groupId>
      <artifactId>ant</artifactId>
      <version>1.6.2</version>
    </dependency>

  </dependencies>


i just inserted some printout statements to help get an idea how
things are done (my java skills need some more work). the 'impromptu'
project compiles and installs fine in my local repository but using
the plugin causes this error:

========================
[ERROR] Nonexistent component:
org.codehaus.plexus.component.configurator.ComponentConfiguratoroverride
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal
'org.apache.maven.plugins:maven-antrun-plugin:1.0:run': Unable to find
the mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.0:run' in the
plugin 'org.apache.maven.plugins:maven-antrun-plugin'

Component descriptor cannot be found in the component repository:
org.codehaus.plexus.component.configurator.ComponentConfigu
ratoroverride.
==================

i noticed that the original plugin jar file has the
META-INF/plexus/component.xml and META-INF/maven/plugin.xml. My
'hijacked'  antrun plugin does no thave these files. can you point to
me what i missed? thanks.


[1] dir /s /b /a-d antrun\src
src\main\java\org\apache\maven\plugin\antrun\AbstractAntMojo.java
src\main\java\org\apache\maven\plugin\antrun\AntPropertyHelper.java
src\main\java\org\apache\maven\plugin\antrun\AntRunMojo.java
src\main\java\org\apache\maven\plugin\antrun\components\AntTargetConverter.java
src\resources\META-INF\plexus\components.xml

ciao!


On 11/7/05, Anuerin Diaz <ra...@gmail.com> wrote:
> hi,
>
>  the attachments caused my mail to bounce so you can access the files
> using this link (combined to a single file, 8KB in total) :
>
>    http://ramfree17.org/hasty/maven/antrun_issue.zip
>
>
> ciao!
>
> On 11/7/05, Anuerin Diaz <ra...@gmail.com> wrote:
> > hi,
> >
> >  the ant-run plugin (or the launcher) seems unable to properly
> > convert attributes that are of the type EnumeratedAttribute[1]. the
> > execution always fail with an error that the attribute being set is
> > not supported by the class.
> >
> >  i have attached 3 files to serve as a test case for this.
> >
> >  1. "sample.zip" - contains the project that will serve as the main
> > test case. it really is just the plugin tutorial and i just added the
> > followign in the pom.xml so my test Task will be called during compile
> > time:
> >
> > <build>
> >   <extensions>
> >        <extension>
> >                <groupId>testbed</groupId>
> >                <artifactId>tests</artifactId>
> >                <version>1.0</version>
> >        </extension>
> >        <extension>
> >                <groupId>ant</groupId>
> >                <artifactId>ant</artifactId>
> >                <version>1.5</version>
> >        </extension>
> >   </extensions>
> >  <plugins>
> >     <plugin>
> >        <artifactId>maven-antrun-plugin</artifactId>
> >        <executions>
> >           <execution>
> >              <phase>compile</phase>
> >                 <configuration>
> >                    <tasks>
> >                       <ant
> >                           target = "test-run"
> >                           antfile = "${basedir}/build.xml">
> >
> >                           <property name="paramValue"  value="FirstValue"/>
> >                        </ant>
> >                    </tasks>
> >                 </configuration>
> >                 <goals>
> >                    <goal>run</goal>
> >                  </goals>
> >            </execution>
> >         </executions>
> >      </plugin>
> >   </plugins>
> > </build>
> >
> >   2. "testbed.zip" - contains the test Ant Task jar file. the test
> > Task has one attribute that is derived from EnumeratedAttribute.
> >
> >   3.  "testbed-src.zip" - contains the source code for the testbed
> > artifact (in case somebody is interested).
> >
> >
> >   i think the problem is just with the launcher since the task runs
> > fairly well from normal Ant invocation. i found this problem when i
> > was trying to use the <ejbjar/> task in the ant-optinoal package.
> > anybody have an idea how to work around this?
> >
> >   thanks.
> >
> > [1] http://ant.apache.org/manual/develop.html#set-magic
> >
> > ciao!
> >
> > --
> >
> > "Programming, an artform that fights back"
> >
> > Anuerin G. Diaz
> > Registered Linux User #246176
> > Friendly Linux Board @ http://mandrivausers.org/index.php
> > http://capsule.ramfree17.org , when you absolutely have nothing else
> > better to do
> >
> >
> >
>
>
> --
>
> "Programming, an artform that fights back"
>
> Anuerin G. Diaz
> Registered Linux User #246176
> Friendly Linux Board @ http://mandrivausers.org/index.php
> http://capsule.ramfree17.org , when you absolutely have nothing else
> better to do
>


--

"Programming, an artform that fights back"

Anuerin G. Diaz
Registered Linux User #246176
Friendly Linux Board @ http://mandrivausers.org/index.php
http://capsule.ramfree17.org , when you absolutely have nothing else
better to do

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