1

I have a cloud application which uses git and maven, so the source code is uploaded by Eclipse using GIT, and the required libraries are downloaded to the server by maven. But I have one library not in maven, it's downloaded as a source and also run time jar, xxx.jar and xxx-source.jar. When I upload the source, the reference libraries are not uploaded to the server, so the compile will fail on the server.

I could unzip it and package in the source folder and upload altogether. However, is there a simpler way just to put the source.jar as part of the project so Eclipse can upload that jar file as part of the project to the GIT server? and then the server will use that jar for compile?

durron597
  • 31,968
  • 17
  • 99
  • 158
Nebula Era
  • 263
  • 2
  • 10

1 Answers1

1

is it a third party? if so, why you need the sources? you can simply upload it manually to your repository and set it as a dependency in your pom.xml. if you still need the source for reference, you can upload it with a classifier, like you have (source).

sagie
  • 1,744
  • 14
  • 15
  • are you saying I get the source to the local repository, and the GIT will upload to the remote repository? I haven't thought about this way and I will try. – Nebula Era Nov 20 '14 at 04:41
  • 1
    no. git has nothing to do with maven repositories. sorry if i'm not clear. you should upload the jar to the maven repository (nexus, artifactory, whatever you are using). git is a scm and not relevant for this at all. – sagie Nov 20 '14 at 04:42