You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by William Simons <wi...@childrens.harvard.edu> on 2006/04/13 19:37:19 UTC

Maven 2.0.4 problem with properties

Hi all,

I just upgraded from 2.0.3 to 2.0.4 and my build broke.  My unit tests rely
on a system property being set.  The property was properly set in 2.0.3 and
is not properly set in 2.0.4.  Has there been a change in the way properties
work that I missed?

Here is the surefire plugin configuration that I'm using:
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <forkMode>pertest</forkMode>
                    <childDelegation>false</childDelegation>
                    <excludes>
                        <exclude>**/*TestCase.java</exclude>
                    </excludes>
                    <systemProperties>
                        <property>
                            <name>maven.build.dir</name>
                            <value>${build.directory}</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>

I changed my tests to output the value of the maven.build.dir property that
I'm setting and in 2.0.4 they output "${build.directory}". In 2.0.3 they
output (correctly) "target".

Any ideas?

Thanks,
Bill Simons



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


Re: Maven 2.0.4 problem with properties

Posted by William Simons <wi...@childrens.harvard.edu>.
Thanks Dan.  Looks like I have to roll back to 2.0.3 and wait for 2.0.5 to
be released.


On 4/13/06 2:24 PM, "dan tran" <da...@gmail.com> wrote:

> http://jira.codehaus.org/browse/MNG-2201
> 
> On 4/13/06, William Simons <wi...@childrens.harvard.edu> wrote:
>> 
>> No luck.
>> 
>> I've tried:
>> ${build.directory}
>> ${project.build.directory}
>> ${pom.build.directory}
>> ${project.build.outputDirectory}
>> ${pom.build.outputDirectory}
>> 
>> All of them properly resolve in version 2.0.3 and none of them resolve in
>> 2.0.4.
>> 
>> Maybe the surefire plugin changed from 2.0.3 to 2.0.4?
>> 
>> Bill
>> 
>> On 4/13/06 2:02 PM, "ian.d.stewart@jpmchase.com"
>> <ia...@jpmchase.com> wrote:
>> 
>>> After looking at the project descriptor documentation[1], it looks like
>> the
>>> value that you want is ${project.build.outputDirectory}
>>> 
>>> 
>>> HTH,
>>> Ian
>>> 
>>> [1] http://maven.apache.org/ref/2.0.3-SNAPSHOT/maven-model/maven.html
>>> 
>>> It's better to be hated for who you are
>>> than loved for who you are not
>>> 
>>> Ian D. Stewart
>>> Appl Dev Analyst-Advisory, DCS Automation
>>> JPMorganChase Global Technology Infrastructure
>>> Phone: (614) 244-2564
>>> Pager: (888) 260-0078
>>> 
>>> 
>>> 
>>>                       "William Simons"
>>>                       <william.simons@childrens.h        To:
>>> users@maven.apache.org
>>>                       arvard.edu>                        cc:
>>>                                                          Subject:  Maven
>> 2.0.4
>>> problem with properties
>>>                       04/13/2006 01:37 PM
>>>                       Please respond to "Maven
>>>                       Users List"
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Hi all,
>>> 
>>> I just upgraded from 2.0.3 to 2.0.4 and my build broke.  My unit tests
>> rely
>>> on a system property being set.  The property was properly set in 2.0.3and
>>> is not properly set in 2.0.4.  Has there been a change in the way
>>> properties
>>> work that I missed?
>>> 
>>> Here is the surefire plugin configuration that I'm using:
>>>             <plugin>
>>>                 <groupId>org.apache.maven.plugins</groupId>
>>>                 <artifactId>maven-surefire-plugin</artifactId>
>>>                 <configuration>
>>>                     <forkMode>pertest</forkMode>
>>>                     <childDelegation>false</childDelegation>
>>>                     <excludes>
>>>                         <exclude>**/*TestCase.java</exclude>
>>>                     </excludes>
>>>                     <systemProperties>
>>>                         <property>
>>>                             <name>maven.build.dir</name>
>>>                             <value>${build.directory}</value>
>>>                         </property>
>>>                     </systemProperties>
>>>                 </configuration>
>>>             </plugin>
>>> 
>>> I changed my tests to output the value of the maven.build.dir property
>> that
>>> I'm setting and in 2.0.4 they output "${build.directory}". In 2.0.3 they
>>> output (correctly) "target".
>>> 
>>> Any ideas?
>>> 
>>> Thanks,
>>> Bill Simons
>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> 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
>>> 
>>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> 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: Maven 2.0.4 problem with properties

Posted by dan tran <da...@gmail.com>.
http://jira.codehaus.org/browse/MNG-2201

On 4/13/06, William Simons <wi...@childrens.harvard.edu> wrote:
>
> No luck.
>
> I've tried:
> ${build.directory}
> ${project.build.directory}
> ${pom.build.directory}
> ${project.build.outputDirectory}
> ${pom.build.outputDirectory}
>
> All of them properly resolve in version 2.0.3 and none of them resolve in
> 2.0.4.
>
> Maybe the surefire plugin changed from 2.0.3 to 2.0.4?
>
> Bill
>
> On 4/13/06 2:02 PM, "ian.d.stewart@jpmchase.com"
> <ia...@jpmchase.com> wrote:
>
> > After looking at the project descriptor documentation[1], it looks like
> the
> > value that you want is ${project.build.outputDirectory}
> >
> >
> > HTH,
> > Ian
> >
> > [1] http://maven.apache.org/ref/2.0.3-SNAPSHOT/maven-model/maven.html
> >
> > It's better to be hated for who you are
> > than loved for who you are not
> >
> > Ian D. Stewart
> > Appl Dev Analyst-Advisory, DCS Automation
> > JPMorganChase Global Technology Infrastructure
> > Phone: (614) 244-2564
> > Pager: (888) 260-0078
> >
> >
> >
> >                       "William Simons"
> >                       <william.simons@childrens.h        To:
> > users@maven.apache.org
> >                       arvard.edu>                        cc:
> >                                                          Subject:  Maven
> 2.0.4
> > problem with properties
> >                       04/13/2006 01:37 PM
> >                       Please respond to "Maven
> >                       Users List"
> >
> >
> >
> >
> >
> > Hi all,
> >
> > I just upgraded from 2.0.3 to 2.0.4 and my build broke.  My unit tests
> rely
> > on a system property being set.  The property was properly set in 2.0.3and
> > is not properly set in 2.0.4.  Has there been a change in the way
> > properties
> > work that I missed?
> >
> > Here is the surefire plugin configuration that I'm using:
> >             <plugin>
> >                 <groupId>org.apache.maven.plugins</groupId>
> >                 <artifactId>maven-surefire-plugin</artifactId>
> >                 <configuration>
> >                     <forkMode>pertest</forkMode>
> >                     <childDelegation>false</childDelegation>
> >                     <excludes>
> >                         <exclude>**/*TestCase.java</exclude>
> >                     </excludes>
> >                     <systemProperties>
> >                         <property>
> >                             <name>maven.build.dir</name>
> >                             <value>${build.directory}</value>
> >                         </property>
> >                     </systemProperties>
> >                 </configuration>
> >             </plugin>
> >
> > I changed my tests to output the value of the maven.build.dir property
> that
> > I'm setting and in 2.0.4 they output "${build.directory}". In 2.0.3 they
> > output (correctly) "target".
> >
> > Any ideas?
> >
> > Thanks,
> > Bill Simons
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven 2.0.4 problem with properties

Posted by William Simons <wi...@childrens.harvard.edu>.
No luck.

I've tried:
${build.directory}
${project.build.directory}
${pom.build.directory}
${project.build.outputDirectory}
${pom.build.outputDirectory}

All of them properly resolve in version 2.0.3 and none of them resolve in
2.0.4.

Maybe the surefire plugin changed from 2.0.3 to 2.0.4?

Bill

On 4/13/06 2:02 PM, "ian.d.stewart@jpmchase.com"
<ia...@jpmchase.com> wrote:

> After looking at the project descriptor documentation[1], it looks like the
> value that you want is ${project.build.outputDirectory}
> 
> 
> HTH,
> Ian
> 
> [1] http://maven.apache.org/ref/2.0.3-SNAPSHOT/maven-model/maven.html
> 
> It's better to be hated for who you are
> than loved for who you are not
> 
> Ian D. Stewart
> Appl Dev Analyst-Advisory, DCS Automation
> JPMorganChase Global Technology Infrastructure
> Phone: (614) 244-2564
> Pager: (888) 260-0078
> 
> 
>                  
>                       "William Simons"
>                       <william.simons@childrens.h        To:
> users@maven.apache.org
>                       arvard.edu>                        cc:
>                                                          Subject:  Maven 2.0.4
> problem with properties
>                       04/13/2006 01:37 PM
>                       Please respond to "Maven
>                       Users List"
>                  
> 
> 
> 
> 
> Hi all,
> 
> I just upgraded from 2.0.3 to 2.0.4 and my build broke.  My unit tests rely
> on a system property being set.  The property was properly set in 2.0.3 and
> is not properly set in 2.0.4.  Has there been a change in the way
> properties
> work that I missed?
> 
> Here is the surefire plugin configuration that I'm using:
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-surefire-plugin</artifactId>
>                 <configuration>
>                     <forkMode>pertest</forkMode>
>                     <childDelegation>false</childDelegation>
>                     <excludes>
>                         <exclude>**/*TestCase.java</exclude>
>                     </excludes>
>                     <systemProperties>
>                         <property>
>                             <name>maven.build.dir</name>
>                             <value>${build.directory}</value>
>                         </property>
>                     </systemProperties>
>                 </configuration>
>             </plugin>
> 
> I changed my tests to output the value of the maven.build.dir property that
> I'm setting and in 2.0.4 they output "${build.directory}". In 2.0.3 they
> output (correctly) "target".
> 
> Any ideas?
> 
> Thanks,
> Bill Simons
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 



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


Re: Maven 2.0.4 problem with properties

Posted by ia...@jpmchase.com.
After looking at the project descriptor documentation[1], it looks like the
value that you want is ${project.build.outputDirectory}


HTH,
Ian

[1] http://maven.apache.org/ref/2.0.3-SNAPSHOT/maven-model/maven.html

It's better to be hated for who you are
than loved for who you are not

Ian D. Stewart
Appl Dev Analyst-Advisory, DCS Automation
JPMorganChase Global Technology Infrastructure
Phone: (614) 244-2564
Pager: (888) 260-0078


                                                                                                                                                 
                      "William Simons"                                                                                                           
                      <william.simons@childrens.h        To:       users@maven.apache.org                                                        
                      arvard.edu>                        cc:                                                                                     
                                                         Subject:  Maven 2.0.4 problem with properties                                           
                      04/13/2006 01:37 PM                                                                                                        
                      Please respond to "Maven                                                                                                   
                      Users List"                                                                                                                
                                                                                                                                                 




Hi all,

I just upgraded from 2.0.3 to 2.0.4 and my build broke.  My unit tests rely
on a system property being set.  The property was properly set in 2.0.3 and
is not properly set in 2.0.4.  Has there been a change in the way
properties
work that I missed?

Here is the surefire plugin configuration that I'm using:
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <forkMode>pertest</forkMode>
                    <childDelegation>false</childDelegation>
                    <excludes>
                        <exclude>**/*TestCase.java</exclude>
                    </excludes>
                    <systemProperties>
                        <property>
                            <name>maven.build.dir</name>
                            <value>${build.directory}</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>

I changed my tests to output the value of the maven.build.dir property that
I'm setting and in 2.0.4 they output "${build.directory}". In 2.0.3 they
output (correctly) "target".

Any ideas?

Thanks,
Bill Simons



---------------------------------------------------------------------
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