简体   繁体   中英

jars are not automatically deploy in tomcat using eclipse keplar

Till now we are using myeclipse to for development.

Now we started development using eclipse keplar.

My first problem is jars are not deployed in webapps lib directory which we solved by referring [link] Adding 3rd party jars to WEB-INF/lib automatically using Eclipse/Tomcat

but every time if want to add third party jar's dependency then we have to add in build path and Deployment Assembly

so please let me know if there is any workaround to add entry only in build path and this jar is automatically deployed in tomcat directory.

Thanks in advance.

Suppose here we have an example to add an external jar using eclipse kepler:

suppose we have have a project here RIGHT-CLICK on it and select its PROPERTIES ...

在此处输入图片说明

Then click on JAVA-BUILD-PATH ..

在此处输入图片说明

click on LIBRARIES tab and click on ADD-EXTERNAL-JARS ...

在此处输入图片说明

now select whatever you want to add an external jar or API and click ok

在此处输入图片说明

after taht you will see on libraries CONGRATS you have successfully added a jar file..

在此处输入图片说明

转到Run > Run Configuration如果没有),创建一个配置节点,转到“类路径”选项卡并添加所需的任何内容: Projects, JARs, External JARs ,然后在运行tomcat时将它们部署。

Darshan,

As you have added a "myeclipse" tag, I guess you are using MyEclipse. In this case, just use the deployment assembly to add dependencies, whether it is another project or an external jar file. When added this way, it will automatically be added to the build path (you will see it in the "Web App Libraries" container in the Package Explorer, under the project).

The MyEclipse developers are looking at the possibility of synchronizing the deployment assembly when adding to the build path directly but it's not clear that this is possible. So, just use the deployment assembly, in future, for adding dependencies to web projects.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM