You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jon Strayer <jo...@strayer.org> on 2008/10/06 20:39:54 UTC

Problem moving property file around

Hang with me, this takes a while to explain.  :-)

I'm trying to add a build number to a footer panel in GWT.

CruiseControl passes the build label to Maven.
Maven copies a properties file while performing a substitution which
gives me a properties file in target/classes with the correct values
in it.
To get GWT to build the properties file into the application I have to
copy the file from target/classes to the source tree (I use an ant
task for that).
For Eclipse builds to build correctly I need a default properties file
in the source tree.

The problem is that CVS won't tag the build because now the properties
file in the source tree is not in CVS.  I tried many ways to make a
backup copy of the file in the source tree and copy it back, but I've
never been able to find a phase to tie different copying calls to that
only executes once.

So, in short, what I need is a way to
    1. backup a properties file in the source directory before
resources are processed.
    2. copy a processed properties file from target/classes to the
source tree after resources are processed.
    3. copy the backup of the properties file back to the source tree
before scm:tag.

Right now I'm trying to work around the problem by having scm:tag not
tag that file, but that could lead to surprises.

-- 
Esse Quam Videre
To Be, rather than to Seem

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


Re: Problem moving property file around

Posted by Jon Strayer <jo...@strayer.org>.
No, GWT requires it to be in the source tree.

On Tue, Oct 7, 2008 at 9:52 AM, Brett Porter <br...@gmail.com> wrote:
> Is it possible to process the file into the target directory and use
> it from there so the original (which is the defaults) can remain
> unmodified?
>
> - Brett
>
> 2008/10/8 Jon Strayer <jo...@strayer.org>:
>> Well, the configuration I have for the scm plugin didn't work:
>> <plugin>
>>        <groupId>org.apache.maven.plugins</groupId>
>>        <artifactId>maven-scm-plugin</artifactId>
>>        <configuration>
>>                <connectionType>developerConnection</connectionType>
>>        </configuration>
>>        <executions>
>>                <execution>
>>                <id>tag</id>
>>                        <goals>
>>                        <goal>tag</goal>
>>                        </goals>
>>                <configuration>
>>                        <property name="excludes"
>> value="src/com/fusionsoftllc/achilles/client/BuildProperties.properties"/>
>>                </configuration>
>>                </execution>
>>        </executions>
>> </plugin>
>>
>> It still tried to tag the file.
>>
>> I want it in CVS because the default value (used in Eclipse builds) is
>> there.  The surprise I'm worried about is someone changing the file
>> and not seeing the change.
>>
>> On Mon, Oct 6, 2008 at 8:08 PM, Brett Porter <br...@gmail.com> wrote:
>>> I don't quite get it... it sounds like you don't want the properties
>>> file in CVS at all, so the solution you have at the end is fine. What
>>> are the surprises you are concerned about?
>>>
>>> - Brett
>>>
>>> 2008/10/7 Jon Strayer <jo...@strayer.org>:
>>>> Hang with me, this takes a while to explain.  :-)
>>>>
>>>> I'm trying to add a build number to a footer panel in GWT.
>>>>
>>>> CruiseControl passes the build label to Maven.
>>>> Maven copies a properties file while performing a substitution which
>>>> gives me a properties file in target/classes with the correct values
>>>> in it.
>>>> To get GWT to build the properties file into the application I have to
>>>> copy the file from target/classes to the source tree (I use an ant
>>>> task for that).
>>>> For Eclipse builds to build correctly I need a default properties file
>>>> in the source tree.
>>>>
>>>> The problem is that CVS won't tag the build because now the properties
>>>> file in the source tree is not in CVS.  I tried many ways to make a
>>>> backup copy of the file in the source tree and copy it back, but I've
>>>> never been able to find a phase to tie different copying calls to that
>>>> only executes once.
>>>>
>>>> So, in short, what I need is a way to
>>>>    1. backup a properties file in the source directory before
>>>> resources are processed.
>>>>    2. copy a processed properties file from target/classes to the
>>>> source tree after resources are processed.
>>>>    3. copy the backup of the properties file back to the source tree
>>>> before scm:tag.
>>>>
>>>> Right now I'm trying to work around the problem by having scm:tag not
>>>> tag that file, but that could lead to surprises.
>>>>
>>>> --
>>>> Esse Quam Videre
>>>> To Be, rather than to Seem
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Brett Porter
>>> Blog: http://blogs.exist.com/bporter/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>>
>>
>> --
>> Esse Quam Videre
>> To Be, rather than to Seem
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
>
> --
> Brett Porter
> Blog: http://blogs.exist.com/bporter/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>




-- 
Esse Quam Videre
To Be, rather than to Seem

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


Re: Problem moving property file around

Posted by Brett Porter <br...@gmail.com>.
Is it possible to process the file into the target directory and use
it from there so the original (which is the defaults) can remain
unmodified?

- Brett

2008/10/8 Jon Strayer <jo...@strayer.org>:
> Well, the configuration I have for the scm plugin didn't work:
> <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-scm-plugin</artifactId>
>        <configuration>
>                <connectionType>developerConnection</connectionType>
>        </configuration>
>        <executions>
>                <execution>
>                <id>tag</id>
>                        <goals>
>                        <goal>tag</goal>
>                        </goals>
>                <configuration>
>                        <property name="excludes"
> value="src/com/fusionsoftllc/achilles/client/BuildProperties.properties"/>
>                </configuration>
>                </execution>
>        </executions>
> </plugin>
>
> It still tried to tag the file.
>
> I want it in CVS because the default value (used in Eclipse builds) is
> there.  The surprise I'm worried about is someone changing the file
> and not seeing the change.
>
> On Mon, Oct 6, 2008 at 8:08 PM, Brett Porter <br...@gmail.com> wrote:
>> I don't quite get it... it sounds like you don't want the properties
>> file in CVS at all, so the solution you have at the end is fine. What
>> are the surprises you are concerned about?
>>
>> - Brett
>>
>> 2008/10/7 Jon Strayer <jo...@strayer.org>:
>>> Hang with me, this takes a while to explain.  :-)
>>>
>>> I'm trying to add a build number to a footer panel in GWT.
>>>
>>> CruiseControl passes the build label to Maven.
>>> Maven copies a properties file while performing a substitution which
>>> gives me a properties file in target/classes with the correct values
>>> in it.
>>> To get GWT to build the properties file into the application I have to
>>> copy the file from target/classes to the source tree (I use an ant
>>> task for that).
>>> For Eclipse builds to build correctly I need a default properties file
>>> in the source tree.
>>>
>>> The problem is that CVS won't tag the build because now the properties
>>> file in the source tree is not in CVS.  I tried many ways to make a
>>> backup copy of the file in the source tree and copy it back, but I've
>>> never been able to find a phase to tie different copying calls to that
>>> only executes once.
>>>
>>> So, in short, what I need is a way to
>>>    1. backup a properties file in the source directory before
>>> resources are processed.
>>>    2. copy a processed properties file from target/classes to the
>>> source tree after resources are processed.
>>>    3. copy the backup of the properties file back to the source tree
>>> before scm:tag.
>>>
>>> Right now I'm trying to work around the problem by having scm:tag not
>>> tag that file, but that could lead to surprises.
>>>
>>> --
>>> Esse Quam Videre
>>> To Be, rather than to Seem
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Brett Porter
>> Blog: http://blogs.exist.com/bporter/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
>
>
> --
> Esse Quam Videre
> To Be, rather than to Seem
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

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


Re: Problem moving property file around

Posted by Jon Strayer <jo...@strayer.org>.
On Tue, Oct 7, 2008 at 9:36 AM, Jon Strayer <jo...@strayer.org> wrote:
> Well, the configuration I have for the scm plugin didn't work:
> <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-scm-plugin</artifactId>
>        <configuration>
>                <connectionType>developerConnection</connectionType>
>        </configuration>
>        <executions>
>                <execution>
>                <id>tag</id>
>                        <goals>
>                        <goal>tag</goal>
>                        </goals>
>                <configuration>
>                        <property name="excludes"
> value="src/com/fusionsoftllc/achilles/client/BuildProperties.properties"/>
>                </configuration>
>                </execution>
>        </executions>
> </plugin>
>
> It still tried to tag the file.
>
> I want it in CVS because the default value (used in Eclipse builds) is
> there.  The surprise I'm worried about is someone changing the file
> and not seeing the change.
>
> On Mon, Oct 6, 2008 at 8:08 PM, Brett Porter <br...@gmail.com> wrote:
>> I don't quite get it... it sounds like you don't want the properties
>> file in CVS at all, so the solution you have at the end is fine. What
>> are the surprises you are concerned about?
>>
>> - Brett
>>
>> 2008/10/7 Jon Strayer <jo...@strayer.org>:
>>> Hang with me, this takes a while to explain.  :-)
>>>
>>> I'm trying to add a build number to a footer panel in GWT.
>>>
>>> CruiseControl passes the build label to Maven.
>>> Maven copies a properties file while performing a substitution which
>>> gives me a properties file in target/classes with the correct values
>>> in it.
>>> To get GWT to build the properties file into the application I have to
>>> copy the file from target/classes to the source tree (I use an ant
>>> task for that).
>>> For Eclipse builds to build correctly I need a default properties file
>>> in the source tree.
>>>
>>> The problem is that CVS won't tag the build because now the properties
>>> file in the source tree is not in CVS.  I tried many ways to make a
>>> backup copy of the file in the source tree and copy it back, but I've
>>> never been able to find a phase to tie different copying calls to that
>>> only executes once.
>>>
>>> So, in short, what I need is a way to
>>>    1. backup a properties file in the source directory before
>>> resources are processed.
>>>    2. copy a processed properties file from target/classes to the
>>> source tree after resources are processed.
>>>    3. copy the backup of the properties file back to the source tree
>>> before scm:tag.
>>>
>>> Right now I'm trying to work around the problem by having scm:tag not
>>> tag that file, but that could lead to surprises.
>>>
>>> --
>>> Esse Quam Videre
>>> To Be, rather than to Seem
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Brett Porter
>> Blog: http://blogs.exist.com/bporter/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
>
>
> --
> Esse Quam Videre
> To Be, rather than to Seem
>


Does anyone understand why the above pom fragment doesn't keep scm:tag
from tagging the properties file?

-- 
Esse Quam Videre
To Be, rather than to Seem

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


Re: Problem moving property file around

Posted by Jon Strayer <jo...@strayer.org>.
Well, the configuration I have for the scm plugin didn't work:
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-scm-plugin</artifactId>
	<configuration>
		<connectionType>developerConnection</connectionType>
	</configuration>
	<executions>
		<execution>
		<id>tag</id>
			<goals>
			<goal>tag</goal>
			</goals>
		<configuration>
			<property name="excludes"
value="src/com/fusionsoftllc/achilles/client/BuildProperties.properties"/>
		</configuration>
		</execution>
	</executions>
</plugin>

It still tried to tag the file.

I want it in CVS because the default value (used in Eclipse builds) is
there.  The surprise I'm worried about is someone changing the file
and not seeing the change.

On Mon, Oct 6, 2008 at 8:08 PM, Brett Porter <br...@gmail.com> wrote:
> I don't quite get it... it sounds like you don't want the properties
> file in CVS at all, so the solution you have at the end is fine. What
> are the surprises you are concerned about?
>
> - Brett
>
> 2008/10/7 Jon Strayer <jo...@strayer.org>:
>> Hang with me, this takes a while to explain.  :-)
>>
>> I'm trying to add a build number to a footer panel in GWT.
>>
>> CruiseControl passes the build label to Maven.
>> Maven copies a properties file while performing a substitution which
>> gives me a properties file in target/classes with the correct values
>> in it.
>> To get GWT to build the properties file into the application I have to
>> copy the file from target/classes to the source tree (I use an ant
>> task for that).
>> For Eclipse builds to build correctly I need a default properties file
>> in the source tree.
>>
>> The problem is that CVS won't tag the build because now the properties
>> file in the source tree is not in CVS.  I tried many ways to make a
>> backup copy of the file in the source tree and copy it back, but I've
>> never been able to find a phase to tie different copying calls to that
>> only executes once.
>>
>> So, in short, what I need is a way to
>>    1. backup a properties file in the source directory before
>> resources are processed.
>>    2. copy a processed properties file from target/classes to the
>> source tree after resources are processed.
>>    3. copy the backup of the properties file back to the source tree
>> before scm:tag.
>>
>> Right now I'm trying to work around the problem by having scm:tag not
>> tag that file, but that could lead to surprises.
>>
>> --
>> Esse Quam Videre
>> To Be, rather than to Seem
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
>
> --
> Brett Porter
> Blog: http://blogs.exist.com/bporter/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>




-- 
Esse Quam Videre
To Be, rather than to Seem

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


Re: Problem moving property file around

Posted by Brett Porter <br...@gmail.com>.
I don't quite get it... it sounds like you don't want the properties
file in CVS at all, so the solution you have at the end is fine. What
are the surprises you are concerned about?

- Brett

2008/10/7 Jon Strayer <jo...@strayer.org>:
> Hang with me, this takes a while to explain.  :-)
>
> I'm trying to add a build number to a footer panel in GWT.
>
> CruiseControl passes the build label to Maven.
> Maven copies a properties file while performing a substitution which
> gives me a properties file in target/classes with the correct values
> in it.
> To get GWT to build the properties file into the application I have to
> copy the file from target/classes to the source tree (I use an ant
> task for that).
> For Eclipse builds to build correctly I need a default properties file
> in the source tree.
>
> The problem is that CVS won't tag the build because now the properties
> file in the source tree is not in CVS.  I tried many ways to make a
> backup copy of the file in the source tree and copy it back, but I've
> never been able to find a phase to tie different copying calls to that
> only executes once.
>
> So, in short, what I need is a way to
>    1. backup a properties file in the source directory before
> resources are processed.
>    2. copy a processed properties file from target/classes to the
> source tree after resources are processed.
>    3. copy the backup of the properties file back to the source tree
> before scm:tag.
>
> Right now I'm trying to work around the problem by having scm:tag not
> tag that file, but that could lead to surprises.
>
> --
> Esse Quam Videre
> To Be, rather than to Seem
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

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