You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Chang <th...@yahoo.de> on 2007/12/28 11:42:36 UTC

How to use the ?

Hi all,
   
  Normally the <dependency/> in the "pom.xml" looks as follow:
  ...
  <dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>3.8.1</version>
  </dependency>
  ...
   
  Now what I want to do is: I don't want to set the dependency version here but from a property file on the server maschine. And the "pom.xml" by local should look as follow:
  ...
  <extend>...</extend>
  ...
  <dependency>
  <groupId>${my.unit.group}</groupId>
  <artifactId>${my.unit.artifactId}</artifactId>
  <version>${my.junit.version}</version>
  </properties>
  </dependency>
  ...
   
  The ${...} should be define in the property file. Everytime if I run maven command to download the dependencies it will check the version in the propoty file first and download it from the server.
   
  Has someone such experience?
   
  Regards
   
  Thomas

       
---------------------------------
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem  neuen Yahoo! Mail. 

Re: A question about in in pom.xml

Posted by Wayne Fay <wa...@gmail.com>.
I'd definitely call this a Maven anti-pattern. You're free to do this,
but its a really bad idea in general.

http://en.wikipedia.org/wiki/Anti-pattern

Wayne

On 1/2/08, Erez Nahir <er...@gmail.com> wrote:
> But, keep in mind that this may impact the reproducibility of your build
> because your settings.xml is not under version control system (I assume).
>
> Erez.
>
> On Jan 2, 2008 2:33 PM, Heinrich Nirschl <he...@gmail.com> wrote:
>
> > On Jan 2, 2008 12:06 PM, Thomas Chang <th...@yahoo.de> wrote:
> > > Now I do as follow in the "settings.xml":
> > >
> > >   <profiles>
> > >   <profile>
> > >   <properties>
> > >   <my.junit.version>3.8.1</my.junit.version>
> > >   </properties>
> > >   </profile>
> > >   </profiles>
> > >
> > >   And it runs successful when I run "mvn clean". But as I run "´mvn
> > compile" I got error as follow:
> > >
> > >   Downloading:
> > http://repo1.maven.org/maven2/junit/junit/{my.junit.version}/junit-<http://repo1.maven.org/maven2/junit/junit/%7Bmy.junit.version%7D/junit->
> > > {my.junit.version}.jar
> >
> > To reference the proerties you must use syntax like this:
> >
> > <version>${my.junit.version}</version>
> >
> >  ---------------------------------------------------------------------
> > 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: A question about in in pom.xml

Posted by Wayne Fay <wa...@gmail.com>.
I'd definitely call this a Maven anti-pattern. You're free to do this,
but its a really bad idea in general.

http://en.wikipedia.org/wiki/Anti-pattern

Wayne

On 1/2/08, Erez Nahir <er...@gmail.com> wrote:
> But, keep in mind that this may impact the reproducibility of your build
> because your settings.xml is not under version control system (I assume).
>
> Erez.
>
> On Jan 2, 2008 2:33 PM, Heinrich Nirschl <he...@gmail.com> wrote:
>
> > On Jan 2, 2008 12:06 PM, Thomas Chang <th...@yahoo.de> wrote:
> > > Now I do as follow in the "settings.xml":
> > >
> > >   <profiles>
> > >   <profile>
> > >   <properties>
> > >   <my.junit.version>3.8.1</my.junit.version>
> > >   </properties>
> > >   </profile>
> > >   </profiles>
> > >
> > >   And it runs successful when I run "mvn clean". But as I run "´mvn
> > compile" I got error as follow:
> > >
> > >   Downloading:
> > http://repo1.maven.org/maven2/junit/junit/{my.junit.version}/junit-<http://repo1.maven.org/maven2/junit/junit/%7Bmy.junit.version%7D/junit->
> > > {my.junit.version}.jar
> >
> > To reference the proerties you must use syntax like this:
> >
> > <version>${my.junit.version}</version>
> >
> >  ---------------------------------------------------------------------
> > 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: A question about in in pom.xml

Posted by Erez Nahir <er...@gmail.com>.
But, keep in mind that this may impact the reproducibility of your build
because your settings.xml is not under version control system (I assume).

Erez.

On Jan 2, 2008 2:33 PM, Heinrich Nirschl <he...@gmail.com> wrote:

> On Jan 2, 2008 12:06 PM, Thomas Chang <th...@yahoo.de> wrote:
> > Now I do as follow in the "settings.xml":
> >
> >   <profiles>
> >   <profile>
> >   <properties>
> >   <my.junit.version>3.8.1</my.junit.version>
> >   </properties>
> >   </profile>
> >   </profiles>
> >
> >   And it runs successful when I run "mvn clean". But as I run "´mvn
> compile" I got error as follow:
> >
> >   Downloading:
> http://repo1.maven.org/maven2/junit/junit/{my.junit.version}/junit-<http://repo1.maven.org/maven2/junit/junit/%7Bmy.junit.version%7D/junit->
> > {my.junit.version}.jar
>
> To reference the proerties you must use syntax like this:
>
> <version>${my.junit.version}</version>
>
>  ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: A question about in in pom.xml

Posted by Heinrich Nirschl <he...@gmail.com>.
On Jan 2, 2008 12:06 PM, Thomas Chang <th...@yahoo.de> wrote:
> Now I do as follow in the "settings.xml":
>
>   <profiles>
>   <profile>
>   <properties>
>   <my.junit.version>3.8.1</my.junit.version>
>   </properties>
>   </profile>
>   </profiles>
>
>   And it runs successful when I run "mvn clean". But as I run "´mvn compile" I got error as follow:
>
>   Downloading: http://repo1.maven.org/maven2/junit/junit/{my.junit.version}/junit-
> {my.junit.version}.jar

To reference the proerties you must use syntax like this:

<version>${my.junit.version}</version>

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


Re: A question about in in pom.xml

Posted by Thomas Chang <th...@yahoo.de>.
Now I do as follow in the "settings.xml":
   
  <profiles>
  <profile>
  <properties>
  <my.junit.version>3.8.1</my.junit.version>
  </properties>
  </profile>
  </profiles>
   
  And it runs successful when I run "mvn clean". But as I run "´mvn compile" I got error as follow:
   
  Downloading: http://repo1.maven.org/maven2/junit/junit/{my.junit.version}/junit-
{my.junit.version}.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
  Missing:
----------
1) junit:junit:jar:{my.junit.version}
    Try downloading the file manually from the project website.
    Then, install it using the command:
      mvn install:install-file -DgroupId=junit -DartifactId=junit \
          -Dversion={my.junit.version} -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
    mvn deploy:deploy-file -DgroupId=junit -DartifactId=junit \
          -Dversion={my.junit.version} -Dpackaging=jar -Dfile=/path/to/file \
           -Durl=[url] -DrepositoryId=[id]
    Path to dependency:
        1) com.wei.chen.app:TestXml:jar:1.0-SNAPSHOT
        2) junit:junit:jar:{my.junit.version}
  ----------
1 required artifact is missing.
  for artifact:
  com.wei.chen.app:TestXml:jar:1.0-SNAPSHOT
  from the specified remote repositories:
  central (http://repo1.maven.org/maven2)
  
[INFO] ------------------------------------------------------------------------
   
   
   
  ************************
  My fault: the <properties> tag must be inside a profile and not at the
<settings> level.

Jeff


On Jan 2, 2008 11:41 AM, Thomas Chang <th...@yahoo.de> wrote:

> I think you mean:
>  <properties>
>        <my.junit.group>xxxx</my.junit.group>
> </properties>
>
>  Right?
>
>  I put this at the end of "settings.xml". But I got error as I run
 mvn
> command such as mvn clean:
>  E:\Projekte\TestXml>mvn clean
> Error reading settings.xml: Unrecognised tag: 'properties' (position:
> START_TAG
> seen ...</profiles>\r\n\r\n\t<properties>... @240:14)
>  Line:   240
>  Column: 14
>  E:\Projekte\TestXml>
>
>
>  ******************
>  In your settings.xml files, insert the following code under the
>  settings
> element:
>
>     <properties>
>        <my.junit.group>xxxx</libs_project_home>
>      </properties>
>
> Jeff
>
> On Jan 2, 2008 11:12 AM, Thomas Chang <th...@yahoo.de> wrote:
>
> > Thanks for the answer.
> >
> >  Could you give an example how to set these properties in the
>  settings.xml?
> > :-/
> >
> >
> >  ***************************
> >  Maven will do it automatically if you defines theses properties in
>  your
> > setting.xml files.
> >
> > Jeff
> >
> >
> > On Jan 2, 2008 10:53 AM, Thomas Chang <th...@yahoo.de>
 wrote:
> >
> > > Hi all,
> > >
> > >  Normally the <version> in <dependency> in pom.xml look as
 follow:
> > >  <dependency>
> > >  <groupId>junit</groupId>
> > >  <artifactId>junit</artifactId>
> > >  <version>3.8.1</version>
> > >  </dependency>
> > >
> > >  Now I want to do as follow:
> > >  <dependency>
> > >  <groupId>{my.junit.group}</groupId>
> > >  <artifactId>{my.junit.artifactId}</artifactId>
> > >  <version>{my.junit.version}</version>
> > >  </dependency>
> > >
> > >  The values of {my.junit.group} etc. will be defined in an other
> >  file. Now
> > > my question: How can I configure the pom.xml so that it knows to
>  read
> > > these values from the file where the {my.junit.group} etc.
 defined?
> > >
> > >  Regards
> > >
> > >  Thomas
>
>
>
> ---------------------------------
> Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und
 viel
> mehr bietet das  neue Yahoo! Mail.




       
---------------------------------
Beginnen Sie den Tag mit den neuesten Nachrichten. Machen Sie Yahoo! zu Ihrer Startseite!

Re: A question about in in pom.xml

Posted by Jeff MAURY <je...@jeffmaury.com>.
My fault: the <properties> tag must be inside a profile and not at the
<settings> level.

Jeff


On Jan 2, 2008 11:41 AM, Thomas Chang <th...@yahoo.de> wrote:

> I think you mean:
>  <properties>
>        <my.junit.group>xxxx</my.junit.group>
> </properties>
>
>  Right?
>
>  I put this at the end of "settings.xml". But I got error as I run mvn
> command such as mvn clean:
>  E:\Projekte\TestXml>mvn clean
> Error reading settings.xml: Unrecognised tag: 'properties' (position:
> START_TAG
> seen ...</profiles>\r\n\r\n\t<properties>... @240:14)
>  Line:   240
>  Column: 14
>  E:\Projekte\TestXml>
>
>
>  ******************
>  In your settings.xml files, insert the following code under the
>  settings
> element:
>
>     <properties>
>        <my.junit.group>xxxx</libs_project_home>
>      </properties>
>
> Jeff
>
> On Jan 2, 2008 11:12 AM, Thomas Chang <th...@yahoo.de> wrote:
>
> > Thanks for the answer.
> >
> >  Could you give an example how to set these properties in the
>  settings.xml?
> > :-/
> >
> >
> >  ***************************
> >  Maven will do it automatically if you defines theses properties in
>  your
> > setting.xml files.
> >
> > Jeff
> >
> >
> > On Jan 2, 2008 10:53 AM, Thomas Chang <th...@yahoo.de> wrote:
> >
> > > Hi all,
> > >
> > >  Normally the <version> in <dependency> in pom.xml look as follow:
> > >  <dependency>
> > >  <groupId>junit</groupId>
> > >  <artifactId>junit</artifactId>
> > >  <version>3.8.1</version>
> > >  </dependency>
> > >
> > >  Now I want to do as follow:
> > >  <dependency>
> > >  <groupId>{my.junit.group}</groupId>
> > >  <artifactId>{my.junit.artifactId}</artifactId>
> > >  <version>{my.junit.version}</version>
> > >  </dependency>
> > >
> > >  The values of {my.junit.group} etc. will be defined in an other
> >  file. Now
> > > my question: How can I configure the pom.xml so that it knows to
>  read
> > > these values from the file where the {my.junit.group} etc. defined?
> > >
> > >  Regards
> > >
> > >  Thomas
>
>
>
> ---------------------------------
> Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel
> mehr bietet das  neue Yahoo! Mail.




-- 
La mélancolie c'est communiste
Tout le monde y a droit de temps en temps
La mélancolie n'est pas capitaliste
C'est même gratuit pour les perdants
La mélancolie c'est pacifiste
On ne lui rentre jamais dedans
La mélancolie oh tu sais ça existe
Elle se prend même avec des gants
La mélancolie c'est pour les syndicalistes
Il faut juste sa carte de permanent

Miossec (2006)

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com

Re: Problem by injecting POM Properties via Settings.xml

Posted by Olivier Lamy <ol...@apache.org>.
Hi,
The profile in your settings need to be active.
Try with :

>   <profiles>
>   <profile>
     <id>normal</id>
     <activation>
     	<activeByDefault>true</activeByDefault>
     </activation>
>   <properties>
>   <myversion>3.8.1</myversion>
>   </properties>
>   </profile>
>   </profiles>

Use mvn help:effective-pom to see the pom interpolated.

--
Olivier

2008/1/2, Thomas Chang <th...@yahoo.de>:
> Hi all,
>
>   According to the link http://maven.apache.org/examples/injecting-properties-via-settings.html I do in my "pom.xml" and "settings.xml" followings:
>
>   in the "pom.xml":
>   =============
>   ...
>   <dependency>
>   <groupId>junit</groupId>
>   <artifactId>junit</artifactId>
>   <version>${myversion}</version>
>   </dependency>
>   ...
>
>   in the "settings.xml":
>   ===============
>   ...
>   <profiles>
>   <profile>
>   <properties>
>   <myversion>3.8.1</myversion>
>   </properties>
>   </profile>
>   </profiles>
>   ...
>
>   But a sI run "mvn eclipse:eclipse" I get error as follow. Somebody can help?
>   ...
>   Downloading: file:////sap-dev/CVSREPO/CvsMaven/junit/junit/${myversion}/junit-${
> myversion}.jar
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>   Missing:
> ----------
> 1) junit:junit:jar:${myversion}
>     Try downloading the file manually from the project website.
>     Then, install it using the command:
>       mvn install:install-file -DgroupId=junit -DartifactId=junit \
>           -Dversion=${myversion} -Dpackaging=jar -Dfile=/path/to/file
> Alternatively, if you host your own repository you can deploy the file there:
>     mvn deploy:deploy-file -DgroupId=junit -DartifactId=junit \
>           -Dversion=${myversion} -Dpackaging=jar -Dfile=/path/to/file \
>            -Durl=[url] -DrepositoryId=[id]
>     Path to dependency:
>         1) com.wei.chen.app:TestXml:jar:1.0-SNAPSHOT
>         2) junit:junit:jar:${myversion}
>   ----------
> 1 required artifact is missing.
>   for artifact:
>   com.wei.chen.app:TestXml:jar:1.0-SNAPSHOT
>   from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)
>
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Wed Jan 02 14:18:48 CET 2008
> [INFO] Final Memory: 2M/5M
> [INFO] ------------------------------------------------------------------------
>   E:\Projekte\TestXml>
>   ...
>
>
>
> ---------------------------------
> Ihr erstes Fernweh? Wo gibt es den schönsten Strand.

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


Problem by injecting POM Properties via Settings.xml

Posted by Thomas Chang <th...@yahoo.de>.
Hi all,
   
  According to the link http://maven.apache.org/examples/injecting-properties-via-settings.html I do in my "pom.xml" and "settings.xml" followings:
   
  in the "pom.xml":
  =============
  ...
  <dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>${myversion}</version>
  </dependency>
  ...
   
  in the "settings.xml":
  ===============
  ...
  <profiles>
  <profile>
  <properties>
  <myversion>3.8.1</myversion>
  </properties>
  </profile>
  </profiles>
  ...
   
  But a sI run "mvn eclipse:eclipse" I get error as follow. Somebody can help?
  ...
  Downloading: file:////sap-dev/CVSREPO/CvsMaven/junit/junit/${myversion}/junit-${
myversion}.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
  Missing:
----------
1) junit:junit:jar:${myversion}
    Try downloading the file manually from the project website.
    Then, install it using the command:
      mvn install:install-file -DgroupId=junit -DartifactId=junit \
          -Dversion=${myversion} -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
    mvn deploy:deploy-file -DgroupId=junit -DartifactId=junit \
          -Dversion=${myversion} -Dpackaging=jar -Dfile=/path/to/file \
           -Durl=[url] -DrepositoryId=[id]
    Path to dependency:
        1) com.wei.chen.app:TestXml:jar:1.0-SNAPSHOT
        2) junit:junit:jar:${myversion}
  ----------
1 required artifact is missing.
  for artifact:
  com.wei.chen.app:TestXml:jar:1.0-SNAPSHOT
  from the specified remote repositories:
  central (http://repo1.maven.org/maven2)
  
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Wed Jan 02 14:18:48 CET 2008
[INFO] Final Memory: 2M/5M
[INFO] ------------------------------------------------------------------------
  E:\Projekte\TestXml>
  ...
   

       
---------------------------------
Ihr erstes Fernweh? Wo gibt es den schönsten Strand. 

Re: A question about in in pom.xml

Posted by Thomas Chang <th...@yahoo.de>.
I think you mean:
  <properties>
        <my.junit.group>xxxx</my.junit.group>
</properties>

  Right?
   
  I put this at the end of "settings.xml". But I got error as I run mvn command such as mvn clean:
  E:\Projekte\TestXml>mvn clean
Error reading settings.xml: Unrecognised tag: 'properties' (position: START_TAG
seen ...</profiles>\r\n\r\n\t<properties>... @240:14)
  Line:   240
  Column: 14
  E:\Projekte\TestXml>
   
   
  ******************
  In your settings.xml files, insert the following code under the
 settings
element:

     <properties>
        <my.junit.group>xxxx</libs_project_home>
      </properties>

Jeff

On Jan 2, 2008 11:12 AM, Thomas Chang <th...@yahoo.de> wrote:

> Thanks for the answer.
>
>  Could you give an example how to set these properties in the
 settings.xml?
> :-/
>
>
>  ***************************
>  Maven will do it automatically if you defines theses properties in
 your
> setting.xml files.
>
> Jeff
>
>
> On Jan 2, 2008 10:53 AM, Thomas Chang <th...@yahoo.de> wrote:
>
> > Hi all,
> >
> >  Normally the <version> in <dependency> in pom.xml look as follow:
> >  <dependency>
> >  <groupId>junit</groupId>
> >  <artifactId>junit</artifactId>
> >  <version>3.8.1</version>
> >  </dependency>
> >
> >  Now I want to do as follow:
> >  <dependency>
> >  <groupId>{my.junit.group}</groupId>
> >  <artifactId>{my.junit.artifactId}</artifactId>
> >  <version>{my.junit.version}</version>
> >  </dependency>
> >
> >  The values of {my.junit.group} etc. will be defined in an other
>  file. Now
> > my question: How can I configure the pom.xml so that it knows to
 read
> > these values from the file where the {my.junit.group} etc. defined?
> >
> >  Regards
> >
> >  Thomas


       
---------------------------------
Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das  neue Yahoo! Mail. 

Re: A question about in in pom.xml

Posted by Jeff MAURY <je...@jeffmaury.com>.
In your settings.xml files, insert the following code under the settings
element:

     <properties>
        <my.junit.group>xxxx</libs_project_home>
      </properties>

Jeff

On Jan 2, 2008 11:12 AM, Thomas Chang <th...@yahoo.de> wrote:

> Thanks for the answer.
>
>  Could you give an example how to set these properties in the settings.xml?
> :-/
>
>
>  ***************************
>  Maven will do it automatically if you defines theses properties in your
> setting.xml files.
>
> Jeff
>
>
> On Jan 2, 2008 10:53 AM, Thomas Chang <th...@yahoo.de> wrote:
>
> > Hi all,
> >
> >  Normally the <version> in <dependency> in pom.xml look as follow:
> >  <dependency>
> >  <groupId>junit</groupId>
> >  <artifactId>junit</artifactId>
> >  <version>3.8.1</version>
> >  </dependency>
> >
> >  Now I want to do as follow:
> >  <dependency>
> >  <groupId>{my.junit.group}</groupId>
> >  <artifactId>{my.junit.artifactId}</artifactId>
> >  <version>{my.junit.version}</version>
> >  </dependency>
> >
> >  The values of {my.junit.group} etc. will be defined in an other
>  file. Now
> > my question: How can I configure the pom.xml so that it knows to read
> > these values from the file where the {my.junit.group} etc. defined?
> >
> >  Regards
> >
> >  Thomas
> >
> >
> > ---------------------------------
> > Beginnen Sie den Tag mit den neuesten Nachrichten. Machen Sie Yahoo!
>  zu
> > Ihrer Startseite!
> >
>
>
>
> ---------------------------------
> Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s
> mit dem  neuen Yahoo! Mail.
>



-- 
La mélancolie c'est communiste
Tout le monde y a droit de temps en temps
La mélancolie n'est pas capitaliste
C'est même gratuit pour les perdants
La mélancolie c'est pacifiste
On ne lui rentre jamais dedans
La mélancolie oh tu sais ça existe
Elle se prend même avec des gants
La mélancolie c'est pour les syndicalistes
Il faut juste sa carte de permanent

Miossec (2006)

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com

Re: A question about in in pom.xml

Posted by Thomas Chang <th...@yahoo.de>.
Thanks for the answer.
   
  Could you give an example how to set these properties in the settings.xml? :-/
   
   
  ***************************
  Maven will do it automatically if you defines theses properties in your
setting.xml files.

Jeff


On Jan 2, 2008 10:53 AM, Thomas Chang <th...@yahoo.de> wrote:

> Hi all,
>
>  Normally the <version> in <dependency> in pom.xml look as follow:
>  <dependency>
>  <groupId>junit</groupId>
>  <artifactId>junit</artifactId>
>  <version>3.8.1</version>
>  </dependency>
>
>  Now I want to do as follow:
>  <dependency>
>  <groupId>{my.junit.group}</groupId>
>  <artifactId>{my.junit.artifactId}</artifactId>
>  <version>{my.junit.version}</version>
>  </dependency>
>
>  The values of {my.junit.group} etc. will be defined in an other
 file. Now
> my question: How can I configure the pom.xml so that it knows to read
> these values from the file where the {my.junit.group} etc. defined?
>
>  Regards
>
>  Thomas
>
>
> ---------------------------------
> Beginnen Sie den Tag mit den neuesten Nachrichten. Machen Sie Yahoo!
 zu
> Ihrer Startseite!
>


       
---------------------------------
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem  neuen Yahoo! Mail. 

Re: A question about in in pom.xml

Posted by Jeff MAURY <je...@jeffmaury.com>.
Maven will do it automatically if you defines theses properties in your
setting.xml files.

Jeff


On Jan 2, 2008 10:53 AM, Thomas Chang <th...@yahoo.de> wrote:

> Hi all,
>
>  Normally the <version> in <dependency> in pom.xml look as follow:
>  <dependency>
>  <groupId>junit</groupId>
>  <artifactId>junit</artifactId>
>  <version>3.8.1</version>
>  </dependency>
>
>  Now I want to do as follow:
>  <dependency>
>  <groupId>{my.junit.group}</groupId>
>  <artifactId>{my.junit.artifactId}</artifactId>
>  <version>{my.junit.version}</version>
>  </dependency>
>
>  The values of {my.junit.group} etc. will be defined in an other file. Now
> my question: How can I configure the pom.xml so that it knows to read
> these values from the file where the {my.junit.group} etc. defined?
>
>  Regards
>
>  Thomas
>
>
> ---------------------------------
> Beginnen Sie den Tag mit den neuesten Nachrichten. Machen Sie Yahoo! zu
> Ihrer Startseite!
>



-- 
La mélancolie c'est communiste
Tout le monde y a droit de temps en temps
La mélancolie n'est pas capitaliste
C'est même gratuit pour les perdants
La mélancolie c'est pacifiste
On ne lui rentre jamais dedans
La mélancolie oh tu sais ça existe
Elle se prend même avec des gants
La mélancolie c'est pour les syndicalistes
Il faut juste sa carte de permanent

Miossec (2006)

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com

A question about in in pom.xml

Posted by Thomas Chang <th...@yahoo.de>.
Hi all,
   
  Normally the <version> in <dependency> in pom.xml look as follow:
  <dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>3.8.1</version>
  </dependency>
   
  Now I want to do as follow:
  <dependency>
  <groupId>{my.junit.group}</groupId>
  <artifactId>{my.junit.artifactId}</artifactId>
  <version>{my.junit.version}</version>
  </dependency>
   
  The values of {my.junit.group} etc. will be defined in an other file. Now my question: How can I configure the pom.xml so that it knows to read these values from the file where the {my.junit.group} etc. defined?
   
  Regards
   
  Thomas

       
---------------------------------
Beginnen Sie den Tag mit den neuesten Nachrichten. Machen Sie Yahoo! zu Ihrer Startseite!