You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Leonard Gestrin <Le...@markettools.com> on 2008/05/03 00:34:53 UTC

site generation fails if war plugin is defined with goal 'exploded' (cant override read-only parameter)

Hello,
I am running into problems generating site for project that has war
plugin using 'exploded' goal. 

I searched the archives and it looks like other people had issues with
it over the last couple years, but I could not find solution for it.

The error is 

[INFO] Using default encoding to copy filtered resources.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error configuring: org.apache.maven.plugins:maven-war-plugin.
Reason: ERROR: Cannot override
read-only parameter: classesDirectory in goal: war:exploded
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error
configuring: org.apache.maven.plugins:
maven-war-plugin. Reason: ERROR: Cannot override read-only parameter:
classesDirectory in goal: war:
exploded
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor
.java:568)


Perhaps, this can be solved by defining profiles and each profile
defining different configuration for war plugin, but I was thinking
there is a simpler solution for it.

Thanks
Leonard


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


Re: How to instruct Maven to run more than one script?

Posted by Jerome Lacoste <je...@gmail.com>.
On Sat, May 3, 2008 at 2:20 AM, Tawfik, Sameh E
<Sa...@fairisaac.com> wrote:
>
> Hi,
>
> I've two Perl scripts, "Before_Build.pl", and "After_Build.pl " that I
> need to run the first one before the build starts and the other one
> after the build is complete.
>
> So, what is the command line syntax to run a full build with the above
> requirements?

Extract from the soon to be published FAQ of the exec mojo:

Q: How to execute the plugin multiple times ?

    Use several execution nodes each with a different id. Don't forget
to bind each execution to a phase.

    Read the full answer here:
http://article.gmane.org/gmane.comp.java.maven-plugins.mojo.user/1307




> I've the following code in my pom.xml:
>
>             <plugin>
>               <groupId>org.codehaus.mojo</groupId>
>               <artifactId>exec-maven-plugin</artifactId>
>               <executions>
>                 <execution>
>                   <goals>
>                     <goal>exec</goal>
>                   </goals>
>                 </execution>
>               </executions>
>               <inherited>false</inherited>
>               <configuration>
>                 <executable>Before_Build.pl</executable>
>                 <arguments>
>                   <argument>20</argument>
>                 </arguments>
>               </configuration>
>             </plugin>
>
>             <plugin>
>               <groupId>org.codehaus.mojo</groupId>
>               <artifactId>exec-maven-plugin</artifactId>
>               <executions>
>                 <execution>
>                   <goals>
>                     <goal>exec</goal>
>                   </goals>
>                 </execution>
>               </executions>
>               <inherited>false</inherited>
>               <configuration>
>                 <executable>After_Build.pl</executable>
>                 <arguments>
>                   <argument>20</argument>
>                 </arguments>
>               </configuration>
>             </plugin>
>
> I can successfully execute the first Perl script "Before_Build.pl" from
> the command line, by running the following command:
>
>  C:\projects>mvn -N exec:exec -Dexec.executable=" Before_Build.pl"
>
>
>   Thanks,
>
>     Sameh
> This email and any files transmitted with it are confidential, proprietary
> and intended solely for the individual or entity to whom they are addressed.
> If you have received this email in error please delete it immediately.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
Jerome Lacoste, +47 40867729, Daglig Leder, CoffeeBreaks AS

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


How to instruct Maven to run more than one script?

Posted by "Tawfik, Sameh E" <Sa...@fairisaac.com>.
Hi,

I've two Perl scripts, "Before_Build.pl", and "After_Build.pl " that I
need to run the first one before the build starts and the other one
after the build is complete.

So, what is the command line syntax to run a full build with the above
requirements?

I've the following code in my pom.xml:

             <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>exec-maven-plugin</artifactId>
               <executions>
                 <execution>
                   <goals>
                     <goal>exec</goal>
                   </goals>
                 </execution>
               </executions>
               <inherited>false</inherited>
               <configuration>
                 <executable>Before_Build.pl</executable>
                 <arguments>
                   <argument>20</argument>
                 </arguments>
               </configuration>
             </plugin>

             <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>exec-maven-plugin</artifactId>
               <executions>
                 <execution>
                   <goals>
                     <goal>exec</goal>
                   </goals>
                 </execution>
               </executions>
               <inherited>false</inherited>
               <configuration>
                 <executable>After_Build.pl</executable>
                 <arguments>
                   <argument>20</argument>
                 </arguments>
               </configuration>
             </plugin>

I can successfully execute the first Perl script "Before_Build.pl" from
the command line, by running the following command:
  
  C:\projects>mvn -N exec:exec -Dexec.executable=" Before_Build.pl"


   Thanks,

     Sameh
This email and any files transmitted with it are confidential, proprietary
and intended solely for the individual or entity to whom they are addressed.
If you have received this email in error please delete it immediately.


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