You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by Emmanuel Venisse <em...@venisse.net> on 2004/07/01 16:15:46 UTC

Re: cvs commit:maven-components/maven-core/src/test/resources/projects/base-directory-alignmentproject-which-needs-directory-alignment.xml

----- Original Message ----- 
From: "Jason van Zyl" <jv...@maven.org>
To: "Maven 2 Developers List" <m2...@maven.apache.org>
Sent: Thursday, July 01, 2004 3:40 PM
Subject: Re: cvs
commit:maven-components/maven-core/src/test/resources/projects/base-director
y-alignmentproject-which-needs-directory-alignment.xml


> On Thu, 2004-07-01 at 04:14, Emmanuel Venisse wrote:
> > >            Maven maven = new Maven( mavenHome, classWorld );
> > >   +
> > >   +        Properties p = new Properties();
> > >   +
> > >   +        p.load( new FileInputStream( new File( System.getProperty(
> > "user.home" ), "build.properties" ) ) );
> > >   +
> > >   +        String localRepository = p.getProperty(
> > MavenConstants.MAVEN_REPO_LOCAL );
> > >   +
> > >   +        if ( localRepository == null )
> > >   +        {
> > >   +            throw new Exception( "Missing 'maven.repo.local' from
> > ~/build.properties." );
> > >   +        }
> >
> > I think it's better to set a default value
($user.home/.maven/repository) if
> > maven repo local isn't define in build.properties.
> >
> > Jason, what do you think about to use a build.properties file under
> > $user.home/.maven/ instead of $user.home?
>
> The current plan is to have a file called maven.properties and it can be
> located in ~/.maven. The other properties files will disappear as
> anything that needs to be configured will be done in the POM. This is
> another step in making the things that maven2 uses not interfere with
> anything from maven1. Any sort of behaviour you want to state for a
> project, or a group or the site will be done with a POM but the user can
> have some values interpolated into the POM by stating values in a
> maven.properties.
>
> Maybe we don't even need any properties files ... we could use the POM
> inheritance mechanism everywhere even if a user has to make a small one
> in a project directory to get the results they want ...

Personnaly, I think it's necessary to have some specific properties by
project by user in some case. It's the case for define an install directory
of an app server for example, that is specific to the user/project
environment. A user can use a specific installation of an app server by
project, so we can't define it in maven.properties and we can't define it in
pom because it's specific to user environment.

>
> > Emmanuel
>
> -- 
> jvz.
>
> Jason van Zyl
> jason@maven.org
> http://maven.apache.org
>
> happiness is like a butterfly: the more you chase it, the more it will
> elude you, but if you turn your attention to other things, it will come
> and sit softly on your shoulder ...
>
>  -- Thoreau
>
>


Re: cvscommit:maven-components/maven-core/src/test/resources/projects/base-directory-alignmentproject-which-needs-directory-alignment.xml

Posted by Emmanuel Venisse <em...@venisse.net>.
----- Original Message ----- 
From: "Jason van Zyl" <jv...@maven.org>
To: "Maven 2 Developers List" <m2...@maven.apache.org>
Sent: Thursday, July 01, 2004 5:24 PM
Subject: Re:
cvscommit:maven-components/maven-core/src/test/resources/projects/base-direc
tory-alignmentproject-which-needs-directory-alignment.xml


> On Thu, 2004-07-01 at 10:16, Jason van Zyl wrote:
>
> > Right, the maven.properties as I am saying it should be used is only for
> > users. Plugins, projects, groups and sites will strictly use the POM for
> > configuration and the inheritance mechanism will take care of the
> > cascading of values, namely properties defined in the POMs.
>
> What I mean by the notion of maven.properties replacing build.properties
> is that a maven.properties file could be found in the user's home
> directory somewhere or within the project. Same thing as we have in m1
> using build.properties.

Excellent, because a user can have a different property setting for
different project.

>
> -- 
> jvz.
>
> Jason van Zyl
> jason@maven.org
> http://maven.apache.org
>
> happiness is like a butterfly: the more you chase it, the more it will
> elude you, but if you turn your attention to other things, it will come
> and sit softly on your shoulder ...
>
>  -- Thoreau
>
>


Re: cvs commit:maven-components/maven-core/src/test/resources/projects/base-directory-alignmentproject-which-needs-directory-alignment.xml

Posted by Jason van Zyl <jv...@maven.org>.
On Thu, 2004-07-01 at 10:16, Jason van Zyl wrote:

> Right, the maven.properties as I am saying it should be used is only for
> users. Plugins, projects, groups and sites will strictly use the POM for
> configuration and the inheritance mechanism will take care of the
> cascading of values, namely properties defined in the POMs.

What I mean by the notion of maven.properties replacing build.properties
is that a maven.properties file could be found in the user's home
directory somewhere or within the project. Same thing as we have in m1
using build.properties.

-- 
jvz.

Jason van Zyl
jason@maven.org
http://maven.apache.org

happiness is like a butterfly: the more you chase it, the more it will
elude you, but if you turn your attention to other things, it will come
and sit softly on your shoulder ...

 -- Thoreau 


Re: cvs commit:maven-components/maven-core/src/test/resources/projects/base-directory-alignmentproject-which-needs-directory-alignment.xml

Posted by Jason van Zyl <jv...@maven.org>.
On Thu, 2004-07-01 at 10:15, Emmanuel Venisse wrote:

> Personnaly, I think it's necessary to have some specific properties by
> project by user in some case. 

Definitely, this is what maven.properties would be for. The
maven.properties file would effectively be what the build.properties
file is in maven1.

Any defaults the project wanted to set would be done in the POM.

> It's the case for define an install directory
> of an app server for example, that is specific to the user/project
> environment. A user can use a specific installation of an app server by
> project, so we can't define it in maven.properties and we can't define it in
> pom because it's specific to user environment.

Right, the maven.properties as I am saying it should be used is only for
users. Plugins, projects, groups and sites will strictly use the POM for
configuration and the inheritance mechanism will take care of the
cascading of values, namely properties defined in the POMs.

> 
> >
> > > Emmanuel
> >
> > -- 
> > jvz.
> >
> > Jason van Zyl
> > jason@maven.org
> > http://maven.apache.org
> >
> > happiness is like a butterfly: the more you chase it, the more it will
> > elude you, but if you turn your attention to other things, it will come
> > and sit softly on your shoulder ...
> >
> >  -- Thoreau
> >
> >

-- 
jvz.

Jason van Zyl
jason@maven.org
http://maven.apache.org

happiness is like a butterfly: the more you chase it, the more it will
elude you, but if you turn your attention to other things, it will come
and sit softly on your shoulder ...

 -- Thoreau