Не получается задеплоить java приложение в heroku, 3 дня ломаю голову, почему?

Создал dynamic web application в эклипс. На локалхосте работает идеально, но когда я пытаюсь задеплоить его на heroku, выдает эту ошибку:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project BlagoDari: Compilation failure: Compilation failure:


В файле pom.xml я что только не пробовал менять, ничего не помогает...
Вот сам файл:
<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>
	<groupId>BlagoDari</groupId>
	<artifactId>BlagoDari</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>war</packaging>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
	</properties>
	<build>
		<sourceDirectory>src</sourceDirectory>
		<finalName>blagodari</finalName>
		<plugins>

			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<version>3.3.0</version>
				<configuration>
					<goal>war:inplace</goal>
					<outputDirectory>artifacts</outputDirectory>
					<webXml>WebContent\WEB-INF\web.xml</webXml>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>3.1.2</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>copy</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>com.heroku</groupId>
									<artifactId>webapp-runner</artifactId>
									<version>9.0.31.0</version>
									<destFileName>webapp-runner.jar</destFileName>
								</artifactItem>
							</artifactItems>
							<outputDirectory>artifacts</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<target>1.8</target>
					<source>1.8</source>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.49</version>
		</dependency>

		<dependency>
			<groupId>javax.json</groupId>
			<artifactId>javax.json-api</artifactId>
			<version>1.1</version>
		</dependency>


	</dependencies>

</project>


Вот полный лог ошибок:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project BlagoDari: Compilation failure: Compilation failure: 
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[6,21] package javax.servlet does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[7,32] package javax.servlet.annotation does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[8,32] package javax.servlet.annotation does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[9,26] package javax.servlet.http does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[10,26] package javax.servlet.http does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[11,26] package javax.servlet.http does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[12,26] package javax.servlet.http does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[18,33] cannot find symbol
[ERROR]   symbol: class HttpServlet
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[16,2] cannot find symbol
[ERROR]   symbol: class WebServlet
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[17,2] cannot find symbol
[ERROR]   symbol: class MultipartConfig
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Models/DbHelper.java:[9,26] package javax.servlet.http does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Models/DbHelper.java:[10,26] package javax.servlet.http does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[27,30] cannot find symbol
[ERROR]   symbol:   class HttpServletRequest
[ERROR]   location: class Collectors.NewRequest
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[27,58] cannot find symbol
[ERROR]   symbol:   class HttpServletResponse
[ERROR]   location: class Collectors.NewRequest
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[28,32] cannot find symbol
[ERROR]   symbol:   class ServletException
[ERROR]   location: class Collectors.NewRequest
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[40,31] cannot find symbol
[ERROR]   symbol:   class HttpServletRequest
[ERROR]   location: class Collectors.NewRequest
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[40,59] cannot find symbol
[ERROR]   symbol:   class HttpServletResponse
[ERROR]   location: class Collectors.NewRequest
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/NewRequest.java:[41,32] cannot find symbol
[ERROR]   symbol:   class ServletException
[ERROR]   location: class Collectors.NewRequest
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Models/DbHelper.java:[197,47] cannot find symbol
[ERROR]   symbol:   class HttpServletRequest
[ERROR]   location: class Models.DbHelper
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Models/DbHelper.java:[206,36] cannot find symbol
[ERROR]   symbol:   class HttpServletRequest
[ERROR]   location: class Models.DbHelper
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Models/DbHelper.java:[471,53] cannot find symbol
[ERROR]   symbol:   class HttpServletRequest
[ERROR]   location: class Models.DbHelper
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Models/DbHelper.java:[539,55] cannot find symbol
[ERROR]   symbol:   class HttpServletRequest
[ERROR]   location: class Models.DbHelper
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/Login.java:[6,21] package javax.servlet does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/Login.java:[7,32] package javax.servlet.annotation does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/Login.java:[8,26] package javax.servlet.http does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/Login.java:[9,26] package javax.servlet.http does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/Login.java:[10,26] package javax.servlet.http does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/Login.java:[11,26] package javax.servlet.http does not exist
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/Login.java:[18,28] cannot find symbol
[ERROR]   symbol: class HttpServlet
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/Login.java:[17,2] cannot find symbol
[ERROR]   symbol: class WebServlet
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/Login.java:[27,30] cannot find symbol
[ERROR]   symbol:   class HttpServletRequest
[ERROR]   location: class Collectors.Login
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/Login.java:[27,58] cannot find symbol
[ERROR]   symbol:   class HttpServletResponse
[ERROR]   location: class Collectors.Login
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/Login.java:[28,32] cannot find symbol
[ERROR]   symbol:   class ServletException
[ERROR]   location: class Collectors.Login
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/Login.java:[50,31] cannot find symbol
[ERROR]   symbol:   class HttpServletRequest
[ERROR]   location: class Collectors.Login
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/Login.java:[50,59] cannot find symbol
[ERROR]   symbol:   class HttpServletResponse
[ERROR]   location: class Collectors.Login
[ERROR]   symbol:   class HttpServletResponse
[ERROR]   location: class Collectors.RequestOpened
[ERROR] /C:/Users/77052/blagodari_web/blagodari_web-master/src/Collectors/RequestOpened.java:[26,32] cannot find symbol
[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/MojoFailureException


Если у кого-нибудь есть какие-нибудь мысли по этому поводу, пожалуйста, поделитесь. Я уже весь гугл обшарил, задавал вопросы на форуме, и все мимо...
  • Вопрос задан
  • 361 просмотр
Пригласить эксперта
Ответы на вопрос 3
@Nastya1920
Мучалась с такой же проблемой. помогло изменить в dependency of maven-plugin: вместо org.apache взяла org.springframework.boot.
Ответ написан
xez
@xez Куратор тега Java
TL Junior Roo
Написано же "try-with-resources is not supported in -source 1.6"
У вас maven компилирует с java версии 1.6 (видимо, по умолчанию). Нужно установить версию java в параметрах maven-compiler-plugin.
Рецепт тут: https://maven.apache.org/plugins/maven-compiler-pl...
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы