Is there something I am missing to just filter resources for an assembly?

I can filter just fine for my modules (wars), but not creating an assembly.





On 8/16/07, Mick Knutson <[EMAIL PROTECTED]> wrote:
>
> OK, I have the following filter and resources attribultes in my master
> pom.xml:
>
>
>         <filters>
>             <filter>${basedir}/src/main/filters/filter.properties</filter>
>         </filters>
>         <resources>
>             <resource>
>                 <directory>${basedir}/src/main/resources</directory>
>                 <filtering>true</filtering>
>             </resource>
>         </resources>
>     </build>
>
>
> Then the filter.properties has:
>
> filter.application.name=DAP
> filter.application.version=1.0.0.9
>
>
>
>
>
> Then I have these 2 lines and nothing is filtered:
>
>
>
> #java -jar admin_client.jar deployer:oc4j:opmn://rc-hp19:6003/home
> oc4jadmin oc4jadmin -deploy -file /tmp/bl/dap-${project.version}/logging-
> ${project.version}.ear -deploymentname LoggingService -bindAllWebApps
>
> #java -jar admin_client.jar deployer:oc4j:opmn://rc-hp19:6003/home
> oc4jadmin oc4jadmin -deploy -file /tmp/bl/dap-${filter.application.version
> }/logging-${filter.application.version} .ear -deploymentname
> LoggingService -bindAllWebApps
>
>
>
>
>
>
>
>
> On 8/16/07, Wayne Fay <[EMAIL PROTECTED] > wrote:
> >
> > Apparently the filters parameter is readonly in the mojo:
> >
> > https://svn.apache.org/repos/asf/maven/plugins/tags/maven-assembly-plugin-2.2-beta-1/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java
> >
> > The default value is ${project.build.filters} which means the assembly
> > plugin inherits its filters from the <build> section.
> >
> > Wayne
> >
> > On 8/16/07, Mick Knutson <[EMAIL PROTECTED]> wrote:
> > > I want to filter the resources that I am adding to my assembly, but I
> > get a
> > > read-only parameter error.
> > >
> > >                <plugin>
> > >                    <artifactId>maven-assembly-plugin</artifactId>
> > >                    <version>2.2-beta-1</version>
> > >                    <configuration>
> > >                          <filters>
> > >
> > > <filter>src/main/filters/filter.properties</filter>
> > >                        </filters>
> > >                        <descriptors>
> > >                            <descriptor>src/main/resources/assembly-
> > > descriptor.xml</descriptor>
> > >                        </descriptors>
> > >                    </configuration>
> > >                </plugin>
> > >
> > >
> > >
> > > error:
> > > --------------
> > >
> > > [DEBUG] Retrieving parent-POM:
> > org.apache.maven.wagon:wagon::1.0-alpha-6 for
> > > project: null:wagon-providers:pom:1.0-alpha-6 from the repository.
> > > [DEBUG]
> > > org.apache.maven.wagon:wagon-http-lightweight:jar:1.0-alpha-6:runtime
> > (selected
> > > for runtime)
> > > [DEBUG] Retrieving parent-POM:
> > > org.apache.maven.reporting:maven-reporting::2.0.4 for project:
> > > null:maven-reporting-api:jar:2.0.4 from the repository.
> > > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0.4 for
> > project:
> > > org.apache.maven.reporting:maven-reporting:pom:2.0.4 from the
> > repository.
> > > [DEBUG]
> > org.apache.maven.reporting:maven-reporting-api:jar:2.0.4:runtime
> > (selected
> > > for runtime)
> > > [DEBUG]
> > org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-7:runtime (selected
> > > for runtime)
> > > [DEBUG]     org.apache.maven:maven-profile:jar:2.0:runtime (removed -
> > nearer
> > > found: 2.0.4)
> > > [DEBUG]     org.apache.maven:maven-profile:jar:2.0.4:runtime (selected
> > for
> > > runtime)
> > > [DEBUG]       org.apache.maven:maven-model:jar:2.0.4:runtime (removed
> > -
> > > nearer found: 2.0)
> > > [DEBUG]     org.apache.maven:maven-model:jar:2.0:runtime (removed -
> > nearer
> > > found: 2.0.4 )
> > > [DEBUG]     org.apache.maven:maven-model:jar:2.0.4:runtime (selected
> > for
> > > runtime)
> > > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0.4 for
> > project:
> > > null:maven-error-diagnostics:jar: 2.0.4 from the repository.
> > > [DEBUG]     org.apache.maven:maven-error-diagnostics:jar:2.0.4:runtime
> > (selected
> > > for runtime)
> > > [DEBUG]     org.apache.maven:maven-project:jar:2.0.4:runtime (removed
> > -
> > > nearer found: 2.0)
> > > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0.4 for
> > project:
> > > org.apache.maven:maven-plugin-registry:jar:2.0.4 from the repository.
> > > [DEBUG]     
> > > org.apache.maven:maven-plugin-registry:jar:2.0.4:runtime(selected
> > > for runtime)
> > > [DEBUG]     commons-cli:commons-cli:jar:1.0:runtime (selected for
> > runtime)
> > > [DEBUG] Retrieving parent-POM:
> > > org.apache.maven.wagon:wagon-providers::1.0-alpha-6 for project:
> > > null:wagon-ssh-external:jar:1.0-alpha-6 from the repository
> > > .
> > > [DEBUG] Retrieving parent-POM:
> > org.apache.maven.wagon:wagon::1.0-alpha-6 for
> > > project: null:wagon-providers:pom:1.0-alpha-6 from the repository.
> > > [DEBUG]
> > > org.apache.maven.wagon:wagon-ssh-external:jar:1.0-alpha-6:runtime(selected
> > > for runtime)
> > > [DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime(removed -
> > > nearer found: 1.1)
> > > [DEBUG]     org.apache.maven:maven-plugin-descriptor:jar:2.0.4:runtime
> > (selected
> > > for runtime)
> > > [DEBUG]
> > > org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4:runtime
> > (selected
> > > for runtime)
> > > [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0.4 for
> > project:
> > > org.apache.maven:maven-monitor:jar:2.0.4 from the repository.
> > > [DEBUG]     org.apache.maven:maven-monitor:jar:2.0.4:runtime (selected
> > for
> > > runtime)
> > > [DEBUG] Retrieving parent-POM:
> > > org.apache.maven.wagon:wagon-providers::1.0-alpha-6 for project:
> > > null:wagon-ssh:jar:1.0-alpha-7 from the repository.
> > > [DEBUG] Retrieving parent-POM:
> > org.apache.maven.wagon:wagon::1.0-alpha-6 for
> > > project: null:wagon-providers:pom:1.0-alpha-6 from the repository.
> > > [DEBUG]     org.apache.maven.wagon:wagon-ssh:jar:1.0-alpha-7:runtime
> > (selected
> > > for runtime)
> > > [DEBUG]       com.jcraft:jsch:jar:0.1.24:runtime (selected for
> > runtime)
> > > [DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime(removed -
> > > nearer found: 1.1)
> > > [DEBUG]     classworlds:classworlds:jar: 1.1:runtime (removed - nearer
> > found:
> > > 1.1-alpha-2)
> > > [DEBUG]   org.apache.maven:maven-project:jar:2.0:runtime (removed -
> > nearer
> > > found: 2.0.4)
> > > [DEBUG]   org.apache.maven:maven-project:jar:2.0.4:runtime (selected
> > for
> > > runtime)
> > > [DEBUG]
> > >
> > org.apache.maven.shared:maven-common-artifact-filters:jar:1.0-alpha-1:runtime
> > (selected
> > > for runtime)
> > > [DEBUG]     org.apache.maven:maven-artifact:jar:2.0.2:runtime (removed
> > -
> > > nearer found: 2.0.4)
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > > [ERROR] BUILD ERROR
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > > [INFO] Error configuring:
> > org.apache.maven.plugins:maven-assembly-plugin.
> > > Reason: ERROR: Cannot override read-only parameter: filters in goal:
> > > assembly:ass
> > > embly
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > > [DEBUG] Trace
> > > org.apache.maven.lifecycle.LifecycleExecutionException: Error
> > configuring:
> > > org.apache.maven.plugins:maven-assembly-plugin. Reason: ERROR: Cannot
> > > override read-only parameter: filters in goal: assembly:assembly
> > >        at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > > DefaultLifecycleExecutor.java:568)
> > >        at
> > >
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
> > > DefaultLifecycleExecutor.java:493)
> > >        at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> > > DefaultLifecycleExecutor.java:463)
> > >        at
> > >
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> > > (DefaultLifecycleExecutor.java:311)
> > >        at
> > >
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> > > DefaultLifecycleExecutor.java:224)
> > >        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> > > DefaultLifecycleExecutor.java:143)
> > >        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java
> > :330)
> > >        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
> > >        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> > >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >        at sun.reflect.NativeMethodAccessorImpl.invoke(
> > > NativeMethodAccessorImpl.java :39)
> > >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > DelegatingMethodAccessorImpl.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.PluginConfigurationException: Error
> > > configuring: org.apache.maven.plugins:maven-assembly-plugin. Reason:
> > ERROR:
> > > Cannot o
> > > verride read-only parameter: filters in goal: assembly:assembly
> > >        at
> > > org.apache.maven.plugin.DefaultPluginManager.validatePomConfiguration(
> > > DefaultPluginManager.java:859)
> > >        at
> > org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(
> > > DefaultPluginManager.java:566)
> > >        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> > > DefaultPluginManager.java :398)
> > >        at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > > DefaultLifecycleExecutor.java:539)
> > >        ... 16 more
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > > [INFO] Total time: 4 minutes 53 seconds
> > > [INFO] Finished at: Thu Aug 16 09:14:31 PDT 2007
> > > [INFO] Final Memory: 20M/36M
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > > .
> > >
> > >
> > > All I want to do is filter all my scripts like:
> > >
> > >
> > > deploy.sh:
> > >
> > > java -jar admin_client.jar deployer:oc4j:opmn://rc-hp19:6003/home
> > oc4jadmin
> > > oc4jadmin -deploy -file /tmp/bl/dap-${ project.version}/logging-${
> > > project.version}.ear -deploymentname LoggingService -bindAllWebApps
> > >
> > >
> > >
> > > So I really do not need the filter.properties itself, I just need
> > filtering
> > > of the added resources.
> > >
> > >
> > > --
> > >
> > > Thanks,
> > > Mick Knutson
> > >
> > > http://www.baselogic.com
> > > http://www.blincmagazine.com
> > > http://www.djmick.com
> > > http://www.myspace.com/mickknutson
> > > http://www.myspace.com/djmick_dot_com
> > > http://www.myspace.com/sexybeotches
> > > http://www.thumpradio.com
> > > ---
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
>
> Thanks,
> Mick Knutson
>
> http://www.baselogic.com
> http://www.blincmagazine.com
> http://www.djmick.com
> http://www.myspace.com/mickknutson
> http://www.myspace.com/djmick_dot_com
> http://www.myspace.com/sexybeotches
> http://www.thumpradio.com
> ---
>



-- 

Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/djmick_dot_com
http://www.myspace.com/sexybeotches
http://www.thumpradio.com
---

Reply via email to