Bug 685

Summary: Unable to import log4j package when running build
Product: Chess Game - Group 24 Reporter: sskawle2-c
Component: ChessAssignee: gsalter2-c
Status: RESOLVED FIXED    
Severity: major CC: gsalter2-c, sskawle2-c
Priority: Normal    
Version: unspecified   
Hardware: PC   
OS: Mac OS   
Attachments: Error Message

Description sskawle2-c 2022-11-02 21:33:54 HKT
Created attachment 117 [details]
Error Message

Steps to Reproduce: 
Build jar file: mvn package 
Run jar file: java -cp target/chess-0.0.1-SNAPSHOT.jar chess.chess.App 
 
Expected Results:  
import log4j successfully
 
Actual Results: 
ClassNotFoundException on org.apache.log4j during compilation of jar file.
Comment 1 gsalter2-c 2022-11-02 21:38:50 HKT
And run the following code to build using the following commands: 
1. mvn assembly:assembly -DdescriptorId=jar-with-dependencies 
2. java -jar target/chess-1.0.jar
Comment 3 gsalter2-c 2022-11-02 21:48:49 HKT
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-assembly-plugin</artifactId>
    <configuration>
        <archive>
            <manifest>
                <mainClass>chess.chess.App</mainClass>
            </manifest>
        </archive>
        <appendAssemblyId>false</appendAssemblyId>
    </configuration>
</plugin>