Home > Mobile >  which dependencies to delete from Eclipse for maven project imported from Spring
which dependencies to delete from Eclipse for maven project imported from Spring

Time:09-30

can someone tell me which addictions I need to delete in Eclipse?It is a project imported from spring. On the old workspace the program works but the pc crashes because it is a maven project in eclipse and I have 294 dependencies that are in contrast with each other. As it was an imported project from spring, the server was integrated and I was told that the unexecuted server had the new code, according to the stacktrace. So I created a new workspace with a dynamic web project, removed the methods from the controller and made a separate servlet for each method, with a separate jsp page, removing the annotations for the path and placing the references on the web. xml. With the new workspace the pc doesn't crash but the page doesn't work and the stacktrace doesn't tell me anything about what the problem is.

So I don't know what to do, whether to continue on the old workspace or the new one.

This is the pom:

    <?xml version="1.0" encoding="UTF-8"?>
 <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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.4</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.giuggiola</groupId>
    <artifactId>Parlamento</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>bootjpa</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>18</java.version>
        
        
    <failOnMissingWebXml>false</failOnMissingWebXml>

    </properties>
    
    <dependencies>
    
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <version>2.7.3</version>
    <!--
    <exclusions>
        <exclusion>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
        </exclusion>
    </exclusions>
    -->
    </dependency>

        <!-- https://mvnrepository.com/artifact/org.springframework/spring-expression -->
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-expression</artifactId>
    <version>5.3.22</version>
</dependency>
    
    
    
    <!-- https://mvnrepository.com/artifact/com.zaxxer/HikariCP -->
<dependency>
    <groupId>com.zaxxer</groupId>
    <artifactId>HikariCP</artifactId>
  <!--    <version>
      5.0.1
    </version> -->
</dependency>
    
    
    
    <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-elasticsearch -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
    <!--    <scope>runtime</scope> -->
         <version>2.6.3</version> <!--$NO-MVN-MAN-VER$-->
</dependency>
    
    
    <!-- https://mvnrepository.com/artifact/org.elasticsearch/elasticsearch 
<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>7.7.0</version>
</dependency>
    -->
    <!-- https://mvnrepository.com/artifact/org.elasticsearch.client/elasticsearch-rest-high-level-client 
<dependency>
    <groupId>org.elasticsearch.client</groupId>
    <artifactId>elasticsearch-rest-high-level-client</artifactId>
    <version>7.17.0</version>
</dependency>
-->


<!-- https://mvnrepository.com/artifact/org.elasticsearch/elasticsearch 
<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>8.0.0</version>
</dependency>
-->
    
    
    <!-- https://mvnrepository.com/artifact/org.apache.derby/derby 
<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <scope>runtime</scope>
      <version>10.15.2.0</version> 
    <scope>test</scope>
</dependency>
    
    -->
    <!-- https://mvnrepository.com/artifact/com.google.guava/guava 
<dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>31.0.1-jre</version>
</dependency>
    -->
    <dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>19.0</version>
</dependency>

    
    <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-dbcp2 
<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-dbcp2</artifactId>
    <version>2.0</version>
</dependency>
    
    <dependency>
  <groupId>commons-dbcp</groupId>
  <artifactId>commons-dbcp</artifactId>
  <version>1.4</version>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
         <version>2.6.2</version> <!--$NO-MVN-MAN-VER$-->
   
         <exclusions>
            <exclusion>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot</artifactId>
            </exclusion>
         </exclusions>
</dependency>
    
      
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
    <!-- 
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
-->
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>
        
        
        
        
        
        <dependency>
    <groupId>com.vladmihalcea</groupId>
    <artifactId>hibernate-types-55</artifactId>
    <version>2.14.0</version>
  </dependency> 
        
        <!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-jasper -->
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-jasper</artifactId>
    <version>9.0.52</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-xml 
<dependency>
    <groupId>com.fasterxml.jackson.dataformat</groupId>
    <artifactId>jackson-dataformat-xml</artifactId>
    <version>2.12.4</version>
</dependency>
-->
<!--  
<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-entitymanager</artifactId>
    <version>4.3.9.Final</version>
</dependency>
-->
<!-- Thanks for using https://jar-download.com -->

<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-jasper</artifactId>
    <scope>provided</scope>
</dependency>

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jstl</artifactId>
</dependency>
        
        <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
      <version>1.18.22</version> <!--$NO-MVN-MAN-VER$-->
    <scope>provided</scope>
</dependency>
 
<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok-maven</artifactId>
    <version>1.18.20.0</version>
    <type>pom</type>
</dependency>


<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-test</artifactId>
   <!--  <version>2.6.4</version>  -->
    <scope>test</scope>
    <exclusions>
        <exclusion>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
        </exclusion>
    </exclusions>
</dependency>

<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.6.4</version>
    <type>pom</type>
</dependency>

<!-- https://mvnrepository.com/artifact/javax.persistence/javax.persistence-api 
<dependency>
    <groupId>javax.persistence</groupId>
    <artifactId>javax.persistence-api</artifactId>
    <version>2.2</version>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
    <groupId>org.junit.jupiter</groupId>
    <artifactId>junit-jupiter-api</artifactId>
    <version>5.9.0</version>
    <scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.tomcat.maven/common-tomcat-maven-plugin -->
<dependency>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>common-tomcat-maven-plugin</artifactId>
    <version>2.2</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-core
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-core</artifactId>
    <version>9.0.52</version>
</dependency>
-->

    </dependencies> 
    

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <!--
             <plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-compiler-plugin</artifactId>

                <version>2.3.2</version>

                <configuration>

                    <source>${java-version}</source>

                    <target>${java-version}</target>

                </configuration>

            </plugin>
-->
<!--
            <plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-dependency-plugin</artifactId>

                <executions>

                    <execution>

                        <id>install</id>

                        <phase>install</phase>

                        <goals>

                            <goal>sources</goal>

                        </goals>

                    </execution>

                </executions>

            </plugin>
            -->
<!--
            <plugin>

                <groupId>org.apache.tomcat.maven</groupId>

                <artifactId>tomcat-maven-plugin</artifactId>

                <configuration>

                    <path>/</path>

                    <httpsPort>8443</httpsPort>

                    <keystoreFile>${basedir}/other/keystore.jks</keystoreFile>

                    <keystorePass>secret</keystorePass>

                </configuration>

            </plugin>
            -->
        </plugins>
        
        
        
    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <filtering>true</filtering>
        </resource>
    </resources>
   

    </build>

</project>

    mvn dependency:tree -Dverbose

[INFO] Scanning for projects...

[INFO]

[INFO] ----------------------< com.giuggiola:Parlamento >----------------------

[INFO] Building bootjpa 0.0.1-SNAPSHOT

[INFO] --------------------------------[ jar ]---------------------------------

[INFO]

[INFO] --- maven-dependency-plugin:3.1.2:tree (default-cli) @ Parlamento ---

[INFO] Verbose not supported since maven-dependency-plugin 3.0

[INFO] com.giuggiola:Parlamento:jar:0.0.1-SNAPSHOT

[INFO]  - org.springframework.boot:spring-boot-starter-web:jar:2.7.3:compile

[INFO] |   - org.springframework.boot:spring-boot-starter:jar:2.5.4:compile

[INFO] |  |   - org.springframework.boot:spring-boot:jar:2.5.4:compile

[INFO] |  |   - org.springframework.boot:spring-boot-starter-logging:jar:2.5.4:compile

[INFO] |  |  |   - ch.qos.logback:logback-classic:jar:1.2.5:compile

[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.2.5:compile

[INFO] |  |  |   - org.apache.logging.log4j:log4j-to-slf4j:jar:2.14.1:compile

[INFO] |  |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.14.1:compile

[INFO] |  |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.32:compile

[INFO] |  |   - jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile

[INFO] |  |  \- org.yaml:snakeyaml:jar:1.28:compile

[INFO] |   - org.springframework.boot:spring-boot-starter-json:jar:2.5.4:compile

[INFO] |  |   - com.fasterxml.jackson.core:jackson-databind:jar:2.12.4:compile

[INFO] |  |   - com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.12.4:compile

[INFO] |  |   - com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.12.4:compile

[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.12.4:compile

[INFO] |   - org.springframework.boot:spring-boot-starter-tomcat:jar:2.5.4:compile

[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.52:compile

[INFO] |   - org.springframework:spring-web:jar:5.3.9:compile

[INFO] |  |  \- org.springframework:spring-beans:jar:5.3.9:compile

[INFO] |  \- org.springframework:spring-webmvc:jar:5.3.9:compile

[INFO] |      - org.springframework:spring-aop:jar:5.3.9:compile

[INFO] |     \- org.springframework:spring-context:jar:5.3.9:compile

[INFO]  - org.springframework:spring-expression:jar:5.3.22:compile

[INFO] |  \- org.springframework:spring-core:jar:5.3.9:compile

[INFO] |     \- org.springframework:spring-jcl:jar:5.3.9:compile

[INFO]  - com.zaxxer:HikariCP:jar:4.0.3:compile

[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.32:compile
[INFO]  - org.springframework.boot:spring-boot-starter-data-elasticsearch:jar:2.6.3:compile

[INFO] |  \- org.springframework.data:spring-data-elasticsearch:jar:4.2.4:compile

[INFO] |      - org.springframework:spring-tx:jar:5.3.9:compile

[INFO] |      - org.springframework.data:spring-data-commons:jar:2.5.4:compile

[INFO] |      - org.elasticsearch.plugin:transport-netty4-client:jar:7.12.1:compile

[INFO] |     |   - io.netty:netty-buffer:jar:4.1.67.Final:compile

[INFO] |     |   - io.netty:netty-codec:jar:4.1.67.Final:compile

[INFO] |     |   - io.netty:netty-codec-http:jar:4.1.67.Final:compile

[INFO] |     |   - io.netty:netty-common:jar:4.1.67.Final:compile

[INFO] |     |   - io.netty:netty-handler:jar:4.1.67.Final:compile

[INFO] |     |   - io.netty:netty-resolver:jar:4.1.67.Final:compile

[INFO] |     |  \- io.netty:netty-transport:jar:4.1.67.Final:compile

[INFO] |      - org.elasticsearch.client:elasticsearch-rest-high-level-client:jar:7.12.1:compile

[INFO] |     |   - org.elasticsearch:elasticsearch:jar:7.12.1:compile

[INFO] |     |  |   - org.elasticsearch:elasticsearch-core:jar:7.12.1:compile

[INFO] |     |  |   - org.elasticsearch:elasticsearch-secure-sm:jar:7.12.1:compile

[INFO] |     |  |   - org.elasticsearch:elasticsearch-x-content:jar:7.12.1:compile

[INFO] |     |  |  |   - com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.12.4:compile

[INFO] |     |  |  |   - com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.12.4:compile

[INFO] |     |  |  |  \- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.12.4:compile

[INFO] |     |  |   - org.elasticsearch:elasticsearch-geo:jar:7.12.1:compile

[INFO] |     |  |   - org.apache.lucene:lucene-core:jar:8.8.0:compile

[INFO] |     |  |   - org.apache.lucene:lucene-analyzers-common:jar:8.8.0:compile

[INFO] |     |  |   - org.apache.lucene:lucene-backward-codecs:jar:8.8.0:compile

[INFO] |     |  |   - org.apache.lucene:lucene-grouping:jar:8.8.0:compile

[INFO] |     |  |   - org.apache.lucene:lucene-highlighter:jar:8.8.0:compile

[INFO] |     |  |   - org.apache.lucene:lucene-join:jar:8.8.0:compile

[INFO] |     |  |   - org.apache.lucene:lucene-memory:jar:8.8.0:compile

[INFO] |     |  |   - org.apache.lucene:lucene-misc:jar:8.8.0:compile

[INFO] |     |  |   - org.apache.lucene:lucene-queries:jar:8.8.0:compile

[INFO] |     |  |   - org.apache.lucene:lucene-queryparser:jar:8.8.0:compile

[INFO] |     |  |   - org.apache.lucene:lucene-sandbox:jar:8.8.0:compile

[INFO] |     |  |   - org.apache.lucene:lucene-spatial-extras:jar:8.8.0:compile

[INFO] |     |  |   - org.apache.lucene:lucene-spatial3d:jar:8.8.0:compile

[INFO] |     |  |   - org.apache.lucene:lucene-suggest:jar:8.8.0:compile

[INFO] |     |  |   -org.elasticsearch:elasticsearch-cli:jar:7.12.1:compile

[INFO] |     |  |  |  \- net.sf.jopt-simple:jopt-simple:jar:5.0.2:compile

[INFO] |     |  |   - com.carrotsearch:hppc:jar:0.8.1:compile

[INFO] |     |  |   - joda-time:joda-time:jar:2.10.4:compile

[INFO] |     |  |   - com.tdunning:t-digest:jar:3.2:compile

[INFO] |     |  |   - org.hdrhistogram:HdrHistogram:jar:2.1.9:compile

[INFO] |     |  |   - org.elasticsearch:jna:jar:5.7.0-1:compile

[INFO] |     |  |  \- org.elasticsearch:elasticsearch-plugin-classloader:jar:7.12.1:runtime

[INFO] |     |   - org.elasticsearch.client:elasticsearch-rest-client:jar:7.12.1:compile

[INFO] |     |  |   - org.apache.httpcomponents:httpasyncclient:jar:4.1.4:compile

[INFO] |     |  |  \- org.apache.httpcomponents:httpcore-nio:jar:4.4.14:compile

[INFO] |     |   - org.elasticsearch.plugin:mapper-extras-client:jar:7.12.1:compile

[INFO] |     |   - org.elasticsearch.plugin:parent-join-client:jar:7.12.1:compile

[INFO] |     |   - org.elasticsearch.plugin:aggs-matrix-stats-client:jar:7.12.1:compile

[INFO] |     |   - org.elasticsearch.plugin:rank-eval-client:jar:7.12.1:compile

[INFO] |     |  \- org.elasticsearch.plugin:lang-mustache-client:jar:7.12.1:compile

[INFO] |     |     \- com.github.spullara.mustache.java:compiler:jar:0.9.6:compile

[INFO] |     \- com.fasterxml.jackson.core:jackson-core:jar:2.12.4:compile

[INFO]  - com.google.guava:guava:jar:19.0:compile

[INFO]  - org.springframework.boot:spring-boot-devtools:jar:2.6.2:compile

[INFO] |  \- org.springframework.boot:spring-boot-autoconfigure:jar:2.5.4:compile

[INFO]  - org.springframework.boot:spring-boot-starter-data-jpa:jar:2.5.4:compile

[INFO] |   - org.springframework.boot:spring-boot-starter-aop:jar:2.5.4:compile

[INFO] |  |  \- org.aspectj:aspectjweaver:jar:1.9.7:compile

[INFO] |   - org.springframework.boot:spring-boot-starter-jdbc:jar:2.5.4:compile

[INFO] |  |  \- org.springframework:spring-jdbc:jar:5.3.9:compile

[INFO] |   - jakarta.transaction:jakarta.transaction-api:jar:1.3.3:compile

[INFO] |   - jakarta.persistence:jakarta.persistence-api:jar:2.2.3:compile

[INFO] |   - org.hibernate:hibernate-core:jar:5.4.32.Final:compile

[INFO] |  |   - org.jboss.logging:jboss-logging:jar:3.4.2.Final:compile

[INFO] |  |   - org.javassist:javassist:jar:3.27.0-GA:compile

[INFO] |  |   - net.bytebuddy:byte-buddy:jar:1.10.22:compile

[INFO] |  |   - antlr:antlr:jar:2.7.7:compile

[INFO] |  |   - org.jboss:jandex:jar:2.2.3.Final:compile

[INFO] |  |   - com.fasterxml:classmate:jar:1.5.1:compile

[INFO] |  |   - org.dom4j:dom4j:jar:2.1.3:compile

[INFO] |  |   - org.hibernate.common:hibernate-commons-annotations:jar:5.1.2.Final:compile

[INFO] |  |  \- org.glassfish.jaxb:jaxb-runtime:jar:2.3.5:compile

[INFO] |  |      - org.glassfish.jaxb:txw2:jar:2.3.5:compile

[INFO] |  |      - com.sun.istack:istack-commons-runtime:jar:3.0.12:compile

[INFO] |  |     \- com.sun.activation:jakarta.activation:jar:1.2.2:runtime

[INFO] |   - org.springframework.data:spring-data-jpa:jar:2.5.4:compile

[INFO] |  |  \- org.springframework:spring-orm:jar:5.3.9:compile

[INFO] |  \- org.springframework:spring-aspects:jar:5.3.9:compile

[INFO]  - org.postgresql:postgresql:jar:42.2.23:runtime

[INFO] |  \- org.checkerframework:checker-qual:jar:3.5.0:runtime

[INFO]  - com.vladmihalcea:hibernate-types-55:jar:2.14.0:compile

[INFO] |  \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.12.4:compile

[INFO] |      - com.fasterxml.jackson.core:jackson-annotations:jar:2.12.4:compile

[INFO] |     \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile

[INFO]  - org.apache.tomcat:tomcat-jasper:jar:9.0.52:compile

[INFO] |   - org.apache.tomcat:tomcat-servlet-api:jar:9.0.52:compile

[INFO] |   - org.apache.tomcat:tomcat-juli:jar:9.0.52:compile

[INFO] |   - org.apache.tomcat:tomcat-jsp-api:jar:9.0.52:compile

[INFO] |   - org.apache.tomcat:tomcat-el-api:jar:9.0.52:compile

[INFO] |   - org.eclipse.jdt:ecj:jar:3.26.0:compile

[INFO] |   - org.apache.tomcat:tomcat-jasper-el:jar:9.0.52:compile

[INFO] |   - org.apache.tomcat:tomcat-api:jar:9.0.52:compile

[INFO] |  \- org.apache.tomcat:tomcat-util-scan:jar:9.0.52:compile

[INFO] |     \- org.apache.tomcat:tomcat-util:jar:9.0.52:compile

[INFO]  - org.apache.tomcat.embed:tomcat-embed-jasper:jar:9.0.52:provided

[INFO] |   - org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.52:compile

[INFO] |  |  \- org.apache.tomcat:tomcat-annotations-api:jar:9.0.52:compile

[INFO] |  \- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.52:compile

[INFO]  - javax.servlet:jstl:jar:1.2:compile

[INFO]  - org.projectlombok:lombok:jar:1.18.22:provided

[INFO]  - org.projectlombok:lombok-maven:pom:1.18.20.0:compile

[INFO]  - org.springframework.boot:spring-boot-starter-test:jar:2.5.4:test

[INFO] |   - org.springframework.boot:spring-boot-test:jar:2.5.4:test

[INFO] |   - org.springframework.boot:spring-boot-test-autoconfigure:jar:2.5.4:test

[INFO] |   - com.jayway.jsonpath:json-path:jar:2.5.0:test

[INFO] |  |  \- net.minidev:json-smart:jar:2.4.7:test
[INFO] |  |     \- net.minidev:accessors-smart:jar:2.4.7:test

[INFO] |  |        \- org.ow2.asm:asm:jar:9.1:test
[INFO] |   - jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile

[INFO] |   - org.assertj:assertj-core:jar:3.19.0:test

[INFO] |   - org.hamcrest:hamcrest:jar:2.2:compile

[INFO] |   - org.junit.jupiter:junit-jupiter:jar:5.7.2:test

[INFO] |  |   - org.junit.jupiter:junit-jupiter-params:jar:5.7.2:test

[INFO] |  |  \- org.junit.jupiter:junit-jupiter-engine:jar:5.7.2:test

[INFO] |  |     \- org.junit.platform:junit-platform-engine:jar:1.7.2:test

[INFO] |   - org.mockito:mockito-core:jar:3.9.0:test

[INFO] |  |   - net.bytebuddy:byte-buddy-agent:jar:1.10.22:test

[INFO] |  |  \- org.objenesis:objenesis:jar:3.2:test

[INFO] |   - org.mockito:mockito-junit-jupiter:jar:3.9.0:test

[INFO] |   - org.skyscreamer:jsonassert:jar:1.5.0:test

[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test

[INFO] |   - org.springframework:spring-test:jar:5.3.9:test

[INFO] |  \- org.xmlunit:xmlunit-core:jar:2.8.2:test

[INFO]  - org.springframework.boot:spring-boot-starter-parent:pom:2.6.4:compile

[INFO]  - org.junit.jupiter:junit-jupiter-api:jar:5.9.0:test

[INFO] |   - org.opentest4j:opentest4j:jar:1.2.0:test

[INFO] |   - org.junit.platform:junit-platform-commons:jar:1.7.2:test

[INFO] |  \- org.apiguardian:apiguardian-api:jar:1.1.2:test

[INFO] \- org.apache.tomcat.maven:common-tomcat-maven-plugin:jar:2.2:compile

[INFO]     - org.apache.maven:maven-plugin-api:jar:2.2.1:compile

[INFO]     - org.apache.maven:maven-project:jar:2.2.1:compile

[INFO]    |   - org.apache.maven:maven-settings:jar:2.2.1:compile

[INFO]    |   - org.apache.maven:maven-profile:jar:2.2.1:compile

[INFO]    |   - org.apache.maven:maven-model:jar:2.2.1:compile

[INFO]    |   - org.apache.maven:maven-artifact-manager:jar:2.2.1:compile

[INFO]    |  |   - org.apache.maven:maven-repository-metadata:jar:2.2.1:compile

[INFO]    |  |   - org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:compile

[INFO]    |  |  \- backport-util-concurrent:backport-util-concurrent:jar:3.1:compile

[INFO]    |   - org.apache.maven:maven-plugin-registry:jar:2.2.1:compile

[INFO]    |   - org.codehaus.plexus:plexus-interpolation:jar:1.11:compile

[INFO]    |   - org.codehaus.plexus:plexus-utils:jar:1.5.15:compile

[INFO]    |   - org.apache.maven:maven-artifact:jar:2.2.1:compile

[INFO]    |  \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile

[INFO]    |      - junit:junit:jar:4.13.2:compile

[INFO]    |     |  \- org.hamcrest:hamcrest-core:jar:2.2:compile

[INFO]    |     \- classworlds:classworlds:jar:1.1-alpha-2:compile

[INFO]     - org.apache.maven:maven-archiver:jar:2.4.2:compile

[INFO]     - org.codehaus.plexus:plexus-archiver:jar:2.1.1:compile

[INFO]    |  \- org.codehaus.plexus:plexus-io:jar:2.0.3:compile

[INFO]     - commons-io:commons-io:jar:2.2:compile

[INFO]     - org.apache.httpcomponents:httpclient:jar:4.5.13:compile

[INFO]    |  \- org.apache.httpcomponents:httpcore:jar:4.4.14:compile

[INFO]     - org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile

[INFO]     - commons-codec:commons-codec:jar:1.15:compile

[INFO]    \- commons-lang:commons-lang:jar:2.6:compile

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

CodePudding user response:

You should undo all your changes and fix the dependency mess.

<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.4</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.giuggiola</groupId>
    <artifactId>Parlamento</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>bootjpa</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>18</java.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>

        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>com.vladmihalcea</groupId>
            <artifactId>hibernate-types-55</artifactId>
            <version>2.14.0</version>
        </dependency>
       
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>


    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>

</project>

Should make the project work. There was a bunch of different versions for Spring, some weird plugin dependencies and imports of poms that aren't needed. I used the most recent version of Spring Boot 2.7.4 if you need something lower change the parent (and only change that nothing else).

As stated the problem wasn't Spring or the number of dependencies (well maybe it was) but removing Spring and doing everything manually with plain servlets and JSP isn't the solution.

As you apparently want (or use) JSP those will only work in a .war file not in a .jar file. If you want that you need to change the packaging to a war file and include the spring-boot-starter-tomcat dependency with a scope of provided.

  • Related