How to create a JAR file from a maven project which import scripts from another java project

44 Views Asked by At

I have created a project, project1. I have to use project2 (https://github.com/bhlangonijr/chesslib).

I included the files of project2 that I need in my class of project1 which is using them as the following :

import com.github.bhlangonijr.chesslib.Board;
import com.github.bhlangonijr.chesslib.move.Move;
import com.github.bhlangonijr.chesslib.move.MoveList;
import com.github.bhlangonijr.chesslib.Piece;

I added project2 in the Java Build Path.

My goal is to create a JAR file which can be added to Arena (a chess GUI).

However, when I'm creating a JAR file, when I select the resources to export, if I just select project1 obviously it doesn't work. If I select the 2 projects, it doesn't work either. I specify that I included the main class of project1 which I want it to execute in the MANIFEST.MF of the JAR file.

I don't know if my problem is clear.

Thanks in advance for any response.

0

There are 0 best solutions below