Java: Compare loaded jars on local machine and environment

I've faced problem when something going wrong on remote environment, whereas on localhost all works correct. After some googling I consider that it's caused by maven packaging specific or some jar-versions mismatch. I suppose that some jar file isn't loaded on environment for some reasons.

Question: How can I check which libraries match and which not on localhost and environment? For example write the whole jars list to the file on application start on both environments. Is that possible?

Update:

In log of mvn clean install I've found:

Including com.sun.jersey.contribs:jersey-multipart:jar:1.5 in the shaded jar

My problems are linked exactly with the multipart. Is that the reason? But again, the same log appears on localhost too.

Answers


You will have to correct your pom.xml file. To avoid such error keep your version at properties tag. Look at ${spring.version} in below example.

<dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${spring.version}</version>
</dependency>

May be this link answer will help you.


Need Your Help

How to set wpf grid rowspan programmatically?

c# .net wpf silverlight mvvm

How to set wpf grid rowspan programmatically? I am using mvvm pattern.

Running Java as a Web App

java jsp java-ee javabeans

Okay, I know that Java is a language but somebody has asked me if they can write a web application to interface in with a web app I've written in ASP.NET. I'm implementing a web service to serve up...