1

I recently converted a Java project into maven project. But, I still need to add the below jars as dependencies in the pom.xml. Can you please tell me if there is a tool to add the jars as dependencies into my pom.xml file. If there is no such tool can you please tell me how my pom file will look like. Thanks in adavance

enter image description here

Right now my pom file is like shown below

  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Survey</groupId>
<artifactId>Survey</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>Survey</name>
<build>
   <sourceDirectory>src</sourceDirectory>
 <resources>
  <resource>
    <directory>src</directory>
    <excludes>
      <exclude>**/*.java</exclude>
    </excludes>
  </resource>
</resources>
<plugins>
  <plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.5.1</version>
    <configuration>
      <source>1.6</source>
      <target>1.6</target>
    </configuration>
  </plugin>
  <plugin>
    <artifactId>maven-war-plugin</artifactId>
    <version>3.0.0</version>
    <configuration>
      <warSourceDirectory>WebContent</warSourceDirectory>
    </configuration>
  </plugin>
</plugins>
 </build>
</project>     
  • You would add a stanze, and in that you would enumerate your . Like ` commons-beanutils commons-beanutils-core 1.8.3 ` – Elliott Frisch May 24 '17 at 20:40
  • Adding the Struts dependency will cause the transitive dependencies to be pulled in at build time. Similarly other "top-level" dependencies will do the same. It's only when you have an explicit dependency that you need to include it explicitly; that's kind of the point of this aspect of Maven. – Dave Newton May 24 '17 at 20:52

0 Answers0