I have search around and have found one thing  i can not explain for me.

After every start of maven for example java:compile, site:generate or
something else.

The line 

Attempting to download maven-SNAPSHOT.jar.

is shown.

But when I start my own goal which is defined in the maven.xml file

Work:doCompile

 

This line is never shown.

 

Is maven not initialized?

Is there something more I have to do?

 

My maven.xml file

 

<project default="Work:doCompile" xmlns:ant="jelly:ant" xmlns:j="jelly:core"
xmlns:maven="jelly:maven">

 

 <goal name="Work:compileJSP">

    <ant:echo>...${file}...</ant:echo>

    <ant:echo>.maven..${maven.dependency.classpath}...</ant:echo>

    <ant:echo>.pom..${pom.dependency.classpath}...</ant:echo>

    <ant:echo>.classpath..${classpath}...</ant:echo>

 

    <ant:classpath>

       <ant:path refid="maven.dependency.classpath"/>

       <ant:pathelement path="${maven.build.dest}"/>

    </ant:classpath>

    

    <ant:jspc srcdir="${file.parentFile}"

              destdir="${maven.build.dir}/default.war/jsptmp"

              compiler="jasper"

              verbose="9"

              failonerror="true">

              <include name="${file.name}" 

              classpathref="maven.compile.src.set" />

    </ant:jspc>

 

  </goal>

 

  <goal name="Work:doCompile" description="Compiles all JSPs">

    <fileScanner var="files">

      <fileset dir="${pbase.dir}/jboss/server/default/deploy/default.war">

        <include name="**/*.jsp" />

        <exclude name="WEB-INF/*" />

      </fileset>

    </fileScanner>

    

    <j:forEach items="${files.iterator()}" var="file">

      <j:set var="filename" value="${file.parentFile.name}" />

      <ant:echo>::${file.name}</ant:echo> 

      <ant:echo>::${file.path}</ant:echo>   

      <ant:echo>::${file.parentFile}</ant:echo>       

      <attainGoal name="Work:compileJSP"/>

    </j:forEach>

  </goal>

 

</project>

 

And the output on the console

 

C:\Limex51\MAVEN>maven Work:doCompile

 __  __

|  \/  |__ _Apache__ ___

| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~

|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc1-SNAPSHOT

 

Work:doCompile:

    [echo] ::region.jsp

    [echo]
::C:\Lim\jboss\server\default\deploy\default.war\masterdata\cpty\region.jsp

    [echo] ::C:\Lim\jboss\server\default\deploy\default.war\masterdata\cpty

Work:compileJSP:

    [echo]
...C:\Lim\jboss\server\default\deploy\default.war\masterdata\cpty\region.jsp
...

    [echo] .maven.....

    [echo] .pom.....

    [echo] .classpath.....

    [jspc] Compiling 1 source
fileC:\Lim\jboss\server\default\deploy\default.war\jsptmp

    [jspc] java.lang.NoClassDefFoundError: org/apache/jasper/JspC

    [jspc] Exception in thread "main"

 

BUILD FAILED

File...... file:/C:/project/MAVEN/

Element... ant:jspc

Line...... 21

Column.... 27

Java returned: 1

Total time: 6 seconds

Finished at: Mon Dec 01 13:13:45 CET 2003

 

 

Any idea what I forgot to do, to initialize??

The jars which contains the JspC are in the project.xml file

 

    <dependency>

      <groupId>jboss</groupId>

      <artifactId>jasper-compiler</artifactId>

      <version>1.0</version>

    </dependency>

    <dependency>

      <groupId>jboss</groupId>

      <artifactId>jasper-runtime</artifactId>

      <version>1.0</version>

    </dependency>

 

Am really happy for any hint

Thanks

 

Edmund 



--------------------------------------------------------------------------------
The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express
written permission of the sender. If you are not the intended recipient, please
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender.
--------------------------------------------------------------------------------

Reply via email to