java - Consume custom jar in spring MVC project -
i need create website using spring mvc i'm using sts purpose. i'm using maven build tool.
i'm new java i'm having hard time figuring keep thing or directory structure follow. sts helped me create starter spring project looks following
i have custom jar file xyz.jar need consume service in website.
can please guide me file should kept , how include in build output ?
run below maven command corresponding parameters create folder inside .m2
folder , add jar there
mvn install:install-file -dfile=c:\jarlocation\xyz.jar -dgroupid=<add group id jar> -dartifactid=<add artifact id> -dversion=<add version> -dpackaging=jar
then in pom.xml
make entry dependency
for example can check how achieve it.
mvn install:install-file -dfile=c:\users\hariom\javaencryptpassword-0.0.1-snapshot.jar -dgroupid=com.oss.mdf -dartifactid=java.encrypt.password -dversion=1.0.0 -dpackaging=jar
and in pom.xml
file added entry
<dependency> <groupid>com.oss.mdf</groupid> <artifactid>java.encrypt.password</artifactid> <version>1.0.0</version> </dependency>
Comments
Post a Comment