You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rémy Sanlaville <re...@gmail.com> on 2006/09/18 18:13:31 UTC

[M2] maven.plugin.classpath

Hi all,

I wanted to use the maven.plugin.classpath (see [1]), but it seems that
this variable does not exist any more
   > Embedded error: Reference maven.plugin.classpath not found.
It is normal ?

My context :
------------------
I want to use the antrun plugin like this

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

     <dependencies>
        <dependency>
            <artifactId>xdoclet-apache-module</artifactId>
            <groupId>xdoclet</groupId>
            <version>1.2.3</version>
            <type>jar</type>
        </dependency>
        [...]
     </dependencies>

    <executions>
        <execution>
            <phase>generate-sources</phase>
            <goals>
                <goal>run</goal>
            </goals>
            <configuration>
                <tasks>

                    <taskdef
                        name        = "webdoclet"
                        classname    = "xdoclet.modules.web.WebDocletTask"
                        classpathref= "maven.plugin.classpath"
                    />

but it's not working : > Embedded error: Reference
maven.plugin.classpathnot found.

So I need to do like this :

    <dependencies>
        <dependency>
            <artifactId>xdoclet-apache-module</artifactId>
            <groupId>xdoclet</groupId>
            <version>1.2.3</version>
            <type>jar</type>
        </dependency>
        [...]
     </dependencies>

    <build>
      <plugin>
         <artifactId>maven-antrun-plugin</artifactId>
         <version>1.0</version>

        <executions>
            <execution>
                <phase>generate-sources</phase>
                <goals>
                    <goal>run</goal>
                </goals>
                <configuration>
                    <tasks>

                        <taskdef
                            name        = "webdoclet"
                            classname    = "
xdoclet.modules.web.WebDocletTask"
                            classpathref= "maven.dependency.classpath"
                        />


But it's not very nice because maven put all the xdoclet dependencies in the
WEB-INF/lib.

It is not possible also to use the scope provided because the
maven.dependency.classpath
don't take into account this scope.

What can I do ?
Thanks,

Rémy


[1] http://maven.apache.org/plugins/maven-antrun-plugin/classpaths.html

Re: [M2] maven.plugin.classpath

Posted by Rémy Sanlaville <re...@gmail.com>.
Good dayt to you, Franz


To use maven.plugin.classpath, you must first set an ant property reference
> to that. You might want to take a look at [1]. It's the latest revision to
> the maven-antrun-plugin.


Thanks. I already show this page but the example is just to display maven's
classpaths.
What I need is to use maven.plugin.classpath in order to define a new task

<taskdef
    name        = "webdoclet"
    classname    = "xdoclet.modules.web.WebDocletTask"
    classpathref= " maven.plugin.classpath"
/>

I don't think that I can set an ant property reference and used it for that

<property name="plugin_classpath" refid="maven.plugin.classpath"/>
<taskdef
    name        = "webdoclet"
    classname    = "xdoclet.modules.web.WebDocletTask"
    classpathref= " plugin_classpath"
/>

It's not working :
>Embedded error: Reference plugin_classpath not found.

However, it is still being review. Thus, if you
> have any comments about it, kindly notify us so that we can improve it.
>

I don't know if it is a bug or if missed something.

Rémy

Re: [M2] maven.plugin.classpath

Posted by franz see <fr...@gmail.com>.


Rémy Sanlaville wrote:
> 
> Hi all,
> 
> I wanted to use the maven.plugin.classpath (see [1]), but it seems that
> this variable does not exist any more
>    > Embedded error: Reference maven.plugin.classpath not found.
> It is normal ?
> 
> My context :
> ------------------
> I want to use the antrun plugin like this
> 
> <plugin>
>     <artifactId>maven-antrun-plugin</artifactId>
>     <version>1.0</version>
> 
>      <dependencies>
>         <dependency>
>             <artifactId>xdoclet-apache-module</artifactId>
>             <groupId>xdoclet</groupId>
>             <version>1.2.3</version>
>             <type>jar</type>
>         </dependency>
>         [...]
>      </dependencies>
> 
>     <executions>
>         <execution>
>             <phase>generate-sources</phase>
>             <goals>
>                 <goal>run</goal>
>             </goals>
>             <configuration>
>                 <tasks>
> 
>                     <taskdef
>                         name        = "webdoclet"
>                         classname    = "xdoclet.modules.web.WebDocletTask"
>                         classpathref= "maven.plugin.classpath"
>                     />
> 
> but it's not working : > Embedded error: Reference
> maven.plugin.classpathnot found.
> 
> So I need to do like this :
> 
>     <dependencies>
>         <dependency>
>             <artifactId>xdoclet-apache-module</artifactId>
>             <groupId>xdoclet</groupId>
>             <version>1.2.3</version>
>             <type>jar</type>
>         </dependency>
>         [...]
>      </dependencies>
> 
>     <build>
>       <plugin>
>          <artifactId>maven-antrun-plugin</artifactId>
>          <version>1.0</version>
> 
>         <executions>
>             <execution>
>                 <phase>generate-sources</phase>
>                 <goals>
>                     <goal>run</goal>
>                 </goals>
>                 <configuration>
>                     <tasks>
> 
>                         <taskdef
>                             name        = "webdoclet"
>                             classname    = "
> xdoclet.modules.web.WebDocletTask"
>                             classpathref= "maven.dependency.classpath"
>                         />
> 
> 
> But it's not very nice because maven put all the xdoclet dependencies in
> the
> WEB-INF/lib.
> 
> It is not possible also to use the scope provided because the
> maven.dependency.classpath
> don't take into account this scope.
> 
> What can I do ?
> Thanks,
> 
> Rémy
> 
> 
> [1] http://maven.apache.org/plugins/maven-antrun-plugin/classpaths.html
> 
> 

Good day to you, Remy,

To use maven.plugin.classpath, you must first set an ant property reference
to that. You might want to take a look at [1]. It's the latest revision to
the maven-antrun-plugin. However, it is still being review. Thus, if you
have any comments about it, kindly notify us so that we can improve it.

Thanks,
Franz

[1]
http://people.apache.org/~aramirez/maven-antrun-plugin/examples/classpaths.html
-- 
View this message in context: http://www.nabble.com/-M2--maven.plugin.classpath-tf2292286.html#a6424753
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: [M2] maven.plugin.classpath

Posted by Rémy Sanlaville <re...@gmail.com>.
Hi Finn-Robert,

Sorry to reply just now but I made a lot of tests.

First, I understood why I had this message
> Embedded error: Reference maven.plugin.classpath not found.

It's because of a bad version :
         <artifactId>maven-antrun-plugin</artifactId>
         <version>1.0</version>
If I used the 1.1 or 1.2-SNAPSHOT version I don't have any more this error.


But I have an other problem that I can't find a solution after a long time.
Now I have this error :

> Embedded error: Can't create a strutsconfigxml element under webdoclet.
Make sure the jar file containing the corresponding subtask class is on the
classpath specified in the <taskdef> that defined {2}.

But I think that I have all the needed dependencies.

           <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.2-SNAPSHOT</version>

                <dependencies>
                    <dependency>
                        <artifactId>xdoclet-ejb-module</artifactId>
                        <groupId>xdoclet</groupId>
                        <version>1.2.3</version>
                        <type>jar</type>
                    </dependency>
                    <dependency>
                        <artifactId>xdoclet-apache-module</artifactId>
                        <groupId>xdoclet</groupId>
                        <version>1.2.3</version>
                        <type>jar</type>
                    </dependency>
                    <dependency>
                        <artifactId>xdoclet-web-module</artifactId>
                        <groupId>xdoclet</groupId>
                        <version>1.2.3</version>
                        <type>jar</type>
                    </dependency>
                    <dependency>
                        <artifactId>xdoclet-xdoclet-module</artifactId>
                        <groupId>xdoclet</groupId>
                        <version>1.2.3</version>
                        <type>jar</type>
                    </dependency>
                   <dependency>
                       <groupId>xdoclet</groupId>
                       <artifactId>xjavadoc</artifactId>
                       <version>1.1</version>
                       <type>jar</type>
                   </dependency>
                    <dependency>
                        <groupId>sun.j2ee</groupId>
                        <artifactId>j2ee</artifactId>
                        <version>1.4</version>
                        <scope>system</scope>
                        <systemPath>${J2EE_HOME}/lib/j2ee.jar</systemPath>
                    </dependency>
                    <dependency>
                        <groupId>javax.servlet</groupId>
                        <artifactId>jstl</artifactId>
                        <version>1.1.2</version>
                    </dependency>
                </dependencies>

                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>

                                <!--property name="dependency_classpath"
refid="maven.dependency.classpath"/>
                                <echo message="denpendency classpath:
${dependency_classpath}"/>
                                <property name="plugin_classpath" refid="
maven.plugin.classpath"/>
                                <echo message="plugin classpath:
${plugin_classpath}"/-->

                                <taskdef
                                    name        = "webdoclet"
                                    classname    = "
xdoclet.modules.web.WebDocletTask"
                                    classpathref= "maven.plugin.classpath"
                                />

                                <webdoclet     destdir    = "${
project.build.directory}/${project.build.finalName}/WEB-INF"
                                    excludedtags= "@version,@author"
                                    verbose        = "true">
                                    <fileset dir="${
project.build.sourceDirectory}" >
                                        <include name="**/*Form.java" />
                                        <include name="**/*Action.java" />
                                    </fileset>
                                    <strutsconfigxml
                                        mergeDir    =
"${basedir}/src/main/webapp/WEB-INF/merge"
                                        validatexml    = "true"
                                        version        = "1.2"/>
                                    <strutsvalidationxml
                                        validatexml    = "true"
                                        version        = "1.1.3"/>
                                </webdoclet>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Don't you have any idea ?

Rémy

Re: [M2] maven.plugin.classpath

Posted by Rémy Sanlaville <re...@gmail.com>.
Hi Finn-Robert,

I use the xdoclet-maven-plugin from the mojo project hosted by codehaus.
> Check it at http://mojo.codehaus.org/ They also have a webdoclet plugin
> which I think just wraps the xdoclet-plugin.
> Regarding the problem with xdoclet not generating anything sounds very
> familiar, it's definitely a classpath problem.
>

I forgotten to tell you that I already try this solution :
http://www.nabble.com/-M2--Struts-and-XDoclet-tf1775233.html#a4832525

It's what I wanted to do and because it was not working I tried the antrun
plugin.
If you have a solution with the xdoclet-maven-plugin, please let me know.

Rémy

SV: [M2] maven.plugin.classpath

Posted by Finn-Robert Kristensen <fr...@steria.no>.
Hi,

Put the xdoclet dependencies inside the plugin like you did first. And try writing the taskdef like this: 
<taskdef name="webdoclet" classname="xdoclet.modules.web.WebDocletTask">
   <classpath refid="maven.plugin.classpath"/>
</taskdef>

I use the xdoclet-maven-plugin from the mojo project hosted by codehaus. Check it at http://mojo.codehaus.org/ They also have a webdoclet plugin which I think just wraps the xdoclet-plugin.
Regarding the problem with xdoclet not generating anything sounds very familiar, it's definitely a classpath problem.

Finn-Robert

-----Opprinnelig melding-----
Fra: Rémy Sanlaville [mailto:remy.sanlaville@gmail.com] 
Sendt: 18. september 2006 18:14
Til: Maven Users List
Emne: [M2] maven.plugin.classpath

Hi all,

I wanted to use the maven.plugin.classpath (see [1]), but it seems that this variable does not exist any more
   > Embedded error: Reference maven.plugin.classpath not found.
It is normal ?

My context :
------------------
I want to use the antrun plugin like this

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

     <dependencies>
        <dependency>
            <artifactId>xdoclet-apache-module</artifactId>
            <groupId>xdoclet</groupId>
            <version>1.2.3</version>
            <type>jar</type>
        </dependency>
        [...]
     </dependencies>

    <executions>
        <execution>
            <phase>generate-sources</phase>
            <goals>
                <goal>run</goal>
            </goals>
            <configuration>
                <tasks>

                    <taskdef
                        name        = "webdoclet"
                        classname    = "xdoclet.modules.web.WebDocletTask"
                        classpathref= "maven.plugin.classpath"
                    />

but it's not working : > Embedded error: Reference maven.plugin.classpathnot found.

So I need to do like this :

    <dependencies>
        <dependency>
            <artifactId>xdoclet-apache-module</artifactId>
            <groupId>xdoclet</groupId>
            <version>1.2.3</version>
            <type>jar</type>
        </dependency>
        [...]
     </dependencies>

    <build>
      <plugin>
         <artifactId>maven-antrun-plugin</artifactId>
         <version>1.0</version>

        <executions>
            <execution>
                <phase>generate-sources</phase>
                <goals>
                    <goal>run</goal>
                </goals>
                <configuration>
                    <tasks>

                        <taskdef
                            name        = "webdoclet"
                            classname    = "
xdoclet.modules.web.WebDocletTask"
                            classpathref= "maven.dependency.classpath"
                        />


But it's not very nice because maven put all the xdoclet dependencies in the WEB-INF/lib.

It is not possible also to use the scope provided because the maven.dependency.classpath don't take into account this scope.

What can I do ?
Thanks,

Rémy


[1] http://maven.apache.org/plugins/maven-antrun-plugin/classpaths.html

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