0

I have added around 100 jars in my local Apache Archiva. Now i will want to add all these dependency jar to my project Pom.xml file. Can it possible to add all these dependency by single Copy-paste? Right now i have to copy each individual dependency from Apache Archiva and paste into my project pom.xml file.I have to copy-paste these lines in my Pom.xml file for each jar which is very tough task.

 <dependency>
  <groupId>org.csdc</groupId>
  <artifactId>dom4j</artifactId>
  <version>1.6.1</version>
</dependency>
Subodh Joshi
  • 12,717
  • 29
  • 108
  • 202

2 Answers2

1

It's very unlikely that you need all 100 jars as direct dependencies. In maven, you have to list your direct dependencies - one by one, yes. However, you don't need to list your transitive dependencies because maven will manage that for you. This is one of the most fundamental improvements over older manual classpath management java building.

chad
  • 7,369
  • 6
  • 37
  • 56
0

No All dependency of all jar, because of in that jars some of the dependency have same group Id , so that have fetch all the jars that included.

some of the dependency is writing in pom.xml file

for example code is

<dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-annotations</artifactId>
        <version>3.4.0.GA</version>
    </dependency>

the above dependency fetch all jars of related to hibernate-annotation

- hinernate-annotation
- hibernate-common-annotation
- hibernate-core jar files to be fetched.....
Hardik Lotiya
  • 371
  • 3
  • 9
  • 28
  • Thanks so you mean that i have if i added 100 jars in Apache Archiva i have to add all these dependency in my pom.xml one by one – Subodh Joshi Nov 01 '12 at 12:14
  • No , That jar where to fetch GROUP_ID and main package of jar that's ARTIFACTID and which version to use that specified in version of dependency. – Hardik Lotiya Nov 01 '12 at 12:21