I have an issue while deploying my Spring boot app to Heroku.
I am trying to deploy it as a java app instead of building and deploying a jar file.
I have used the free Postgresql in Heroku.
The error while pushing the app to Heroku master is:
remote: [INFO] Changes detected - recompiling the module!
remote: [INFO] Compiling 18 source files to /tmp/build_79201803/target/classes
remote: [INFO] -------------------------------------------------------------
remote: [ERROR] COMPILATION ERROR :
remote: [INFO] -------------------------------------------------------------
remote: [ERROR] /tmp/build_79201803/src/main/java/com/pukitbanta/springblog/model/post.java:[15,8] class Post is public, should be declared in a file named Post.java
remote: [ERROR] /tmp/build_79201803/src/main/java/com/pukitbanta/springblog/model/user.java:[12,8] class User is public, should be declared in a file named User.java
remote: [INFO] 2 errors
remote: [INFO] -------------------------------------------------------------
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] BUILD FAILURE
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] Total time: 16.300 s
remote: [INFO] Finished at: 2020-08-11T11:09:38Z
remote: [INFO] ------------------------------------------------------------------------
remote: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project springblog: Compilation failure: Compilation failure:
remote: [ERROR] /tmp/build_79201803/src/main/java/com/pukitbanta/springblog/model/post.java:[15,8] class Post is public, should be declared in a file named Post.java
remote: [ERROR] /tmp/build_79201803/src/main/java/com/pukitbanta/springblog/model/user.java:[12,8] class User is public, should be declared in a file named User.java
remote: [ERROR] -> [Help 1]
remote: [ERROR]
remote: [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
remote: [ERROR] Re-run Maven using the -X switch to enable full debug logging.
remote: [ERROR]
remote: [ERROR] For more information about the errors and possible solutions, please read the following articles:
remote: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
remote:
remote: ! ERROR: Failed to build app with Maven
remote: We're sorry this build is failing! If you can't find the issue in application code,
remote: please submit a ticket so we can help: https://help.heroku.com/
remote:
remote: ! Push rejected, failed to compile Java app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
The error here specifies that my User and Post models file name starts with lowercase letters.
But my file structure is:
I do not think the error is in the Models, and I am not able to find out the issue.
I solved mine by changing java version 11 to 8(In pom.xml).
From:
<properties>
<java.version>11</java.version>
</properties>
To:
<properties>
<java.version>8</java.version>
</properties>
In your screenshot, the file name starts with a capital letter, but
remote: [ERROR] /tmp/build_79201803/src/main/java/com/pukitbanta/springblog/model/post.java:[15,8] class Post is public, should be declared in a file named Post.java
remote: [ERROR] /tmp/build_79201803/src/main/java/com/pukitbanta/springblog/model/user.java:[12,8] class User is public, should be declared in a file named User.java
the file name displayed in the error message is in lower case.
Please check again for lowercase letters. If they are in lowercase, please correct them as follows:
Rename post.java to Post.java
Rename user.java to User.java
If it doesn't make sense to rename those files, it's probably a problem with your Git settings.
see: https://stackoverflow.com/a/46670520/1979953
It WAS a case-sensitive issue. The problem is that I didn't know that GIT is not looking for case-sensitive changes in the file.
You can check your git configuration:
$ git config -l | grep ignorecase
The core.ignorecase is the one we need this time.
If core.ignorecase is true, Git will ignore case differences; if false, Git will recognize the difference. So you need to set false.
Then let Git recognize the changes and deploy them to Heroku again.
To update the core.ignorecase to either true or false run:
git config core.ignorecase true
or
git config core.ignorecase false.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
Put this in the pom.xml.
git add .
git commit -m "Pom Changed"
git push heroku master
Related
All.
I am testing whether it would be useful to develop a web application in Heroku. So, I'm trying to follow the guide that is "Deploying Spring Boot Applications to Heroku".(link: https://devcenter.heroku.com/articles/deploying-spring-boot-apps-to-heroku)
I can follow the guide to check the page returning hello world, but I'm having a problem connecting postgresql. When I try to deploy DatabaseConfig.java file to git, it fails with the following log in vscode. How can I solve it?
$ git push heroku master
Enumerating objects: 24, done.
Counting objects: 100% (24/24), done.
Delta compression using up to 12 threads
Compressing objects: 100% (12/12), done.
Writing objects: 100% (15/15), 1.36 KiB | 463.00 KiB/s, done.
Total 15 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Java app detected
remote: -----> Installing JDK 1.8... done
remote: -----> Executing Maven
remote: $ ./mvnw -DskipTests clean dependency:list install
remote: [INFO] Scanning for projects...
remote: [INFO]
remote: [INFO] -------------------------< com.daview:daview >--------------------------
remote: [INFO] Building demo 0.0.1-SNAPSHOT
remote: [INFO] --------------------------------[ jar ]---------------------------------
remote: [INFO]
remote: [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) # daview ---
remote: [INFO]
remote: [INFO] --- maven-dependency-plugin:3.1.2:list (default-cli) # daview ---
remote: [INFO]
remote: [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) # daview ---
remote: [INFO] Using 'UTF-8' encoding to copy filtered resources.
remote: [INFO] Copying 1 resource
remote: [INFO] Copying 0 resource
remote: [INFO]
remote: [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # daview ---
remote: [INFO] Changes detected - recompiling the module!
remote: [INFO] Compiling 2 source files to /tmp/build_d5a7a4a08b5f6a2624f3313e54f0a54a/target/classes
remote: [INFO] -------------------------------------------------------------
remote: [ERROR] COMPILATION ERROR :
remote: [INFO] -------------------------------------------------------------
remote: [ERROR] /tmp/build_d5a7a4a08b5f6a2624f3313e54f0a54a/src/main/java/com/daview/daview/DatabaseConfig.java:[1,1] illegal character: '\ufeff'
remote: [ERROR] /tmp/build_d5a7a4a08b5f6a2624f3313e54f0a54a/src/main/java/com/daview/daview/DatabaseConfig.java:[1,10] class, interface, or enum expected
remote: [INFO] 2 errors
remote: [INFO] -------------------------------------------------------------
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] BUILD FAILURE
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] Total time: 4.196 s
remote: [INFO] Finished at: 2020-05-05T17:33:46Z
remote: [INFO] ------------------------------------------------------------------------
remote: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project daview: Compilation failure: Compilation failure:
remote: [ERROR] /tmp/build_d5a7a4a08b5f6a2624f3313e54f0a54a/src/main/java/com/daview/daview/DatabaseConfig.java:[1,1] illegal character: '\ufeff'
remote: [ERROR] /tmp/build_d5a7a4a08b5f6a2624f3313e54f0a54a/src/main/java/com/daview/daview/DatabaseConfig.java:[1,10] class, interface, or enum expected
remote: [ERROR] -> [Help 1]
remote: [ERROR]
remote: [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
remote: [ERROR] Re-run Maven using the -X switch to enable full debug logging.
remote: [ERROR]
remote: [ERROR] For more information about the errors and possible solutions, please read the following articles:
remote: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
remote:
remote: ! ERROR: Failed to build app with Maven
remote: We're sorry this build is failing! If you can't find the issue in application code,
remote: please submit a ticket so we can help: https://help.heroku.com/
remote:
remote: ! Push rejected, failed to compile Java app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to daview.
remote:
To https://git.heroku.com/daview.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/daview.git'
I found the solution!
It is the problem with encoding!
I can find the character which is '\ufeff' by changing the encoding type like EUC-KR not UTF. So I fixed the code correctly and saved back to utf-8.
Is there a known way to commit changes to an additional file during the Maven Release, and also add that file to version control if it's necessary?
We have a resource file that is potentially changed during our build process, and we want to commit any changes to this file during the Maven Release so the most accurate version is reflected in our tags.
We can get most of the way by configuring maven-scm-plugin to checkin changes to our file, and adding scm:checkin to the preparationGoals of maven-release-plugin, like so:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.9.5</version>
<configuration>
<includes>resource.file</includes>
<message>[maven-scm-plugin] Committing resource.file from latest release</message>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<preparationGoals>clean verify scm:checkin</preparationGoals>
</configuration>
</plugin>
This approach handles new changes to an existing resource file just fine. Unfortunately, it fails when our build generates a new resource file that is not already added to version control:
[INFO] [ERROR] Provider message:
[INFO] [ERROR] The svn command failed.
[INFO] [ERROR] Command output:
[INFO] [ERROR] svn: E200009: Commit failed (details follow):
[INFO] svn: E200009: '/acme/builder/workspace/_experiment-commit-on-release/resource.file' is not under version control
While we can get around this case by adding scm:add to preparationGoals, that approach will break when our resource file is added to version control:
[INFO] [ERROR] Provider message:
[INFO] [ERROR] The svn command failed.
[INFO] [ERROR] Command output:
[INFO] [ERROR] svn: warning: W150002: '/acme/builder/workspace/_experiment-commit-on-release/resource.file' is already under version control
[INFO] svn: E200009: Could not add all targets because some targets are already versioned
[INFO] svn: E200009: Illegal target for the requested operation
I'm sure I can have Maven call some external script to handle this problem for us, but I'd rather keep this logic within Maven itself if at all possible.
I followed this link to install simple spring boot project into openshift online. However, I couldn't get it working.
http://www.sothawo.com/2015/09/deploying-a-spring-boot-application-running-with-java8-on-openshift2/
Here is my project structure and the exception i'm seeing when I do git push
git push
Counting objects: 14, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (14/14), 1.82 KiB | 0 bytes/s, done.
Total 14 (delta 1), reused 0 (delta 0)
remote: Stopping DIY cartridge
remote: CLIENT_RESULT: Application is already stopped
remote: Repairing links for 1 deployments
remote: Building git ref 'master', commit 8e5a152
remote: [ERROR] Error executing Maven.
remote: [ERROR] The specified user settings file does not exist: /var/lib/openshift/580abfc589f5cf2be2000061/app-root/runtime/repo/.openshift/settings.xml
remote: An error occurred executing 'gear postreceive' (exit code: 1)
remote: Error message: CLIENT_ERROR: Failed to execute action hook 'build' for 580abfc589f5cf2be2000061 application pointingpoker
remote:
remote: For more details about the problem, try running the command again with the '--trace' option.
UPDATE
Yes, target folder is red in color. I have modified the build script to below and I'm seeing this exception deploying to openshift. I thought the build script has been modified to point to java8 but I still its using 1.7
# call our own mvn script with the right settings
cd $OPENSHIFT_REPO_DIR
mvn package -X .openshift/settings.xml -DskipTests=true
Console Exceptions
git push
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 509 bytes | 0 bytes/s, done.
Total 5 (delta 3), reused 0 (delta 0)
remote: Stopping DIY cartridge
remote: CLIENT_RESULT: Application is already stopped
remote: Repairing links for 1 deployments
remote: Building git ref 'master', commit f5f3e76
remote: Apache Maven 3.0.4 (r1232336; 2012-12-18 14:36:37-0500)
remote: Maven home: /usr/share/java/apache-maven-3.0.4
remote: Java version: 1.7.0_111, vendor: Oracle Corporation
remote: Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.111/jre
remote: Default locale: en_US, platform encoding: ANSI_X3.4-1968
remote: OS name: "linux", version: "2.6.32-642.4.2.el6.x86_64", arch: "i386", family: "unix"
remote: [INFO] Error stacktraces are turned on.
remote: [DEBUG] Reading global settings from /usr/share/java/apache-maven-3.0.4/conf/settings.xml
remote: [DEBUG] Reading user settings from /var/lib/openshift/580abfc589f5cf2be2000061/.m2/settings.xml
remote: [DEBUG] Using local repository at /var/lib/openshift/580abfc589f5cf2be2000061/.m2/repository
remote: [ERROR] Could not create local repository at /var/lib/openshift/580abfc589f5cf2be2000061/.m2/repository -> [Help 1]
remote: org.apache.maven.repository.LocalRepositoryNotAccessibleException: Could not create local repository at /var/lib/openshift/580abfc589f5cf2be2000061/.m2/repository
remote: at org.apache.maven.DefaultMaven.validateLocalRepository(DefaultMaven.java:504)
remote: at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:196)
remote: at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
remote: at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
remote: at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
remote: at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
remote: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
remote: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
remote: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
remote: at java.lang.reflect.Method.invoke(Method.java:606)
remote: at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
remote: at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
remote: at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
remote: at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
remote: [ERROR]
remote: [ERROR]
remote: [ERROR] For more information about the errors and possible solutions, please read the following articles:
remote: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LocalRepositoryNotAccessibleException
remote: An error occurred executing 'gear postreceive' (exit code: 1)
remote: Error message: CLIENT_ERROR: Failed to execute action hook 'build' for 580abfc589f5cf2be2000061 application pointingpoker
remote:
remote: For more details about the problem, try running the command again with the '--trace' option.
According to the screen shot of your file structure, you have a leading . (dot) before settings.xml. It would appear that that may be causing your issue
While trying to execute the release:prepare goal, I get the following failure :
...
[INFO] Checking in modified POMs...
[INFO] SVN commit directory: C:\dev\eclipse\workspace\xxx-parent
[INFO] Tagging release with the label xxx-parent-0.0.1...
[INFO] SVN checkout directory: C:\dev\eclipse\workspace\xxx-parent
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.603s
[INFO] Finished at: Thu Oct 22 14:43:44 CEST 2015
[INFO] Final Memory: 10M/244M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project xxx-parent: Unable to tag SCM
[ERROR] Provider message:
[ERROR] SVN tag failed.
[ERROR] Command output:
[ERROR] svn: Commit failed (details follow):
[ERROR] svn: Commit blocked by pre-commit hook (exit code 1) with output:
[ERROR] A message is mandatory!
[ERROR] The message must comply to the following structure 'TT 12345: Some explanation'.
[ERROR] Pay attention to the white space between TT and the TT number and between the colon and the explanation.
[ERROR] The explanation after the colon should at least be 10 characters long.
[ERROR] svn: MERGE of '/svn/xxxxx/xxx-parent': 409 Conflict (https://192.19.20.56)
[ERROR] -> [Help 1]
...
The project is well updated in the trunk with the release version but not in the TAGS and it looks like it's trying to do a svn merge ?! Is that it ? If so, why ?
Here is the maven-release-plugin config:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<dependencies>
<dependency>
<groupId>com.google.code.maven-scm-provider-svnjava</groupId>
<artifactId>maven-scm-provider-svnjava</artifactId>
<version>1.6</version>
</dependency>
</dependencies>
<configuration>
<providerImplementations>
<svn>javasvn</svn>
</providerImplementations>
<branchBase>https://192.19.20.56/svn/xxxxx/xxx-parent/BRANCHES</branchBase>
<tagBase>https://192.19.20.56/svn/xxxxx/xxx-parent/TAGS</tagBase>
<scmCommentPrefix>TT 00000: Tagging release of project ${project.name} ${project.version}, </scmCommentPrefix>
</configuration>
</plugin>
Maven's output contains pointers:
[ERROR] svn: Commit failed (details follow):
[ERROR] svn: Commit blocked by pre-commit hook (exit code 1) with output:
[ERROR] A message is mandatory!
[ERROR] The message must comply to the following structure 'TT 12345: Some explanation'.
[ERROR] Pay attention to the white space between TT and the TT number and between the colon and the explanation.
[ERROR] The explanation after the colon should at least be 10 characters long.
Your team has a pre-commit hook installed that disallows this commit, because the commit message is missing. I can only assume that the maven-release-plugin configuration you have included is not the one that is actually active, since it contains not only a commit message, but also one in the required format:
<scmCommentPrefix>TT 00000: Tagging release of project ${project.name} ${project.version}, </scmCommentPrefix>
You might try adding a commit message manually by using a command-line parameter like so:
mvn release:prepare -DscmCommentPrefix="TT 00000: Tagging release of project..."
The solution I've found is to change the version of maven-scm-provider-svnjava used by the release plugin.
It was using version 1.6, I changed it 1.15 and with this configuration, I can prepare and perform the release.
The subversion repository is in version 1.6, not sure what's the most up-to-date version of maven-scm-provider-svnjava I can use.
I have a fresh installed Debian Wheezy server running Jenkins 1.596 (The latest Version) installed from the official deb package.
For playing around with Jenkins, I crated a new Maven-Project which gets checked out with Git.
When I run Maven to build this project, on my local machine which has Maven version 3.0.5 installed, by executing mvn3 package the build is successfully, but when I try to build the project on the Jenkins server the build fails.
The plugins maven-resources-plugin (maven-resources-plugin:2.6) and maven-compiler-plugin (maven-compiler-plugin:2.5.1) are the same version on my dev system and the Jenkins server.
The build fails because of a error: cannot find symbol error which does not occur when building the project on my local system.
Here is the log generated by the Jenkins server during build:
Started by user anonymous
Building in workspace /var/lib/jenkins/jobs/hidden/workspace
> /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> /usr/bin/git config remote.origin.url ssh://git#red.hiddencompany.com/srv/gitosis/repositories/hidden.git # timeout=10
Fetching upstream changes from ssh://git#red.hiddencompany.com/srv/gitosis/repositories/hidden.git
> /usr/bin/git --version # timeout=10
using GIT_SSH to set credentials
> /usr/bin/git -c core.askpass=true fetch --tags --progress ssh://git#red.hiddencompany.com/srv/gitosis/repositories/hidden.git +refs/heads/*:refs/remotes/origin/*
> /usr/bin/git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> /usr/bin/git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 0d5334724d01ec42ed23912f687eb412997eede8 (refs/remotes/origin/master)
> /usr/bin/git config core.sparsecheckout # timeout=10
> /usr/bin/git checkout -f 0d5334724d01ec42ed23912f687eb412997eede8
> /usr/bin/git rev-list 0d5334724d01ec42ed23912f687eb412997eede8 # timeout=10
Parsing POMs
[workspace] $ /var/lib/jenkins/tools/hudson.model.JDK/JDK_7/bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.6.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven/boot/plexus-classworlds-2.5.1.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven/conf/logging jenkins.maven3.agent.Maven32Main /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven /var/cache/jenkins/war/WEB-INF/lib/remoting-2.49.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.6.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.6.jar 55526
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /var/lib/jenkins/jobs/hidden/workspace/pom.xml package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building hidden 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # hidden ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # hidden ---
[INFO] Compiling 15 source files to /var/lib/jenkins/jobs/hidden/workspace/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /var/lib/jenkins/jobs/hidden/workspace/src/main/java/com/logicsale/hidden/aggregator/provider/hiddencompany/AmazonSellerRatingsProvider.java:[41,58] error: cannot find symbol
[INFO] 1 error
[INFO] -------------------------------------------------------------
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.745 s
[INFO] Finished at: 2015-01-14T09:32:55+01:00
[INFO] Final Memory: 16M/39M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project hidden: Compilation failure
[ERROR] /var/lib/jenkins/jobs/hidden/workspace/src/main/java/com/logicsale/hidden/aggregator/provider/hiddencompany/AmazonSellerRatingsProvider.java:[41,58] error: cannot find symbol
[ERROR] -> [Help 1]
[ERROR]
[JENKINS] Archiving /var/lib/jenkins/jobs/hidden/workspace/pom.xml to com.logicsale.hidden/hidden/1.0-SNAPSHOT/hidden-1.0-SNAPSHOT.pom
[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
channel stopped
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
Finished: FAILURE
I tried building with JDK7 and JDK8 both fails.
Please have a look at this question and the accepted answer. Maybe it is a bug in the maven-compiler-plugin - try to update the version of the maven-compiler-plugin to 3.1 or newer.