Fix
This commit is contained in:
parent
161950de5c
commit
701f5b4512
61
pom.xml
61
pom.xml
@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>Pracownia2020-2021</artifactId>
|
||||
<artifactId>Pracownia2024</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
@ -13,23 +13,6 @@
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>introduction.HelloWorld</mainClass>>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
@ -37,4 +20,46 @@
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<configuration>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<mainClass>introduction.HelloWorld</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>assemble-all</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-jar</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -3,10 +3,10 @@ package introduction;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
public class HelloWorld {
|
||||
|
||||
static Logger log = Logger.getLogger("name");
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello World!");{
|
||||
log.info("message");
|
||||
}
|
||||
public static void main(String [ ] args) {
|
||||
System.out.println("Hello! Witaj!");
|
||||
log.info("Message");
|
||||
}
|
||||
}
|
BIN
target/Pracownia2024-1.0-SNAPSHOT-jar-with-dependencies.jar
Normal file
BIN
target/Pracownia2024-1.0-SNAPSHOT-jar-with-dependencies.jar
Normal file
Binary file not shown.
BIN
target/classes/introduction/HelloWorld.class
Normal file
BIN
target/classes/introduction/HelloWorld.class
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user