maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daivish Shah <daivish.s...@gmail.com>
Subject Re: Getting error when i am using maven-antrun-plugin for Weblogic Workshop project
Date Mon, 08 Aug 2011 23:32:51 GMT
Now i have only one question so you can ignore other questions.


My POM.XML

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>WPSMavenProject</artifactId>
    <groupId>WPSMavenProject</groupId>
    <version>1.0</version>
  </parent>
  <groupId>WPSEjb</groupId>
  <artifactId>WPSEjb</artifactId>
  <version>1.0</version>
  <packaging>jar</packaging>

       <properties>
        <java-version>1.4.2</java-version>
        <weblogic.home>C:\bea\weblogic81</weblogic.home>
         <app.dir>./src/main/java</app.dir>
         <work.file>C:\WPS\WPS.work</work.file>
         <output.dir>C:/TEST</output.dir>

<server.classpath>${weblogic.home}/../jdk142_04/jre/lib/rt.jar;${weblogic.home}/../jdk142_04/jre/lib/jsse.jar;${weblogic.home}/../jdk142_04/jre/lib/jce.jar;${weblogic.home}/../jdk142_04/lib/tools.jar;${weblogic.home}/server/lib/knex.jar;${weblogic.home}/common/lib/log4j.jar;${weblogic.home}/server/lib/debugging.jar;${weblogic.home}/javelin/lib/javelin.jar;${weblogic.home}/server/lib/wlw-lang.jar;${weblogic.home}/server/lib/weblogic.jar;${weblogic.home}/common/eval/pointbase/lib/pbserver44.jar;${weblogic.home}/common/eval/pointbase/lib/pbclient44.jar;${weblogic.home}/server/lib/webservices.jar;${weblogic.home}/server/lib/webserviceclient.jar;${weblogic.home}/server/lib/webserviceclient+ssl.jar;${weblogic.home}/server/lib/wli.jar;${weblogic.home}/server/lib/xbean.jar;${weblogic.home}/server/lib/wlxbean.jar;${weblogic.home}/server/lib/xqrl.jar;${weblogic.home}/server/lib/netui/netui-compiler.jar</server.classpath>
         <java.home>C:\bea\jdk142_04</java.home>

      </properties>

  <build>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                        <configuration>
                    <source>${java-version}</source>
                    <target>${java-version}</target>
                </configuration>
            </plugin>
        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.1</version>

          <executions>
             <execution>
              <id>compile</id>
              <phase>compile</phase>
               <goals>
              <goal>run</goal>
              </goals>
              <configuration>

              <source>${java-version}</source>
              <target>${java-version}</target>


               <tasks>
                  <taskdef name="wlwBuild"
classname="workshop.core.WlwBuildTask">
                      <classpath refid="maven.dependency.classpath"/>
                  <classpath>
                        <fileset dir="C:\bea\weblogic81\workshop">
                         <include name="wlw-ide.jar"/>
                      </fileset>
                  </classpath>
                   </taskdef>

                      <echo message="weblogic.home classpath:
${weblogic.home}"/>
                      <echo message="app.dir classpath: ${app.dir}"/>
                      <echo message="work.file classpath:
${weblogic.home}"/>
                      <echo message="output.dir classpath: ${output.dir}"/>
                      <echo message="server.classpath classpath:
${server.classpath}"/>
                    <wlwBuild work="${work.file}"
serverclasspath="${server.classpath}" >
                           <build outputdir="${output.dir}"
outputfilename="WPSEjb.jar" project="WPSEjb"/>
                    </wlwBuild>

                 </tasks>

              </configuration>
             </execution>
           </executions>
    <dependencies>
           <dependency>
              <groupId>sun.jdk</groupId>
              <artifactId>tools</artifactId>
              <version>1.4.2</version>
              <scope>system</scope>
              <systemPath>${java.home}/lib/tools.jar</systemPath>
            </dependency>
    </dependencies>

        </plugin>
        </plugins>
 </build>
</project>

I am getting following Exception...



 [wlwBuild]     <server-classpath> :
 [wlwBuild]         C:/bea/weblogic81/../jdk142_04/jre/lib/rt.jar
 [wlwBuild]         C:/bea/weblogic81/../jdk142_04/jre/lib/jsse.jar
 [wlwBuild]         C:/bea/weblogic81/../jdk142_04/jre/lib/jce.jar
 [wlwBuild]         C:/bea/weblogic81/../jdk142_04/lib/tools.jar
 [wlwBuild]         C:/bea/weblogic81/server/lib/knex.jar
 [wlwBuild]         C:/bea/weblogic81/common/lib/log4j.jar
 [wlwBuild]         C:/bea/weblogic81/server/lib/debugging.jar
 [wlwBuild]         C:/bea/weblogic81/javelin/lib/javelin.jar
 [wlwBuild]         C:/bea/weblogic81/server/lib/wlw-lang.jar
 [wlwBuild]         C:/bea/weblogic81/server/lib/weblogic.jar
 [wlwBuild]
C:/bea/weblogic81/common/eval/pointbase/lib/pbserver44.jar
 [wlwBuild]
C:/bea/weblogic81/common/eval/pointbase/lib/pbclient44.jar
 [wlwBuild]         C:/bea/weblogic81/server/lib/webservices.jar
 [wlwBuild]         C:/bea/weblogic81/server/lib/webserviceclient.jar
 [wlwBuild]         C:/bea/weblogic81/server/lib/webserviceclient+ssl.jar
 [wlwBuild]         C:/bea/weblogic81/server/lib/wli.jar
 [wlwBuild]         C:/bea/weblogic81/server/lib/xbean.jar
 [wlwBuild]         C:/bea/weblogic81/server/lib/wlxbean.jar
 [wlwBuild]         C:/bea/weblogic81/server/lib/xqrl.jar
 [wlwBuild]         C:/bea/weblogic81/server/lib/netui/netui-compiler.jar
 [wlwBuild]     <output-directory> : C:\CARR
 [wlwBuild]     <output-filename> : WPSEjb.jar
 [wlwBuild] [Build] Build project WPSEjb started.
 [wlwBuild] [Build] This project type does not allow override of the output
directory location.
 [wlwBuild] [Build] Build project WPSEjb complete.
 [wlwBuild] java.lang.reflect.InvocationTargetException
 [wlwBuild] java.lang.reflect.InvocationTargetException
 [wlwBuild]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
 [wlwBuild]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 [wlwBuild]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 [wlwBuild]     at java.lang.reflect.Method.invoke(Method.java:592)
 [wlwBuild]     at workshop.core.Compile.start(Compile.java:19)
 [wlwBuild]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
 [wlwBuild]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 [wlwBuild]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 [wlwBuild]     at java.lang.reflect.Method.invoke(Method.java:592)
 [wlwBuild]     at workshop.core.Starter.invokeStart(Starter.java:34)
 [wlwBuild]     at workshop.core.Compile.main(Compile.java:9)
 [wlwBuild] Caused by: java.lang.NoClassDefFoundError:
org/apache/crimson/tree/XmlDocument
 [wlwBuild]     at
workshop.util.ide.PreferencesNode._export(PreferencesNode.java:540)
 [wlwBuild]     at
workshop.util.ide.PreferencesNode.exportSubtree(PreferencesNode.java:820)
 [wlwBuild]     at
workshop.util.ide.PreferencesNode.flush(PreferencesNode.java:984)
 [wlwBuild]     at workshop.core.App$15.run(App.java:1000)
 [wlwBuild]     at
workshop.core.asynctask.AsyncTaskManager.showDialogWhileRunning(AsyncTaskManager.java:272)
 [wlwBuild]     at
workshop.core.asynctask.AsyncTaskManager.showDialogWhileRunning(AsyncTaskManager.java:482)
 [wlwBuild]     at workshop.core.App.exit(App.java:994)
 [wlwBuild]     at
workshop.core.CompileHelper.compile(CompileHelper.java:298)
 [wlwBuild]     ... 11 more
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: Java returned: -1
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Mon Aug 08 16:31:51 PDT 2011
[INFO] Final Memory: 9M/16M
[INFO]
------------------------------------------------------------------------


On Mon, Aug 8, 2011 at 3:42 PM, Daivish Shah <daivish.shah@gmail.com> wrote:

> Hi,
>
> I have some questions for maven-antrun-plugin. I want to use thing plugin
> to build my Weblogic workshop project and want to create JAR file for my EJB
> project.
>
> We are using Weblogic 8.1 and JDK is 1.4.2 version. I am using MAVEN 2.2.1
> version with JDK 1.5
>
> *I have some questions as below :*
>
> 1) What version of maven-antrun-plugin i should use so it should compile my
> source code with JDK 1.4.2 version ?
> 2) How can i add build.xml Property Values in following POM.XML, I tried
> adding property tag under <target></target> but it looks like it's not using
> this property values during my Ant RUN.
> 3) Please look at the error log and let me know why i am getting this
> error  ?
>
>
> *POM.XML*
>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <artifactId>WPSMavenProject</artifactId>
>     <groupId>WPSMavenProject</groupId>
>     <version>1.0</version>
>   </parent>
>   <groupId>WPSEjb</groupId>
>   <artifactId>WPSEjb</artifactId>
>   <version>1.0</version>
>   <packaging>jar</packaging>
>
>        <properties>
>         <java-version>1.4.2</java-version>
>       </properties>
>
>   <build>
>
>         <plugins>
>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-compiler-plugin</artifactId>
>                 <version>2.3.2</version>
>                         <configuration>
>                     <source>${java-version}</source>
>                     <target>${java-version}</target>
>                 </configuration>
>             </plugin>
>         <plugin>
>           <artifactId>maven-antrun-plugin</artifactId>
>           <version>1.1</version>
>           <executions>
>              <execution>
>               <id>compile</id>
>               <phase>compile</phase>
>                <goals>
>               <goal>run</goal>
>               </goals>
>               <configuration>
>               <source>${java-version}</source>
>               <target>${java-version}</target>
>
>               <target>
>
>               <property environment="env" />
>               <property name="weblogic.home" value="${env.WL_HOME}"/>
>               <property name="app.dir" value="./src/main/java"/>
>               <property name="work.file" value="C:\WPS\WPS.work"/>
>               <property name="output.dir" value="C:/TEST}" />
>               <property name="server.classpath"
> value="${weblogic.home}/../jdk142_04/jre/lib/rt.jar;${weblogic.home}/../jdk142_04/jre/lib/jsse.jar;${weblogic.home}/../jdk142_04/jre/lib/jce.jar;${weblogic.home}/../jdk142_04/lib/tools.jar;${weblogic.home}/server/lib/knex.jar;${weblogic.home}/common/lib/log4j.jar;${weblogic.home}/server/lib/debugging.jar;${weblogic.home}/javelin/lib/javelin.jar;${weblogic.home}/server/lib/wlw-lang.jar;${weblogic.home}/server/lib/weblogic.jar;${weblogic.home}/common/eval/pointbase/lib/pbserver44.jar;${weblogic.home}/common/eval/pointbase/lib/pbclient44.jar;${weblogic.home}/server/lib/webservices.jar;${weblogic.home}/server/lib/webserviceclient.jar;${weblogic.home}/server/lib/webserviceclient+ssl.jar;${weblogic.home}/server/lib/wli.jar;${weblogic.home}/server/lib/xbean.jar;${weblogic.home}/server/lib/wlxbean.jar;${weblogic.home}/server/lib/xqrl.jar;${weblogic.home}/server/lib/netui/netui-compiler.jar"
> />
>
>               <echo message="weblogic.home classpath: ${weblogic.home}"/>
>               <echo message="app.dir classpath: ${app.dir}"/>
>               <echo message="work.file classpath: ${weblogic.home}"/>
>               <echo message="output.dir classpath: ${output.dir}"/>
>               <echo message="server.classpath classpath:
> ${server.classpath}"/>
>
>               </target>
>
>                <tasks>
>                   <taskdef name="wlwBuild"
> classname="workshop.core.WlwBuildTask">
>                       <classpath refid="maven.dependency.classpath"/>
>
>                   <classpath>
>                         <fileset dir="C:\bea\weblogic81\workshop">
>                          <include name="wlw-ide.jar"/>
>                       </fileset>
>                   </classpath>
>
>                    </taskdef>
>                 <wlwBuild work="C:\WPS.work"
> serverclasspath="${server.classpath}" >
>                        <build outputdir="C:\TEST"
> outputfilename="WPSEjb.jar" project="WPSEjb"/>
>                 </wlwBuild>
>
>                  </tasks>
>
>               </configuration>
>              </execution>
>            </executions>
>         </plugin>
>         </plugins>
>  </build>
> </project>
>
>
>
>
> Another thing i am getting following exception when i execute MAVEN INSTALL
> command.
>
>
> [INFO] Executing tasks
>  [wlwBuild] Building Project : WPSEjb : C:\WPS\WPS.work
>  [wlwBuild]     <server-classpath> :
>  [wlwBuild]         ${server.classpath}
>  [wlwBuild]     <output-directory> : C:\TEST
>  [wlwBuild]     <output-filename> : WPSEjb.jar
>  [wlwBuild] [Build] Build project WPSEjb started.
>  [wlwBuild] [Build] This project type does not allow override of the output
> directory location.
>  [wlwBuild] [Build] Build project WPSEjb complete.
>  [wlwBuild] java.lang.reflect.InvocationTargetException
>  [wlwBuild] java.lang.reflect.InvocationTargetException
>  [wlwBuild]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>  [wlwBuild]     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  [wlwBuild]     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  [wlwBuild]     at java.lang.reflect.Method.invoke(Method.java:592)
>  [wlwBuild]     at workshop.core.Compile.start(Compile.java:19)
>  [wlwBuild]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>  [wlwBuild]     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  [wlwBuild]     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  [wlwBuild]     at java.lang.reflect.Method.invoke(Method.java:592)
>  [wlwBuild]     at workshop.core.Starter.invokeStart(Starter.java:34)
>  [wlwBuild]     at workshop.core.Compile.main(Compile.java:9)
>  [wlwBuild] Caused by: java.lang.NoClassDefFoundError:
> org/apache/crimson/tree/XmlDocument
>  [wlwBuild]     at
> workshop.util.ide.PreferencesNode._export(PreferencesNode.java:540)
>  [wlwBuild]     at
> workshop.util.ide.PreferencesNode.exportSubtree(PreferencesNode.java:820)
>  [wlwBuild]     at
> workshop.util.ide.PreferencesNode.flush(PreferencesNode.java:984)
>  [wlwBuild]     at workshop.core.App$15.run(App.java:1000)
>  [wlwBuild]     at
> workshop.core.asynctask.AsyncTaskManager.showDialogWhileRunning(AsyncTaskManager.java:272)
>  [wlwBuild]     at
> workshop.core.asynctask.AsyncTaskManager.showDialogWhileRunning(AsyncTaskManager.java:482)
>  [wlwBuild]     at workshop.core.App.exit(App.java:994)
>  [wlwBuild]     at
> workshop.core.CompileHelper.compile(CompileHelper.java:298)
>  [wlwBuild]     ... 11 more
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
>
> Embedded error: Java returned: -1
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 6 seconds
> [INFO] Finished at: Mon Aug 08 15:24:46 PDT 2011
> [INFO] Final Memory: 9M/16M
>
>
>
> Thanks,
> Daivish.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message