пружинный багажник 1.5.1 с java 7 не может быть собран - PullRequest
0 голосов
/ 09 апреля 2020

Я создаю простое приложение с java 8 в весенней загрузке 2, и я могу собрать его и работать с ним. Но теперь я хочу, чтобы это же приложение работало с java 7. Но при этом я получаю ошибку сборки. Я также пытался использовать весеннюю загрузку 1.5.1, но результат тот же.
Вот моя консоль, когда я пытался чтобы построить мой проект с JDK 1.7.0_80 и ниже, ошибки, которые я получаю. Я просто хочу правильно собрать и запустить приложение в java 7, вот что мне нужно [INFO] --- spring-boot-maven-plugin: 1.5.1.RELEASE: repackage (по умолчанию) @ checkDate11 [INFO] - -------------------------------------------------- --------------------- [INFO] ОТКАЗ В СТРОИТЕЛЬСТВЕ [INFO] --------------------- -------------------------------------------------- - [ИНФО] Общее время: 3,878 с [ИНФО] Окончание: 2020-04-09T12: 49: 36-07: 00 [ИНФО] ------------------- -------------------------------------------------- --- [ПРЕДУПРЕЖДЕНИЕ] Запрошенный профиль "pom. xml" не может быть активирован, поскольку он не существует.

   [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.1.RELEASE:repackage (default) on project checkDate11: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.1.RELEASE:repackage failed: Plugin org.springframework.boot:spring-boot-maven-plugin:1.5.1.RELEASE or one of its dependencies could not be resolved: Failed to collect dependencies at org.springframework.boot:spring-boot-maven-plugin:jar:1.5.1.RELEASE -> org.springframework.boot:spring-boot-loader-tools:jar:1.5.1.RELEASE: Failed to read artifact descriptor for org.springframework.boot:spring-boot-loader-tools:jar:1.5.1.RELEASE: Could not transfer artifact org.springframework.boot:spring-boot-loader-tools:pom:1.5.1.RELEASE from/to central (https://repo.maven.apache.org/maven2): Cannot access https://repo.maven.apache.org/maven2 with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access https://repo.maven.apache.org/maven2 using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
[ERROR]       role: org.apache.maven.wagon.Wagon
[ERROR]   roleHint: https
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException  


 here is my pom file for my project it is same as that of application that run in java 8, the java version and spring boot version are the only changes

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>1.5.1.RELEASE</version>
    <relativePath/> 

</parent>
<groupId>com.gbs</groupId>
<artifactId>checkDate11</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>TEST</name>

<description>Send Date</description>

<properties>
    <java.version>1.7</java.version>

</properties>

<dependencies>

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

        <groupId>com.googlecode.json-simple</groupId>  
        <artifactId>json-simple</artifactId>  
        <version>1.1</version>  
      </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>

            <configuration>
                <archive>
                  <manifest>

                    <addClasspath>true</addClasspath>
                    <classpathPrefix>lib/</classpathPrefix>
                    <mainClass>com.gbs.checkDate.TestApplication</mainClass>

                  </manifest>
                </archive>

              </configuration> 

        </plugin>

    </plugins>

</build>

...