You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jai Sharma <ja...@gmail.com> on 2020/08/19 03:11:36 UTC

Need help with maven deploy plugin.

I am trying to upload multiple jar files to artifactory using "mvn deploy" command for a multi module project. Problem I am facing is generated pom files uploaded with jar files to artifactory contains only property name as version.

Example - This is the part of jar file uploaded to artifactory for module "configuration-entity".
When i am using this as dependency in another project I am getting error cannot resolve dependencies 
com.blah.infra.libraries:rest:jar:${rest.version}
com.blah.infra.libraries:beans:jar:${beans.version}

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.blah.nw.libraries</groupId>
        <artifactId>libraries</artifactId>
        <version>1.0.0</version>
    </parent>

    <artifactId>configuration-entity</artifactId>

    <dependencies>
        <dependency>
            <groupId>com.blah.infra.libraries</groupId>
            <artifactId>rest</artifactId>
            <version>${rest.version}</version>
        </dependency>
        <dependency>
            <groupId>com.blah.infra.libraries</groupId>
            <artifactId>beans</artifactId>
            <version>${beans.version}</version>
        </dependency>



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


Re: Need help with maven deploy plugin.

Posted by John Patrick <nh...@gmail.com>.
Which pom are properties beans.version and rest.version defined?

com.blah.nw.libraries:libraries:1.0.0 or it's parent?

Technically what you're deploying and using looks valid, the consumed
using them should resolve those dependencies and pick up your custom
version property and work it out dynamically.

I've just created a mini project and mine seems to be working how you
want it to do, but i'm deploying to a local directory and not into
artifactory/nexus.

Normally in a multi module project, I collate all dependency version
details into the root multi module parent pom under the
dependencyManagement section. So multi module children only define use
x but never use version y of x.

John

On Wed, 19 Aug 2020 at 08:01, Jai Sharma <ja...@gmail.com> wrote:
>
> I am trying to upload multiple jar files to artifactory using "mvn deploy" command for a multi module project. Problem I am facing is generated pom files uploaded with jar files to artifactory contains only property name as version.
>
> Example - This is the part of jar file uploaded to artifactory for module "configuration-entity".
> When i am using this as dependency in another project I am getting error cannot resolve dependencies
> com.blah.infra.libraries:rest:jar:${rest.version}
> com.blah.infra.libraries:beans:jar:${beans.version}
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <project>
>
>     <modelVersion>4.0.0</modelVersion>
>
>     <parent>
>         <groupId>com.blah.nw.libraries</groupId>
>         <artifactId>libraries</artifactId>
>         <version>1.0.0</version>
>     </parent>
>
>     <artifactId>configuration-entity</artifactId>
>
>     <dependencies>
>         <dependency>
>             <groupId>com.blah.infra.libraries</groupId>
>             <artifactId>rest</artifactId>
>             <version>${rest.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>com.blah.infra.libraries</groupId>
>             <artifactId>beans</artifactId>
>             <version>${beans.version}</version>
>         </dependency>
>
>
>
> ---------------------------------------------------------------------
> 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