My understanding of maven 2 is that build.properties and project.properties are no longer required or even read. Am I mistaken?

Please note that there is a top level project (nicweb) with several second-tier modules that actually contain the property key references. I assume that, if I run the "mvn install" from the top-level, that all modules will share the read properties.

There are several properties (which I probably should have referred to as 'application' properties, but I don't think it matters) in my app. The one I am using for testing is:

>> nicweb.ufs.application.properties.location = /etc/jboss/iaportal/nicweb/nicweb-ufs-application.properties

Maybe I am misunderstanding the concept of profiles, and what the <properties> tag actual represents. I wish there were more real-life examples in the documentation. (Maybe I just haven't found it??)

Thanks,
Mike

Ray Ward wrote:

I think the precedence for properties is:
command line
~/build.properties
<project> build.properties
<project> project.properties
<parent_project> build.properties
<parent_project> project.properties

So I have no idea why your (4) didn't work.  What is the value name?


On 2/10/06, Mike Darretta <[EMAIL PROTECTED]> wrote:

I'm new to maven2 and can't seem to figure out how to replace my old
build.properties.

I've done *all* of the following:

(1) Created ~/.m2/settings.xml:

<settings>
 <profiles>
   <profile>
     <id>project_name</id>
     <activation>
       <activeByDefault/>
     </activation>
     <properties>
       <system.property.name>
         system_property_value
       </system.property.name>
     </properties>
   </profile>
 </profiles>
</settings>

(2) Createed ${PROJECT_HOME}/profiles.xml (with the assumption that this
is used for all modules as well):

<profilesXml>
 <profiles>
   <profile>
     <id>project_name</id>
     <activation>
       <activeByDefault/>
     </activation>
     <properties>
       <system.property.name>
         system_property_value
       </system.property.name>
     </properties>
   </profile>
 </profiles>
</profilesXml>

(3) Added filters to top-level pom.xml, and referenced my old
build.properties file. In this instance, *some* of my resources had the
properties properly inserted, but not the ones that count. For example,
web.xml was filtered within the target/classes directory, but *not*
within the target/${PROJECT_NAME}/WEB-INF directory, nor the actual
repository version.

(4) Tried CLI maven -Dsystem.property.name=system_property_value clean
install - nothing...

(5) Of course, all of my property keys are written as
${system.property.name} within my module resoures.

This *has* to be an easy task, but I just am not getting it! Can anyone
provide some assistance, maybe in the form of a good example file(s)?

By the way, I don't want the key/value pairs defined in my pom.xml
(unless they are referencing the value as a variable).

Thanks.
Mike


--

Mike Darretta
Computer Sciences Corporation (CSC)
Sr. Software Engineer
(o) 831.656.4324
(c) 209.814.2774
[EMAIL PROTECTED]

------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use
of e-mail for such purpose.
------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--

Mike Darretta
Computer Sciences Corporation (CSC)
Sr. Software Engineer
(o) 831.656.4324
(c) 209.814.2774
[EMAIL PROTECTED]

------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.
------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to