You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Karan Malhi <ka...@gmail.com> on 2007/06/06 01:52:02 UTC

maven assembly 2.2-beta does not filter copied files

The maven assembly plugin 2.2-beta-1 does not filter copied files. We
would need to revert back to version 2.1. Also, version 2.1 does not
filter filesets, so we would need to convert all <fileSet> elements to
<files> element. The reason  filtering is required is because in the
snapshot zip of openejb-standalone, the openejb.bat has a reference to
${pom.version} and this reference is not resolved to the version of
the current pom since filtering is broken.

I am a new user to maven, but have been able to spend some time to
figure out this problem. there are also a couple of JIRA's on the
maven assembly plugin module.

Below is a section of my bin.xml , (this works). I have added
src/main/resources/openejb.conf for the beans and logs directory also,
just because i needed a file, but this is not the final bin.xml.

Should we revert back to 2.1 and the structure below? Are there any
issues in working with 2.1 till this issue in 2.2 is fixed?
  <files>
	
      <file>
      <source>src/main/resources/openejb.bat</source>
      <outputDirectory>bin/</outputDirectory>
      <lineEnding>dos</lineEnding>
      <fileMode>0755</fileMode>
      <filtered>true</filtered>
      </file>
      <file>
      <source>src/main/resources/openejb</source>
      <outputDirectory>bin/</outputDirectory>
      <lineEnding>unix</lineEnding>
      <fileMode>0755</fileMode>
      <filtered>true</filtered>
    </file>
    <file>
      <source>src/main/resources/openejb.conf</source>
      <outputDirectory>conf/</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/openejb.conf</source>
      <outputDirectory>logs/</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/openejb.conf</source>
      <outputDirectory>beans/</outputDirectory>
    </file>
    </files>

If we do want version 2.2, then we could add a ANT copy plugin and
could use ant filters instead. Basically ant could copy the files in a
temporary folder after applying the filter and maven could pick up the
filtered files and bundle them in the assembly
-- 
Karan Malhi

Re: maven assembly 2.2-beta does not filter copied files

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Give this item a 24 hour so everybody can reply on that.

On 6/6/07, Karan Malhi <ka...@gmail.com> wrote:
>
> The maven assembly plugin 2.2-beta-1 does not filter copied files. We
> would need to revert back to version 2.1. Also, version 2.1 does not
> filter filesets, so we would need to convert all <fileSet> elements to
> <files> element. The reason  filtering is required is because in the
> snapshot zip of openejb-standalone, the openejb.bat has a reference to
> ${pom.version} and this reference is not resolved to the version of
> the current pom since filtering is broken.
>
> I am a new user to maven, but have been able to spend some time to
> figure out this problem. there are also a couple of JIRA's on the
> maven assembly plugin module.
>
> Below is a section of my bin.xml , (this works). I have added
> src/main/resources/openejb.conf for the beans and logs directory also,
> just because i needed a file, but this is not the final bin.xml.
>
> Should we revert back to 2.1 and the structure below? Are there any
> issues in working with 2.1 till this issue in 2.2 is fixed?
>   <files>
>
>       <file>
>       <source>src/main/resources/openejb.bat</source>
>       <outputDirectory>bin/</outputDirectory>
>       <lineEnding>dos</lineEnding>
>       <fileMode>0755</fileMode>
>       <filtered>true</filtered>
>       </file>
>       <file>
>       <source>src/main/resources/openejb</source>
>       <outputDirectory>bin/</outputDirectory>
>       <lineEnding>unix</lineEnding>
>       <fileMode>0755</fileMode>
>       <filtered>true</filtered>
>     </file>
>     <file>
>       <source>src/main/resources/openejb.conf</source>
>       <outputDirectory>conf/</outputDirectory>
>     </file>
>     <file>
>       <source>src/main/resources/openejb.conf</source>
>       <outputDirectory>logs/</outputDirectory>
>     </file>
>     <file>
>       <source>src/main/resources/openejb.conf</source>
>       <outputDirectory>beans/</outputDirectory>
>     </file>
>     </files>
>
> If we do want version 2.2, then we could add a ANT copy plugin and
> could use ant filters instead. Basically ant could copy the files in a
> temporary folder after applying the filter and maven could pick up the
> filtered files and bundle them in the assembly
> --
> Karan Malhi
>



-- 
Thanks
- Mohammad Nour

Re: maven assembly 2.2-beta does not filter copied files

Posted by Karan Malhi <ka...@gmail.com>.
I have been able to fix the assembly stuff , but only if i run maven
from within the openejb-standalone module. If i run maven from the
root with the -Dassemble argument, filtering still doesnt work. the
filters kick in, but they dont filter. I wont submit a patch until i
get it fixed.

On 6/7/07, Mohammad Nour El-Din <no...@gmail.com> wrote:
> so what are you waiting for champ :), go ahead and use the 2.1 version.
>
> On 6/7/07, Karan Malhi <ka...@gmail.com> wrote:
> >
> > I posted this a question to the maven-users list and see the response
> > below from Jason Van zyle:
> >
> > > - How do I tell maven to stop downloading the beta versions of plugins
> > > and just download the latest stable releases of plugins?
> >
> > Specify versions of the plugins you want to use in your projects. Do
> > not leave it to chance. Not specify versions of all things is bad
> > practice.
> >
> > > - Can I ask maven to clean the repo of all beta versions of plugins or
> > > do i have to manually remove them?
> >
> > On 6/6/07, Brett Porter <br...@apache.org> wrote:
> > >
> > > On 07/06/2007, at 11:50 AM, Karan Malhi wrote:
> > >
> > > > If i dont set the version of the assembly, maven does not filter.
> > > > Could it be due to the fact that 2.2-beta-1 version was already
> > > > downloaded to my local repo and maven just uses the latest if we do
> > > > not specify the version of the plugin?
> > > >
> > > > However, if i give the version 2.1 for the assembly plugin, it
> > > > works fine.
> > > >
> > > > Maven gurus, could you please throw some light here.
> > >
> > > What you've said is correct, and you should be specifying the version
> > > as 2.1.
> > >
> > > - Brett
> > >
> > >
> >
> >
> > --
> > Karan Malhi
> >
>
>
>
> --
> Thanks
> - Mohammad Nour
>


-- 
Karan Malhi

Re: maven assembly 2.2-beta does not filter copied files

Posted by Mohammad Nour El-Din <no...@gmail.com>.
so what are you waiting for champ :), go ahead and use the 2.1 version.

On 6/7/07, Karan Malhi <ka...@gmail.com> wrote:
>
> I posted this a question to the maven-users list and see the response
> below from Jason Van zyle:
>
> > - How do I tell maven to stop downloading the beta versions of plugins
> > and just download the latest stable releases of plugins?
>
> Specify versions of the plugins you want to use in your projects. Do
> not leave it to chance. Not specify versions of all things is bad
> practice.
>
> > - Can I ask maven to clean the repo of all beta versions of plugins or
> > do i have to manually remove them?
>
> On 6/6/07, Brett Porter <br...@apache.org> wrote:
> >
> > On 07/06/2007, at 11:50 AM, Karan Malhi wrote:
> >
> > > If i dont set the version of the assembly, maven does not filter.
> > > Could it be due to the fact that 2.2-beta-1 version was already
> > > downloaded to my local repo and maven just uses the latest if we do
> > > not specify the version of the plugin?
> > >
> > > However, if i give the version 2.1 for the assembly plugin, it
> > > works fine.
> > >
> > > Maven gurus, could you please throw some light here.
> >
> > What you've said is correct, and you should be specifying the version
> > as 2.1.
> >
> > - Brett
> >
> >
>
>
> --
> Karan Malhi
>



-- 
Thanks
- Mohammad Nour

Re: maven assembly 2.2-beta does not filter copied files

Posted by Karan Malhi <ka...@gmail.com>.
I posted this a question to the maven-users list and see the response
below from Jason Van zyle:

> - How do I tell maven to stop downloading the beta versions of plugins
> and just download the latest stable releases of plugins?

Specify versions of the plugins you want to use in your projects. Do
not leave it to chance. Not specify versions of all things is bad
practice.

> - Can I ask maven to clean the repo of all beta versions of plugins or
> do i have to manually remove them?

On 6/6/07, Brett Porter <br...@apache.org> wrote:
>
> On 07/06/2007, at 11:50 AM, Karan Malhi wrote:
>
> > If i dont set the version of the assembly, maven does not filter.
> > Could it be due to the fact that 2.2-beta-1 version was already
> > downloaded to my local repo and maven just uses the latest if we do
> > not specify the version of the plugin?
> >
> > However, if i give the version 2.1 for the assembly plugin, it
> > works fine.
> >
> > Maven gurus, could you please throw some light here.
>
> What you've said is correct, and you should be specifying the version
> as 2.1.
>
> - Brett
>
>


-- 
Karan Malhi

Re: maven assembly 2.2-beta does not filter copied files

Posted by Brett Porter <br...@apache.org>.
On 07/06/2007, at 11:50 AM, Karan Malhi wrote:

> If i dont set the version of the assembly, maven does not filter.
> Could it be due to the fact that 2.2-beta-1 version was already
> downloaded to my local repo and maven just uses the latest if we do
> not specify the version of the plugin?
>
> However, if i give the version 2.1 for the assembly plugin, it  
> works fine.
>
> Maven gurus, could you please throw some light here.

What you've said is correct, and you should be specifying the version  
as 2.1.

- Brett


Re: maven assembly 2.2-beta does not filter copied files

Posted by Karan Malhi <ka...@gmail.com>.
If i dont set the version of the assembly, maven does not filter.
Could it be due to the fact that 2.2-beta-1 version was already
downloaded to my local repo and maven just uses the latest if we do
not specify the version of the plugin?

However, if i give the version 2.1 for the assembly plugin, it works fine.

Maven gurus, could you please throw some light here.

Thanks

On 6/6/07, Karan Malhi <ka...@gmail.com> wrote:
> > maybe shouldn't add the explicit versions of the plugins we use just
> > cause things seem to break from time to time.
> >
> > -David
>
> +1
>
> --
> Karan Malhi
>


-- 
Karan Malhi

Re: maven assembly 2.2-beta does not filter copied files

Posted by Karan Malhi <ka...@gmail.com>.
> maybe shouldn't add the explicit versions of the plugins we use just
> cause things seem to break from time to time.
>
> -David

+1

-- 
Karan Malhi

Re: maven assembly 2.2-beta does not filter copied files

Posted by David Blevins <da...@visi.com>.
On Jun 5, 2007, at 4:52 PM, Karan Malhi wrote:
> Should we revert back to 2.1 and the structure below? Are there any
> issues in working with 2.1 till this issue in 2.2 is fixed?

I think that's a good idea.  In fact sometimes I've wondered if we  
maybe shouldn't add the explicit versions of the plugins we use just  
cause things seem to break from time to time.

-David