You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Claves Do Amaral <Cl...@iggroup.com> on 2011/05/04 10:11:50 UTC

Classifiers and build number

Good morning,

I have some problems using artefacts deployed with classifiers. The version of Maven I am using is 3.0.2

We add the classifiers (jacorb) and (sunorb) to our CORBA artefacts, such that the classifier name is added to the jar version i.e "corba-client-base-2.3-SNAPSHOT-jacorb.jar" or "corba-client-base-2.3-SNAPSHOT-sunorb.jar"

These are then translated into our (Nexus) repository with the timestamp plus consecutive build number, i.e. "corba-client-base-2.3-20110427.092455-43-jacorb.jar" and "corba-client-base-2.3-20110427.092455-44-sunorb.jar".

You will notice the timestamp is the same for the time stamp but the build number is different for the artefacts, that are built by different plans on Bamboo.

The metadata for this version is

<metadata>
<groupId>uk.co.igindex.corba</groupId>
<artifactId>corba-client-base</artifactId>
<version>2.3-SNAPSHOT</version>
<versioning>
<snapshot>
<timestamp>20110427.092455</timestamp>
<buildNumber>44</buildNumber>
</snapshot>
<lastUpdated>20110429052440</lastUpdated>
</versioning>
</metadata>

When I build a project that depends on "corba-client-base" I get the following error:

Downloaded: http://xxxxxxxxxxxxxxxxxxxxxx:8081/nexus/content/repositories/ig.snapshot/uk/co/igindex/corba/derived-corba-client-parent/2.3-SNAPSHOT/maven-metadata.xml (621 B at 37.9 KB/sec)
Downloading: http://xxxxxxxxxxxxxxxxxxxx:8081/nexus/content/repositories/ig.snapshot/uk/co/igindex/corba/corba-client-base/2.3-SNAPSHOT/corba-client-base-2.3-20110427.092455-44-jacorb.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.528s
[INFO] Finished at: Tue May 03 11:19:37 BST 2011
[INFO] Final Memory: 11M/605M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project xcon-data-factory: Could not resolve dependencies for project uk.co.igindex.corba.xds:xcon-data-factory:jar:1.4-SNAPSHOT: Could not find artifact uk.co.igindex.corba:corba-client-base:jar:jacorb:2.3-20110427.092455-44 in xxxxxxxxxxxxxx (http://xxxxxxxxxxxxxxxx:8081/nexus/content/repositories/ig.snapshot) -> [Help 1]

I can understand this error is due to the mismatch of the build number returned by the metadata, because the <buildNumber> value does not reflect the actual artefact build number.

My question is: how can I solve this? How can I tell the correct build number for different classifiers? Is it possible to tell Maven to use the same build number for both build, or at least to use some custom number? In fact, if the timestamp is the same for both artefact, why is not the build number?

I have tried the <uniqueVersion> but it does not solve all the issues, makes the pom cumbersome, I read somewhere that is deprecated and ultimately I don't like it, because I want to keep the multiple version mechanism for my artefacts.
I have tried the buildnumber-maven-plugin, but it looks this generates a build number that does not have any effect on the deployment build number.

I tried many customisation options on the maven-deploy-plugin but none of these solved my issue.

If anyone can help, this would be much appreciated.

Thanks,


Claves do Amaral


The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059.

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


RE: Classifiers and build number

Posted by Claves Do Amaral <Cl...@iggroup.com>.
-----Original Message-----
From: Claves Do Amaral [mailto:Claves.DoAmaral@iggroup.com]
>Good morning,
>
>I have some problems using artefacts deployed with classifiers. The version of Maven I am using is 3.0.2

Hello Maven users,

It looks that after adding the directive

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <configuration>
                <classifier>${envClassifier}</classifier>
        </configuration>
</plugin>

Things work quite better. I can see the repository metadata now include the artefact information:

<metadata modelVersion="1.1.0">
<groupId>uk.co.igindex.corba.price.service.xds</groupId>
<artifactId>xds-corba</artifactId>
<version>2.4-SNAPSHOT</version>
<versioning>
<snapshot>
<lastUpdated>20110504101227</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<classifier>jacorb</classifier>
<extension>jar</extension>
<value>2.4-20110504.101227-41</value>
<updated>20110504101227</updated>
</snapshotVersion>
<snapshotVersion>
<classifier>sunorb</classifier>
<extension>jar</extension>
<value>2.4-20110504.101226-40</value>
<updated>20110504101226</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
<style />
</metadata>

I hope I am taking the right direction.

Thanks,
Claves



The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059.

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