You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jochen Wiedmann <jo...@gmail.com> on 2007/11/21 09:02:47 UTC

Using dependency versions in a property file

Hi,

it hit me again: I have a property file, which contains version number
of dependencies (in order to build the classpath, depending on the JDK
version). That property file is maintained manually, of course an ugly
thing. But I have no idea how to create it automatically.

Any suggestions?

Thanks,

Jochen

-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

    -- (Terry Pratchett, Thief of Time)

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


Re: Using dependency versions in a property file

Posted by Juven Xu <ju...@gmail.com>.
First, if the classpath you want to build is used in Eclipse or IntellJ,
maven's plugin can help you generate it.
Or if you really want to generate the file which format you provided, you
can write a small util program parsing pom file and generate the file you
want, by dom4j, for instance.
Or you may want to develop a maven plugin for this usage, so you can run it
automatically.

Juven


On Nov 21, 2007 4:44 PM, Jochen Wiedmann <jo...@gmail.com> wrote:

> On Nov 21, 2007 9:32 AM, Juven Xu <ju...@gmail.com> wrote:
>
> > You want to create pom file automatically? or just want to create
> classpath
> > file automatically?
>
> I want to create a file like
>
>    dependency.1=xercesImpl-2.7.1.jar
>    dependency.2=xalan-2.4.0.jar
>    ...
>
>
>
>
> --
> Look, that's why there's rules, understand? So that you think before
> you break 'em.
>
>    -- (Terry Pratchett, Thief of Time)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Using dependency versions in a property file

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Nov 21, 2007 9:32 AM, Juven Xu <ju...@gmail.com> wrote:

> You want to create pom file automatically? or just want to create classpath
> file automatically?

I want to create a file like

    dependency.1=xercesImpl-2.7.1.jar
    dependency.2=xalan-2.4.0.jar
    ...




-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

    -- (Terry Pratchett, Thief of Time)

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


Re: Using dependency versions in a property file

Posted by Juven Xu <ju...@gmail.com>.
You want to create pom file automatically? or just want to create classpath
file automatically?
If in latter case, Eclipse for instance, use command "mvn eclipse:clean
eclipse:eclipse" to generate your eclipse classpath file.

Juven

On Nov 21, 2007 4:24 PM, Jochen Wiedmann <jo...@gmail.com> wrote:

> On Nov 21, 2007 9:18 AM, Juven Xu <ju...@gmail.com> wrote:
>
> > I don't quite understand your situation, why not config version number
> in
> > pom file and use Maven-IDE plugin to generate classpath file?
>
> The version number *is* in the pom file: It is part of the dependency
> specification.
>
> What is the Maven-IDE plugin?
>
>
> Thanks,
>
> Jochen
>
>
>
> --
> Look, that's why there's rules, understand? So that you think before
> you break 'em.
>
>    -- (Terry Pratchett, Thief of Time)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Using dependency versions in a property file

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Nov 21, 2007 9:18 AM, Juven Xu <ju...@gmail.com> wrote:

> I don't quite understand your situation, why not config version number in
> pom file and use Maven-IDE plugin to generate classpath file?

The version number *is* in the pom file: It is part of the dependency
specification.

What is the Maven-IDE plugin?


Thanks,

Jochen



-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

    -- (Terry Pratchett, Thief of Time)

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


Re: Using dependency versions in a property file

Posted by Juven Xu <ju...@gmail.com>.
I don't quite understand your situation, why not config version number in
pom file and use Maven-IDE plugin to generate classpath file?

On Nov 21, 2007 4:02 PM, Jochen Wiedmann <jo...@gmail.com> wrote:

> Hi,
>
> it hit me again: I have a property file, which contains version number
> of dependencies (in order to build the classpath, depending on the JDK
> version). That property file is maintained manually, of course an ugly
> thing. But I have no idea how to create it automatically.
>
> Any suggestions?
>
> Thanks,
>
> Jochen
>
> --
> Look, that's why there's rules, understand? So that you think before
> you break 'em.
>
>    -- (Terry Pratchett, Thief of Time)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>