Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
114 views
in Technique[技术] by (71.8m points)

java - jar not created properly mvn relase

I tried to create jar for a service A, which needs to be imported into service B. when I ran the below command

mvn release:prepare release:perform -Darguments="-DenvironmentName=<env>"

the jar got created but I am not able to import it into the service B. Error says "Cannot resolve symbol".

My guess is that the jar is not created properly, since it has these 3 folders:

  • BOOT-INF
  • META-INF
  • org.springframework.boot.loader

when. my service name path is like in.xyz.abc.commons, there is no folder of this name in the jar

question from:https://stackoverflow.com/questions/65901919/jar-not-created-properly-mvn-relase

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If a JAR was created with the spring boot parent, it cannot be used as dependency.

So if A is a Spring boot service, it cannot be used in B.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...