0

In the maven build with Teamcity, maven-metadata.xml has this difintion, then I want to reference the jar-with-dependencies, it always gave me the version without dependencies. Not sure the problem is the maven or Teamcity.

<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
  <groupId>com.aa</groupId>
  <artifactId>bb</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <timestamp>20161213.151229</timestamp>
      <buildNumber>5</buildNumber>
    </snapshot>
    <lastUpdated>20161213151229</lastUpdated>
    <snapshotVersions>
      <snapshotVersion>
        <extension>jar</extension>
        <value>1.0.0-20161213.151229-5</value>
        <updated>20161213151229</updated>
      </snapshotVersion>
      <snapshotVersion>
        <extension>pom</extension>
        <value>1.0.0-20161213.151229-5</value>
        <updated>20161213151229</updated>
      </snapshotVersion>
      <snapshotVersion>
        <classifier>jar-with-dependencies</classifier>
        <extension>jar</extension>
        <value>1.0.0-20161213.151229-5</value>
        <updated>20161213151229</updated>
      </snapshotVersion>
    </snapshotVersions>
  </versioning>
</metadata>

Thanks.

carlspring
  • 31,231
  • 29
  • 115
  • 197
user1615666
  • 3,151
  • 7
  • 26
  • 23
  • So did you specify `jar-with-dependencies`? Why do you want to do that anyway? – Tunaki Dec 13 '16 at 16:19
  • thank, I added classifier, jar-dependencies is downloaded. but the issue is, the referenced jar still downloaded. I want to create a fat jar to avoid downloading each jar and then avoid conflicts. – user1615666 Dec 13 '16 at 16:25
  • 1
    Sounds like you want to use the `maven-shade-plugin` instead to create your fat JAR. It will reduce your POM and make sure the deployed POM doesn't have the dependencies that are included in the far JAR. See also http://stackoverflow.com/a/35155294/1743880 – Tunaki Dec 13 '16 at 16:29

0 Answers0