You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Steinhauer, Frank" <f....@olympus-odl.com> on 2007/06/14 14:38:36 UTC
AW: install:install - variables in POM are not replaced/filtered during installation in repository
Hi,
I still need help für this issue. Why are varibles aren't filtered during installation in a repository? This sounds like a bug to me, or at least like a strange behaviour - am I wrong? Please help someone!
Cheers,
Frank
Another example (without dependecy). The POM ist copied 1:1 to the repo, without any filtering of variables.
-------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>group</groupId>
<artifactId>aaa</artifactId>
<packaging>jar</packaging>
<version>${buildVersion}</version> <!-- NOT FILTERED DURING INSTALL/DEPLOY IN REPO! -->
<properties>
<versionNo>1.2</versionNo>
<buildVersion>${versionNo}${point}${label}</buildVersion>
</properties>
</project>
-------------------------------------------------------------------------
Settings.xml:
<settings xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<!-- CruiseControl builds should have a name like "aaa-1.2.build-123.jar", locally we use "aaa-1.2-SNAPSHOT.jar" -->
<id>setting_label</id>
<properties>
<point>-</point> <!-- use "." on the build server, "-" locally -->
<label>SNAPSHOT</label> <!-- label is set automatically by CruiseControl, use "SNAPSHOT" locally -->
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>setting_label</activeProfile>
</activeProfiles>
</settings>
-------------------------------------------------------------------------
-----Ursprüngliche Nachricht-----
Von: Steinhauer, Frank [mailto:f.steinhauer@olympus-odl.com]
Gesendet: Mittwoch, 23. Mai 2007 15:39
An: dev@maven.apache.org
Betreff: install:install - variables in POM are not replaced/filtered during installation in repository
Hello,
during installation of the POM in the local repository the variables are
not replaced/filtered. Is this a bug or purpose? Or did I a make a
mistake somewhere?
Explanation:
In our POMs we set the version numbers according to local settings and
given CLI parameters, and do this in our multi module projects for the
intern dependecies (dependencies to other modules) as well. So when Jar
AAA depends on Jar BBB that depends on Jar CCC (all version numbers are
variables), the POM of BBB is loaded, but then the further load of Jar
CCC fails, it tries to load XXX:CCC:jar:1.2${point}${label} or
XXX:CCC:jar:1.2${buildVersion} (the later in the multi module build).
Any suggestions? I'm glad for any assistence, since it cost me already
three days figuring that out....
Cheers,
Frank
Example POM for AAA:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>XXX</groupId>
<artifactId>AAA</artifactId>
<version>${buildVersion}</version> <!-- used throughout all of our
projects/modules -->
<packaging>jar</packaging>
<properties>
<versionNo>1.2</versionNo>
<buildVersion>${versionNo}${label}</buildVersion> <!-- label is
set differently in a local build and in the CruiseControl build -->
</properties>
...
<dependencies>
<dependency>
<groupId>XXX</groupId>
<artifactId>BBB</artifactId>
<version>${buildVersion}</version>
<type>jar</type>
</dependency>
</dependencies>
...
</project>
Similiar example POM for BBB:
...
<artifactId>BBB</artifactId>
<version>${buildVersion}</version> <!-- used throughout all of our
projects/modules -->
...
<dependency>
<groupId>XXX</groupId>
<artifactId>CCC</artifactId>
<version>${buildVersion}</version>
<type>jar</type>
</dependency>
...
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: AW: install:install - variables in POM are not replaced/filtered during installation in repository
Posted by Jason van Zyl <ja...@maven.org>.
On 21 Jun 07, at 12:31 PM 21 Jun 07, Steinhauer, Frank wrote:
> Hi,
>
> Is there no one that can answer my question? Sorry if I annoy
> anyone, but this IS a question to the developers list - and I tried
> it on users, too, but no answer there, and it may be a bug, or at
> least a behaviour that needs to be stated in the user docu.
>
The POM is not modified at all in 2.0.x for install or deploy. It is
assumed that Maven will be reading the POM back in and that all
values required to make the POM work are available.
If you are pushing in values from your settings.xml and expecting
those to be interpolated into POM so that you can later use them your
out of luck.
Again, the POMs are not changed at all. Only in the release plugin
will create a fully resolved POM or "release POM". This may not be
what we do in the future but it is intended for the time being.
> Cheers,
>
> Frank
>
> -----Ursprüngliche Nachricht-----
> Gesendet: Donnerstag, 14. Juni 2007 14:39
> An: Maven Developers List
> Betreff: AW: install:install - variables in POM are not replaced/
> filtered during installation in repository
>
> Hi,
>
> I still need help für this issue. Why are varibles aren't filtered
> during installation in a repository? This sounds like a bug to me,
> or at least like a strange behaviour - am I wrong? Please help
> someone!
>
> Cheers,
>
> Frank
>
>
> Another example (without dependecy). The POM ist copied 1:1 to the
> repo, without any filtering of variables.
>
> ----------------------------------------------------------------------
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-
> v4_0_0.xsd">
>
> <modelVersion>4.0.0</modelVersion>
>
> <groupId>group</groupId>
> <artifactId>aaa</artifactId>
> <packaging>jar</packaging>
>
> <version>${buildVersion}</version> <!-- NOT FILTERED
> DURING INSTALL/DEPLOY IN REPO! -->
>
> <properties>
> <versionNo>1.2</versionNo>
> <buildVersion>${versionNo}${point}${label}</buildVersion>
> </properties>
>
> </project>
> ----------------------------------------------------------------------
> ---
> Settings.xml:
> <settings xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/settings-1.0.0.xsd">
>
> <profiles>
> <profile>
> <!-- CruiseControl builds should have a name like
> "aaa-1.2.build-123.jar", locally we use "aaa-1.2-SNAPSHOT.jar" -->
> <id>setting_label</id>
> <properties>
> <point>-</point> <!-- use "." on the build
> server, "-" locally -->
> <label>SNAPSHOT</label> <!-- label is set
> automatically by CruiseControl, use "SNAPSHOT" locally -->
> </properties>
> </profile>
> </profiles>
>
> <activeProfiles>
> <activeProfile>setting_label</activeProfile>
> </activeProfiles>
>
> </settings>
> ----------------------------------------------------------------------
> ---
>
>
>
> -----Ursprüngliche Nachricht-----
> Gesendet: Mittwoch, 23. Mai 2007 15:39
> An: dev@maven.apache.org
> Betreff: install:install - variables in POM are not replaced/
> filtered during installation in repository
>
> Hello,
>
> during installation of the POM in the local repository the
> variables are
> not replaced/filtered. Is this a bug or purpose? Or did I a make a
> mistake somewhere?
> Explanation:
> In our POMs we set the version numbers according to local settings and
> given CLI parameters, and do this in our multi module projects for the
> intern dependecies (dependencies to other modules) as well. So when
> Jar
> AAA depends on Jar BBB that depends on Jar CCC (all version numbers
> are
> variables), the POM of BBB is loaded, but then the further load of Jar
> CCC fails, it tries to load XXX:CCC:jar:1.2${point}${label} or
> XXX:CCC:jar:1.2${buildVersion} (the later in the multi module build).
> Any suggestions? I'm glad for any assistence, since it cost me already
> three days figuring that out....
>
>
> Cheers,
>
> Frank
>
>
>
> Example POM for AAA:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
>
> <groupId>XXX</groupId>
> <artifactId>AAA</artifactId>
> <version>${buildVersion}</version> <!-- used throughout all of our
> projects/modules -->
> <packaging>jar</packaging>
> <properties>
> <versionNo>1.2</versionNo>
> <buildVersion>${versionNo}${label}</buildVersion> <!-- label is
> set differently in a local build and in the CruiseControl build -->
> </properties>
> ...
> <dependencies>
> <dependency>
> <groupId>XXX</groupId>
> <artifactId>BBB</artifactId>
> <version>${buildVersion}</version>
> <type>jar</type>
> </dependency>
> </dependencies>
> ...
> </project>
>
>
> Similiar example POM for BBB:
>
> ...
> <artifactId>BBB</artifactId>
> <version>${buildVersion}</version> <!-- used throughout all of our
> projects/modules -->
> ...
> <dependency>
> <groupId>XXX</groupId>
> <artifactId>CCC</artifactId>
> <version>${buildVersion}</version>
> <type>jar</type>
> </dependency>
> ...
> </project>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
AW: install:install - variables in POM are not replaced/filtered during installation in repository
Posted by "Steinhauer, Frank" <f....@olympus-odl.com>.
Hi,
Is there no one that can answer my question? Sorry if I annoy anyone, but this IS a question to the developers list - and I tried it on users, too, but no answer there, and it may be a bug, or at least a behaviour that needs to be stated in the user docu.
Cheers,
Frank
-----Ursprüngliche Nachricht-----
Gesendet: Donnerstag, 14. Juni 2007 14:39
An: Maven Developers List
Betreff: AW: install:install - variables in POM are not replaced/filtered during installation in repository
Hi,
I still need help für this issue. Why are varibles aren't filtered during installation in a repository? This sounds like a bug to me, or at least like a strange behaviour - am I wrong? Please help someone!
Cheers,
Frank
Another example (without dependecy). The POM ist copied 1:1 to the repo, without any filtering of variables.
-------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>group</groupId>
<artifactId>aaa</artifactId>
<packaging>jar</packaging>
<version>${buildVersion}</version> <!-- NOT FILTERED DURING INSTALL/DEPLOY IN REPO! -->
<properties>
<versionNo>1.2</versionNo>
<buildVersion>${versionNo}${point}${label}</buildVersion>
</properties>
</project>
-------------------------------------------------------------------------
Settings.xml:
<settings xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<!-- CruiseControl builds should have a name like "aaa-1.2.build-123.jar", locally we use "aaa-1.2-SNAPSHOT.jar" -->
<id>setting_label</id>
<properties>
<point>-</point> <!-- use "." on the build server, "-" locally -->
<label>SNAPSHOT</label> <!-- label is set automatically by CruiseControl, use "SNAPSHOT" locally -->
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>setting_label</activeProfile>
</activeProfiles>
</settings>
-------------------------------------------------------------------------
-----Ursprüngliche Nachricht-----
Gesendet: Mittwoch, 23. Mai 2007 15:39
An: dev@maven.apache.org
Betreff: install:install - variables in POM are not replaced/filtered during installation in repository
Hello,
during installation of the POM in the local repository the variables are
not replaced/filtered. Is this a bug or purpose? Or did I a make a
mistake somewhere?
Explanation:
In our POMs we set the version numbers according to local settings and
given CLI parameters, and do this in our multi module projects for the
intern dependecies (dependencies to other modules) as well. So when Jar
AAA depends on Jar BBB that depends on Jar CCC (all version numbers are
variables), the POM of BBB is loaded, but then the further load of Jar
CCC fails, it tries to load XXX:CCC:jar:1.2${point}${label} or
XXX:CCC:jar:1.2${buildVersion} (the later in the multi module build).
Any suggestions? I'm glad for any assistence, since it cost me already
three days figuring that out....
Cheers,
Frank
Example POM for AAA:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>XXX</groupId>
<artifactId>AAA</artifactId>
<version>${buildVersion}</version> <!-- used throughout all of our
projects/modules -->
<packaging>jar</packaging>
<properties>
<versionNo>1.2</versionNo>
<buildVersion>${versionNo}${label}</buildVersion> <!-- label is
set differently in a local build and in the CruiseControl build -->
</properties>
...
<dependencies>
<dependency>
<groupId>XXX</groupId>
<artifactId>BBB</artifactId>
<version>${buildVersion}</version>
<type>jar</type>
</dependency>
</dependencies>
...
</project>
Similiar example POM for BBB:
...
<artifactId>BBB</artifactId>
<version>${buildVersion}</version> <!-- used throughout all of our
projects/modules -->
...
<dependency>
<groupId>XXX</groupId>
<artifactId>CCC</artifactId>
<version>${buildVersion}</version>
<type>jar</type>
</dependency>
...
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org