2

Below are geronimo jar files were included into my war file when build maven

However, I never include them in pom.xml

  geronimo-activation_1.1_spec-1.0.1.jar
  geronimo-j2ee-management_1.1_spec-1.0.1.jar
  geronimo-javamail_1.4_spec-1.2.jar
  geronimo-jms_1.1_spec-1.1.1.jar
  geronimo-jta_1.1_spec-1.1.jar
  geronimo-stax-api_1.0_spec-1.0.1.jar
  geronimo-ws-metadata_2.0_spec-1.1.2.jar
Arpit
  • 6,212
  • 8
  • 38
  • 69
Ho Duan
  • 21
  • 1

2 Answers2

2

Well, some of the plugin / dependency that you are using in your pom.xml has cross dependency on geronimo, that's why while building, maven is downloading and packaging this dependency war files.

You can use the below command to get the whole dependency tree and check.

$ mvn dependency:tree
Arpit
  • 6,212
  • 8
  • 38
  • 69
  • thank for your help, but i found out which jars depend on geronimo so how to ignore them? – Ho Duan Jan 04 '13 at 07:20
  • You can use the `true` tag while declaring those dependency. See this [link](http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html) – Arpit Jan 04 '13 at 07:26
1

Some dependency in your pom is bringing in these dependencies with the wrong scope. Just add them to dependency management and change the scope to provided.

Manfred Moser
  • 29,539
  • 13
  • 92
  • 123
  • Thank for your answer, so you mean adding geronimo-xx.jar into pom.xml with scope provided, right? – Ho Duan Jan 04 '13 at 07:19
  • Use an exclusion of them on whatever artifact pull them in the first place or add them to dependencyManagement with scope provided.. – Manfred Moser Jan 04 '13 at 08:02