First class
This commit is contained in:
parent
334b2f77af
commit
161950de5c
@ -6,7 +6,7 @@
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="PRA2024" />
|
||||
<module name="Pracownia2020-2021" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel target="17">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
@ -7,7 +7,7 @@
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="corretto-17" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="liberica-17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/PRA2024.iml" filepath="$PROJECT_DIR$/.idea/PRA2024.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
25
pom.xml
25
pom.xml
@ -12,4 +12,29 @@
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<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>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -1,8 +1,12 @@
|
||||
package introduction;
|
||||
|
||||
public class HelloWorld {
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
public static void main(String [ ] args) {
|
||||
System.out.println("Hello! Witaj!");
|
||||
public class HelloWorld {
|
||||
static Logger log = Logger.getLogger("name");
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello World!");{
|
||||
log.info("message");
|
||||
}
|
||||
}
|
||||
}
|
16
src/main/resources/log4j.properties
Normal file
16
src/main/resources/log4j.properties
Normal file
@ -0,0 +1,16 @@
|
||||
# Root logger option
|
||||
log4j.rootLogger=DEBUG, stdout, file
|
||||
|
||||
# Redirect log messages to console
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
|
||||
|
||||
# Redirect log messages to a log file, support file rolling.
|
||||
log4j.appender.file=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.file.File=log.log
|
||||
log4j.appender.file.MaxFileSize=5MB
|
||||
log4j.appender.file.MaxBackupIndex=10
|
||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
|
BIN
target/Pracownia2020-2021-1.0-SNAPSHOT.jar
Normal file
BIN
target/Pracownia2020-2021-1.0-SNAPSHOT.jar
Normal file
Binary file not shown.
16
target/classes/log4j.properties
Normal file
16
target/classes/log4j.properties
Normal file
@ -0,0 +1,16 @@
|
||||
# Root logger option
|
||||
log4j.rootLogger=DEBUG, stdout, file
|
||||
|
||||
# Redirect log messages to console
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
|
||||
|
||||
# Redirect log messages to a log file, support file rolling.
|
||||
log4j.appender.file=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.file.File=log.log
|
||||
log4j.appender.file.MaxFileSize=5MB
|
||||
log4j.appender.file.MaxBackupIndex=10
|
||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
|
1
target/classes/test
Normal file
1
target/classes/test
Normal file
@ -0,0 +1 @@
|
||||
test resource file
|
3
target/maven-archiver/pom.properties
Normal file
3
target/maven-archiver/pom.properties
Normal file
@ -0,0 +1,3 @@
|
||||
artifactId=Pracownia2020-2021
|
||||
groupId=org.example
|
||||
version=1.0-SNAPSHOT
|
@ -0,0 +1 @@
|
||||
introduction\HelloWorld.class
|
@ -0,0 +1 @@
|
||||
J:\IdeaProjects\PRA2024\src\main\java\introduction\HelloWorld.java
|
Loading…
Reference in New Issue
Block a user