esoe 2 years ago
parent
commit
0f52ba1c00
  1. 214
      pom copy.xml
  2. 26
      pom.xml
  3. 4
      src/main/java/ru/egspt/ReportPane.java
  4. 2
      src/main/java/ru/egspt/ReportTableModel.java
  5. BIN
      target/classes/ru/egspt/ReportPane.class
  6. BIN
      target/classes/ru/egspt/ReportTableModel.class
  7. 5
      target/maven-archiver/pom.properties
  8. 20
      target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  9. 20
      target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  10. BIN
      target/moodle-anyreport-0.1-jar-with-dependencies.jar
  11. BIN
      target/moodle-anyreport-0.1.jar

214
pom copy.xml

@ -1,214 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ru.egspt</groupId>
<artifactId>moodle-anyreport</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.6.0</junit.version>
<maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
<maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
<checkstyle.version>8.39</checkstyle.version>
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
<jacoco-maven-plugin.version>0.8.4</jacoco-maven-plugin.version>
<maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
<!-- JaCoCo thresholds. Increase gradually as you add tests. -->
<jacoco.unit-tests.limit.instruction-ratio>0%</jacoco.unit-tests.limit.instruction-ratio>
<jacoco.unit-tests.limit.branch-ratio>0%</jacoco.unit-tests.limit.branch-ratio>
<jacoco.unit-tests.limit.class-complexity>20</jacoco.unit-tests.limit.class-complexity>
<jacoco.unit-tests.limit.method-complexity>5</jacoco.unit-tests.limit.method-complexity>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>5.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>ooxml-schemas</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId> org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
<version>4.0.3</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.28</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven-enforcer-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.6.3</version>
</requireMavenVersion>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
<dependency>
<groupId>com.github.ngeor</groupId>
<artifactId>checkstyle-rules</artifactId>
<version>4.8.0</version>
</dependency>
</dependencies>
<configuration>
<configLocation>com/github/ngeor/checkstyle.xml</configLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<skip>${skipTests}</skip>
</configuration>
<executions>
<execution>
<id>checkstyle</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>check-unit-test</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/jacoco.exec</dataFile>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco.unit-tests.limit.instruction-ratio}</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco.unit-tests.limit.branch-ratio}</minimum>
</limit>
</limits>
</rule>
<rule>
<element>CLASS</element>
<limits>
<limit>
<counter>COMPLEXITY</counter>
<value>TOTALCOUNT</value>
<maximum>${jacoco.unit-tests.limit.class-complexity}</maximum>
</limit>
</limits>
</rule>
<rule>
<element>METHOD</element>
<limits>
<limit>
<counter>COMPLEXITY</counter>
<value>TOTALCOUNT</value>
<maximum>${jacoco.unit-tests.limit.method-complexity}</maximum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
</plugin>
</plugins>
</reporting>
</project>

26
pom.xml

@ -171,24 +171,30 @@
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<phase>package</phase>
<goals> <goals>
<goal>shade</goal> <goal>single</goal>
</goals> </goals>
<configuration> <configuration>
<shadedArtifactAttached>true</shadedArtifactAttached> <archive>
<transformers> <manifest>
<transformer implementation= <mainClass>
"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <!-- JaCoCo thresholds. Increase gradually as you add tests. -->
<mainClass>org.baeldung.executable.ExecutableMavenJar</mainClass> <!-- org.baeldung.executable.ExecutableMavenJar -->
</transformer> ru.egspt.App
</transformers> </mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<reporting> <reporting>

4
src/main/java/ru/egspt/ReportPane.java

@ -16,7 +16,7 @@ public class ReportPane extends JPanel {
private JPanel reportTablePane = new JPanel(); private JPanel reportTablePane = new JPanel();
private ReportTableModel reportTableModel; private ReportTableModel reportTableModel;
private JTable reportTable; private JTable reportTable;
private JPanel reportTextPane = new JPanel(); //private JPanel reportTextPane = new JPanel();
private JPanel reportControlsPane = new JPanel(); private JPanel reportControlsPane = new JPanel();
private JButton getExcellReportButton = new JButton(); private JButton getExcellReportButton = new JButton();
private JFileChooser reportPathChooser = null; private JFileChooser reportPathChooser = null;
@ -59,7 +59,7 @@ public class ReportPane extends JPanel {
reportTable.getColumnModel().getColumn(i).setHeaderValue(reportTableModel.getHeader()[i]); reportTable.getColumnModel().getColumn(i).setHeaderValue(reportTableModel.getHeader()[i]);
i++; i++;
} }
reportTable.setAutoResizeMode(reportTable.AUTO_RESIZE_OFF); reportTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
JScrollPane scrollPane = new JScrollPane(reportTable, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); JScrollPane scrollPane = new JScrollPane(reportTable, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
reportTablePane.setLayout(new BorderLayout()); reportTablePane.setLayout(new BorderLayout());

2
src/main/java/ru/egspt/ReportTableModel.java

@ -290,7 +290,7 @@ public class ReportTableModel extends AbstractTableModel{
XSSFSheet sheet = book.getSheetAt(0); XSSFSheet sheet = book.getSheetAt(0);
int height = sheet.getLastRowNum();//количество строк в таблице int height = sheet.getLastRowNum();//количество строк в таблице
Row row = sheet.getRow(0); Row row = sheet.getRow(0);
int wide = row.getLastCellNum();//количество столбцов в таблице (первые 5 столбцов должны жестко соответствовать шаблону) //int wide = row.getLastCellNum();//количество столбцов в таблице (первые 5 столбцов должны жестко соответствовать шаблону)
//перебираем строки файла //перебираем строки файла
int i = 0; int i = 0;
while (i < height){ while (i < height){

BIN
target/classes/ru/egspt/ReportPane.class

Binary file not shown.

BIN
target/classes/ru/egspt/ReportTableModel.class

Binary file not shown.

5
target/maven-archiver/pom.properties

@ -0,0 +1,5 @@
#Generated by Maven
#Mon Jun 27 14:37:18 MSK 2022
version=0.1
groupId=ru.egspt
artifactId=moodle-anyreport

20
target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@ -0,0 +1,20 @@
ru\egspt\TagControls.class
ru\egspt\ResultsTableModel.class
ru\egspt\User.class
ru\egspt\App.class
ru\egspt\QuizesTableModel.class
ru\egspt\TagModel.class
ru\egspt\BaseControls.class
ru\egspt\ReportTableModel.class
ru\egspt\Result.class
ru\egspt\AccessPane.class
ru\egspt\DataPane.class
ru\egspt\Quiz.class
ru\egspt\Access.class
ru\egspt\Base.class
ru\egspt\UsersTableModel.class
ru\egspt\ReportControls.class
ru\egspt\UserListModel.class
ru\egspt\TagPane.class
ru\egspt\Data.class
ru\egspt\ReportPane.class

20
target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@ -0,0 +1,20 @@
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\TagPane.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\QuizesTableModel.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\TagModel.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\AccessPane.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\BaseControls.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\DataPane.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\Data.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\ReportTableModel.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\ResultsTableModel.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\Access.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\App.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\Base.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\User.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\UsersTableModel.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\ReportControls.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\UserListModel.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\Result.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\TagControls.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\ReportPane.java
c:\Users\devuser\Documents\code\moodle\moodle-anyreport\src\main\java\ru\egspt\Quiz.java

BIN
target/moodle-anyreport-0.1-jar-with-dependencies.jar

Binary file not shown.

BIN
target/moodle-anyreport-0.1.jar

Binary file not shown.
Loading…
Cancel
Save