Marco Aviles
Marco Aviles

Reputation: 5596

Maven artifact jar different name than version

I got a small question about Maven. I got a project my pom.xml

It has basically this repositories:

<repositories>
    <repository>
        <id>alfresco-mirror</id>
        <name>Alfresco Public Mirror</name> 
        <url>http://maven.alfresco.com/nexus/content/groups/public</url>
    </repository>
    <repository>
        <id>alfresco-snapshots</id>
        <name>Alfresco Public Snapshots</name>
        <url>http://maven.alfresco.com/nexus/content/groups/public-snapshots</url>
        <snapshots>
            <updatePolicy>always</updatePolicy>
        </snapshots>    
    </repository>
    <repository>
        <id>alfresco</id>
        <name>Alfresco Public </name>
        <url>http://pipin.bluexml.com/nexus/content/repositories/thirdparty/</url>
        <snapshots>
            <updatePolicy>always</updatePolicy>
        </snapshots>    
    </repository>
</repositories>

and this dependency:

<dependencies>
       <dependency>
        <groupId>org.alfresco</groupId>
        <artifactId>alfresco-web-service-client</artifactId>
        <version>3.4.d</version>
        <type>jar</type>
    </dependency>  
</dependencies>

I think the main problem is that jar file and version got different names. How can I solve this?

I thank your help in advance.

PS: Just for save time, this dependency link location

Upvotes: 3

Views: 2716

Answers (1)

Paul Dunnavant
Paul Dunnavant

Reputation: 616

Try adding a classifier node to see if that works:

<dependencies>
  <dependency>
    <groupId>org.alfresco</groupId>
    <artifactId>alfresco-web-service-client</artifactId>
    <version>3.4.d</version>
    <classifier>community</classifier>
    <type>jar</type>
  </dependency>  
</dependencies>

You can see the reasoning behind that here. Long story short, classifiers are just appended to that artifact name right after the version number. They're not used all that often, but you do see them from time to time.

Upvotes: 7

Related Questions