You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kevin Wang <qw...@bea.com> on 2006/02/21 03:17:50 UTC

how to build JPF(pageflows) in Maven2

Hi, all,

   I have a problem when building beehive page flows in Maven2, I
couldn't find the build-pageflows plugin on ibiblio site for Maven2, So
I compile those JPF files using below snippet:

 

<build>

  <plugins>

...

<plugin>

          <artifactId>maven-antrun-plugin</artifactId>

          <executions>

            <execution>

              <phase>compile</phase>

              <configuration>             

                <tasks>

                  <echo>ant compile beehive pageflows
${beehive.dir}</echo> 

                     <import
file="${beehive.dir}/apache-beehive-incubating-1.0m1/ant/beehive-tools.x
ml"/>

                  <build-pageflows

                    srcdir="src/java"

                    classpathref="maven.dependency.classpath"

                    webcontentdir="${basedir}"

                    tempdir="target/temp">

                 </build-pageflows>

                </tasks>

              </configuration>

              <goals>

                <goal>run</goal>

              </goals>

            </execution>

          </executions>

    </plugin>

    <plugins>

 <build>

 

But it gave such error message:

[INFO] [antrun:run {execution: default}]

[INFO] Executing tasks

     [echo] ant compile beehive pageflows
D:/WLS_WORK/subv/src_load10/beehive

[INFO]
------------------------------------------------------------------------
----

[ERROR] BUILD ERROR

[INFO]
------------------------------------------------------------------------
----

[INFO] Error executing ant tasks

 

Embedded error: java.lang.NullPointerException

[INFO]
------------------------------------------------------------------------
----

[INFO] Trace

org.apache.maven.lifecycle.LifecycleExecutionException: Error executing
ant tasks

         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:556)

         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle(DefaultLifecycleExecutor.java:472)

         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:451)

         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:303)

         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:270)

         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:139)

         at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)

         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)

         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)

         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

         at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

         at java.lang.reflect.Method.invoke(Method.java:585)

         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(AbstractAntM
ojo.java:114)

         at
org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)

         at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:415)

         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:531)

         ... 16 more

Caused by: java.lang.NullPointerException

         at org.apache.tools.ant.Task.perform(Task.java:373)

         at org.apache.tools.ant.Target.execute(Target.java:341)

         at
org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntM
ojo.java:108)

         ... 19 more

Caused by: java.lang.NullPointerException

         at
org.apache.tools.ant.taskdefs.ImportTask.execute(ImportTask.java:96)

         at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)

         at org.apache.tools.ant.Task.perform(Task.java:364)

         ... 21 more

[INFO]
------------------------------------------------------------------------
----

[INFO] Total time: 43 seconds

[INFO] Finished at: Tue Feb 21 10:08:29 CST 2006

[INFO] Final Memory: 5M/10M

[INFO]
------------------------------------------------------------------------
----

 

Why?  (the ant script can be run successfully using ant command)

 

Please help,

 

Regards/Kevin.

  _____  

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

Re: how to build JPF(pageflows) in Maven2

Posted by Wayne Fay <wa...@gmail.com>.
I've had some good luck running certain things in Antrun, and then bad
luck with many other things.

I'd guess that your JPF dependencies (the Ant plugins that enable the
JPF functionality themselves) are not being registered/discovered in
Maven/Antrun as they are in native Ant. Take a look at where the NPE
is getting thrown:

> Caused by: java.lang.NullPointerException
>          at
> org.apache.tools.ant.taskdefs.ImportTask.execute(ImportTask.java:96)
>          at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>          at org.apache.tools.ant.Task.perform(Task.java:364)

To me, this can be loosely translated as "Ant was attempting to
PERFORM the TASK you gave it (JPF) and was unable to EXECUTE the
IMPORT TASK command due to an UNKNOWN ELEMENT (the JPF code itself)".
I'd suspect that the JPF jar file needs to be made available to the
Antrun somehow, perhaps as a dependency in your Pom? Not sure about
specifics here.

Ultimately, things are easiest if all your plugins are native Maven2
plugins. Perhaps its a better use of your time to just port the JPF
Ant task to Maven2? :-)

Wayne


On 2/21/06, Alexandre Poitras <al...@gmail.com> wrote:
> If you look closely at the stack trace you'll see that the source
> exception is NullPointerException and that it comes from Ant. So you
> need to look for what cause the exception first if you want any help.
>
> On 2/20/06, Kevin Wang <qw...@bea.com> wrote:
> > Hi, all,
> >
> >    I have a problem when building beehive page flows in Maven2, I
> > couldn't find the build-pageflows plugin on ibiblio site for Maven2, So
> > I compile those JPF files using below snippet:
> >
> >

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


Re: how to build JPF(pageflows) in Maven2

Posted by Alexandre Poitras <al...@gmail.com>.
If you look closely at the stack trace you'll see that the source
exception is NullPointerException and that it comes from Ant. So you
need to look for what cause the exception first if you want any help.

On 2/20/06, Kevin Wang <qw...@bea.com> wrote:
> Hi, all,
>
>    I have a problem when building beehive page flows in Maven2, I
> couldn't find the build-pageflows plugin on ibiblio site for Maven2, So
> I compile those JPF files using below snippet:
>
>
>
> <build>
>
>   <plugins>
>
> ...
>
> <plugin>
>
>           <artifactId>maven-antrun-plugin</artifactId>
>
>           <executions>
>
>             <execution>
>
>               <phase>compile</phase>
>
>               <configuration>
>
>                 <tasks>
>
>                   <echo>ant compile beehive pageflows
> ${beehive.dir}</echo>
>
>                      <import
> file="${beehive.dir}/apache-beehive-incubating-1.0m1/ant/beehive-tools.x
> ml"/>
>
>                   <build-pageflows
>
>                     srcdir="src/java"
>
>                     classpathref="maven.dependency.classpath"
>
>                     webcontentdir="${basedir}"
>
>                     tempdir="target/temp">
>
>                  </build-pageflows>
>
>                 </tasks>
>
>               </configuration>
>
>               <goals>
>
>                 <goal>run</goal>
>
>               </goals>
>
>             </execution>
>
>           </executions>
>
>     </plugin>
>
>     <plugins>
>
>  <build>
>
>
>
> But it gave such error message:
>
> [INFO] [antrun:run {execution: default}]
>
> [INFO] Executing tasks
>
>      [echo] ant compile beehive pageflows
> D:/WLS_WORK/subv/src_load10/beehive
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [ERROR] BUILD ERROR
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] Error executing ant tasks
>
>
>
> Embedded error: java.lang.NullPointerException
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] Trace
>
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing
> ant tasks
>
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
> LifecycleExecutor.java:556)
>
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
> ycle(DefaultLifecycleExecutor.java:472)
>
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
> ifecycleExecutor.java:451)
>
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
> Failures(DefaultLifecycleExecutor.java:303)
>
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:270)
>
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
> ycleExecutor.java:139)
>
>          at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>
>          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>
>          at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>
>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>          at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>
>          at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>
>          at java.lang.reflect.Method.invoke(Method.java:585)
>
>          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(AbstractAntM
> ojo.java:114)
>
>          at
> org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
>
>          at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
> nager.java:415)
>
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
> LifecycleExecutor.java:531)
>
>          ... 16 more
>
> Caused by: java.lang.NullPointerException
>
>          at org.apache.tools.ant.Task.perform(Task.java:373)
>
>          at org.apache.tools.ant.Target.execute(Target.java:341)
>
>          at
> org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntM
> ojo.java:108)
>
>          ... 19 more
>
> Caused by: java.lang.NullPointerException
>
>          at
> org.apache.tools.ant.taskdefs.ImportTask.execute(ImportTask.java:96)
>
>          at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>
>          at org.apache.tools.ant.Task.perform(Task.java:364)
>
>          ... 21 more
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] Total time: 43 seconds
>
> [INFO] Finished at: Tue Feb 21 10:08:29 CST 2006
>
> [INFO] Final Memory: 5M/10M
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
>
>
> Why?  (the ant script can be run successfully using ant command)
>
>
>
> Please help,
>
>
>
> Regards/Kevin.
>
>   _____
>
> _______________________________________________________________________
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
>
>


--
Alexandre Poitras
Québec, Canada

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