- Where your maven folder open this folder and find out the setting.xml
-->Change the settings.xml
-->First Create A Maven project By using command prompt
mvn archetype:generate -DgroupId=com.kcm.garagefest -DartifactId=DemoExample -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
-->After creating this project and open command prompt and go to this project path of DemoExample
-->convert this project to eclipse
mvn eclipse:eclipse -Dwtpversion=2.0
-->import this project in eclipse
-->How to include third party jar file in maven
mvn install:install-file -Dfile=D:/bitcoin/bitcoinj-master/core/target/bitcoinj-core-0.15-SNAPSHOT.jar -DgroupId=org.bitcoinj -DartifactId=bitcoinj-core -Dversion=0.15-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=D:/bitcoin/bitcoinj-master/core/target/bitcoinj-core-0.15-SNAPSHOT-bundled.jar -DgroupId=org.bitcoinj -DartifactId=bitcoinj-bundled -Dversion=0.15-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=D:/bitcoin/bitcoinj-master/core/target/bitcoinj-core-0.15-SNAPSHOT-javadoc.jar -DgroupId=org.bitcoinj -DartifactId=bitcoinj-javadoc -Dversion=0.15-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=D:/bitcoin/bitcoinj-master/core/target/bitcoinj-core-0.15-SNAPSHOT-sources.jar -DgroupId=org.bitcoinj -DartifactId=bitcoinj-sources -Dversion=0.15-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=D:/Software/jars/peerbase-java.jar -DgroupId=org.kcm -DartifactId=peerbase-java -Dversion=1.0 -Dpackaging=jar
mvn install:install-file -Dfile=D:/Software/jars/peerbase-java.jar -DgroupId=com.kcm -DartifactId=example-app -Dversion=1.0 -Dpackaging=jar
-->Change the pom file
<dependency>
<groupId>org.bitcoinj</groupId>
<artifactId>bitcoinj-core</artifactId>
<version>0.15-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.bitcoinj</groupId>
<artifactId>bitcoinj-bundled</artifactId>
<version>0.15-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.bitcoinj</groupId>
<artifactId>bitcoinj-javadoc</artifactId>
<version>0.15-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.bitcoinj</groupId>
<artifactId>bitcoinj-sources</artifactId>
<version>0.15-SNAPSHOT</version>
</dependency>
I had a similar problem when running a spring web application in an Eclipse managed tomcat. I solved this problem by adding maven dependencies in the project's web deployment assembly.
Open the project's properties (e.g., right-click on the project's name in the project explorer and select "Properties").
Select "Deployment Assembly".
Click the "Add..." button on the right margin.
Select "Java Build Path Entries" from the menu of Directive Type and click "Next".
Select "Maven Dependencies" from the Java Build Path Entries menu and click "Finish".
You should see "Maven Dependencies" added to the Web Deployment Assembly definition.
After flow the below step:
If you find this post helpful, I would really appreciate if you can share it with your friends. Also you can check more questions and analysis here.