You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by EJ Ciramella <ec...@upromise.com> on 2009/02/20 21:05:35 UTC

Using the option within an assembly descriptor

  Hello again list, I'm struggling to get this thing working.
 
I'm trying my hardest to not process files (for a war project) once to
the target directory then AGAIN into the final assembly location.
 
So I'm using mvn assembly:directory but I don't see any of the tokens
expanded for the files when inside the descriptor, I have something like
this:
 
    <fileSet>
       <directory>src/main/resources/java-properties</directory>
       <outputDirectory>somedir</outputDirectory>
       <useStrictFiltering>true</useStrictFiltering>
       <lineEnding>unix</lineEnding>
       <filtered>true</filtered>
       <includes>
        <include>hibernate.properties</include>
       </includes>
    </fileSet>
 
The resulting hibernate.properties file still has ${stuff} type
properties left in there.
 
Any suggestions?

RE: Using the option within an assembly descriptor

Posted by EJ Ciramella <ec...@upromise.com>.
So upgrading the version of the plugin we're using solves the issues we
were having with the tokens NOT expanded.

But now I'm seeing something else weird.

With the older version of the assembly plugin (2.2-beta-1), if I did an
"assembly:directory", I'd get a directory like this:

appName-1.0-SNAPSHOT-dev.dir

Now, when I do the same thing, there's no .dir extension.

Is there a way to bring that back?

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


RE: Using the option within an assembly descriptor

Posted by EJ Ciramella <ec...@upromise.com>.
Any feed back on this issue - anyone?

I see conflicting things in the source code - things like how the
<files> lists ARE expanded with things from the mavenProject object, not
just a filters file. 



-----Original Message-----
From: EJ Ciramella [mailto:eciramella@upromise.com] 
Sent: Friday, February 20, 2009 3:21 PM
To: Maven Users List
Subject: RE: Using the <filtered> option within an assembly descriptor

I think I've discovered what's tripping me up a bit here.

Does this filtering take into consideration properties defined within
the mavenProject object or ONLY stuff pass in via the filtering file.

I'm referencing this page in particular:

http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/fi
ltering-some-distribution-files.html

"All the above files are in the root directory of the project but only
the README and the NOTICE files should be filtered. The property file
used to filter these are files is found in
src/assemble/filter.properties."

However, there is some conflicting documatation up there - in one place,
it suggests filters only exist for <files> but it's clearly there in
<fileSets>.

Mick - I just saw your reply, and no, I've not set up <filters> in my
pom.

I've been under the impression (until right now) that the filtering that
the assembly plugin did factored in any of the mavenProject properties -
which apparently it doesn't.

Am I correct? 

-----Original Message-----
From: EJ Ciramella [mailto:eciramella@upromise.com]
Sent: Friday, February 20, 2009 3:06 PM
To: users@maven.apache.org
Subject: Using the <filtered> option within an assembly descriptor

  Hello again list, I'm struggling to get this thing working.
 
I'm trying my hardest to not process files (for a war project) once to
the target directory then AGAIN into the final assembly location.
 
So I'm using mvn assembly:directory but I don't see any of the tokens
expanded for the files when inside the descriptor, I have something like
this:
 
    <fileSet>
       <directory>src/main/resources/java-properties</directory>
       <outputDirectory>somedir</outputDirectory>
       <useStrictFiltering>true</useStrictFiltering>
       <lineEnding>unix</lineEnding>
       <filtered>true</filtered>
       <includes>
        <include>hibernate.properties</include>
       </includes>
    </fileSet>
 
The resulting hibernate.properties file still has ${stuff} type
properties left in there.
 
Any suggestions?

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


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


RE: Using the option within an assembly descriptor

Posted by EJ Ciramella <ec...@upromise.com>.
I think I've discovered what's tripping me up a bit here.

Does this filtering take into consideration properties defined within
the mavenProject object or ONLY stuff pass in via the filtering file.

I'm referencing this page in particular:

http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/fi
ltering-some-distribution-files.html

"All the above files are in the root directory of the project but only
the README and the NOTICE files should be filtered. The property file
used to filter these are files is found in
src/assemble/filter.properties."

However, there is some conflicting documatation up there - in one place,
it suggests filters only exist for <files> but it's clearly there in
<fileSets>.

Mick - I just saw your reply, and no, I've not set up <filters> in my
pom.

I've been under the impression (until right now) that the filtering that
the assembly plugin did factored in any of the mavenProject properties -
which apparently it doesn't.

Am I correct? 

-----Original Message-----
From: EJ Ciramella [mailto:eciramella@upromise.com] 
Sent: Friday, February 20, 2009 3:06 PM
To: users@maven.apache.org
Subject: Using the <filtered> option within an assembly descriptor

  Hello again list, I'm struggling to get this thing working.
 
I'm trying my hardest to not process files (for a war project) once to
the target directory then AGAIN into the final assembly location.
 
So I'm using mvn assembly:directory but I don't see any of the tokens
expanded for the files when inside the descriptor, I have something like
this:
 
    <fileSet>
       <directory>src/main/resources/java-properties</directory>
       <outputDirectory>somedir</outputDirectory>
       <useStrictFiltering>true</useStrictFiltering>
       <lineEnding>unix</lineEnding>
       <filtered>true</filtered>
       <includes>
        <include>hibernate.properties</include>
       </includes>
    </fileSet>
 
The resulting hibernate.properties file still has ${stuff} type
properties left in there.
 
Any suggestions?

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


Re: Using the option within an assembly descriptor

Posted by Mick Knutson <mi...@gmail.com>.
Do those properties exist in your filter.properties file?
Did you setup <filters>... in your pom.xml as well?

---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Twitter: http://twitter.com/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Fri, Feb 20, 2009 at 3:05 PM, EJ Ciramella <ec...@upromise.com>wrote:

>  Hello again list, I'm struggling to get this thing working.
>
> I'm trying my hardest to not process files (for a war project) once to
> the target directory then AGAIN into the final assembly location.
>
> So I'm using mvn assembly:directory but I don't see any of the tokens
> expanded for the files when inside the descriptor, I have something like
> this:
>
>    <fileSet>
>       <directory>src/main/resources/java-properties</directory>
>       <outputDirectory>somedir</outputDirectory>
>       <useStrictFiltering>true</useStrictFiltering>
>       <lineEnding>unix</lineEnding>
>       <filtered>true</filtered>
>       <includes>
>        <include>hibernate.properties</include>
>       </includes>
>    </fileSet>
>
> The resulting hibernate.properties file still has ${stuff} type
> properties left in there.
>
> Any suggestions?
>