Error on goal package with vaadin-maven-plugin with gitlab CI - java

I'm using Vaadin and the vaadin-maven-plugin to build a project with front files.
When I am running the goal locally I have no errors and the project builds successfully:
[INFO] Installed Yarn locally.
[INFO] Running 'yarn install' in /home/kaa/Documents/Projects/limitmanager.front/target
[INFO] yarn install v1.6.0
[INFO] [1/4] Resolving packages...
[ERROR] warning babel-preset-env > browserslist#2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
[INFO] [2/4] Fetching packages...
[INFO] [3/4] Linking dependencies...
[ERROR] warning "polymer-build > polymer-project-config#3.13.0" has incorrect peer dependency "polymer-analyzer#^3.0.0-pre.17 || ^3.0.0".
[INFO] [4/4] Building fresh packages...
[INFO] success Saved lockfile.
[INFO] Done in 7.12s.
[INFO] Processing frontend files from '/home/kaa/Documents/Projects/limitmanager.front/target/frontend'
[INFO] Running 'gulp build_es6' in /home/kaa/Documents/Projects/limitmanager.front/target
[INFO] [12:28:51] Using gulpfile ~/Documents/Projects/limitmanager.front/target/gulpfile.js
[INFO] [12:28:51] Starting 'build_es6'...
[INFO] Deleting /home/kaa/Documents/Projects/limitmanager.front/target/classes/META-INF/resources/frontend-es6 directory...
[INFO] [12:28:51] Finished 'build_es6' after 5.17 ms
[INFO] Starting to process frontend files.
[INFO] Will minify frontend files.
[INFO] Will bundle frontend files.
[INFO] Will hash bundle file names.
[INFO] Will copy files to target directory '/home/kaa/Documents/Projects/limitmanager.front/target/classes/META-INF/resources/frontend-es6'.
[INFO] Starting operations stated above, this might take a while.
[INFO] Writing bundle manifest to '/home/kaa/Documents/Projects/limitmanager.front/target/classes/META-INF/resources/frontend-es6/vaadin-flow-bundle-manifest.json'
But, running on gitlab CI causes an error:
Caused by: com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutionException: java.io.IOException: Cannot run program "/bcsbankms/limitmanager.front/target/node/node" (in directory "/bcsbankms/limitmanager.front/target"): error=2, No such file or directory
Part of the log:
57389 [ERROR] warning "polymer-build > polymer-project-config#3.13.0" has incorrect peer dependency "polymer-analyzer#^3.0.0-pre.17 || ^3.0.0".
59986 [INFO] [4/4] Building fresh packages...
60052 [INFO] success Saved lockfile.
60055 [INFO] Done in 34.04s.
60071 [INFO] Processing frontend files from '/bcsbankms/limitmanager.front/target/frontend'
60086 [INFO] Running 'gulp build_es6' in /bcsbankms/limitmanager.front/target
60091 [INFO] ------------------------------------------------------------------------
60091 [INFO] BUILD FAILURE
60091 [INFO] ------------------------------------------------------------------------
60093 [INFO] Total time: 59.119 s
60093 [INFO] Finished at: 2018-10-05T05:54:08Z
60094 [INFO] ------------------------------------------------------------------------
60094 [ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:11.0.0:package-for-production (default) on project ru.bcs.bank.ms.limitmanager.front: Execution default of goal com.vaadin:vaadin-maven-plugin:11.0.0:package-for-production failed: Transpilation with gulp has failed: 'gulp build_es6' failed. java.io.IOException: Cannot run program "/bcsbankms/limitmanager.front/target/node/node" (in directory "/bcsbankms/limitmanager.front/target"): error=2, No such file or directory -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.vaadin:vaadin-maven-plugin:11.0.0:package-for-production (default) on project ru.bcs.bank.ms.limitmanager.front: Execution default of goal com.vaadin:vaadin-maven-plugin:11.0.0:package-for-production failed: Transpilation with gulp has failed

This is a known issue.
As far as i know, you can ignore it.

Related

Build failing for spring boot project on heroku

I have created very very basic spring boot project which is running locally, When i am trying to deploy on Heroku the build is failing .
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.123 s
[INFO] Finished at: 2021-11-19T10:39:40Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project GymMgmt: Fatal error compiling: invalid target release: 11 -> [Help 1]

mvn install:install-file is unable to install ojdbc7.jar at correct location

I am having difficulty in getting this ojdbc7 JAR file installed in the correct location. I tried the following from Windows 10 command prompt and got the BUILD SUCCESS message as shown below:
C:\Users\john>mvn install:install-file -Dfile=C:\ojdbc7.jar -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.1.0.1 -Dpackaging=jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) # standalone-pom ---
[INFO] Installing C:\ojdbc7.jar to C:\Users\l-john\.m2\repository\com\oracle\ojdbc7\12.1.0.1\ojdbc7-12.1.0.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.381 s
[INFO] Finished at: 2018-10-24T12:09:04-05:00
[INFO] ------------------------------------------------------------------------
However, when I went inside the 12.1.0.1 folder (located here C:\Users\john\.m2\repository\com\oracle\ojdbc7\12.1.0.1) I only saw the following files :
For one of my Maven project, eclipse(version 2018-19) is trying to access the JAR file and I keep getting following BUILD FAILURE message which is obvious since the file isn't there:
BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.208 s
[INFO] Finished at: 2018-10-24T12:15:39-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project MyProject: Could not resolve dependencies for project com.company.ii:MyProject:war:0.1: Could not find artifact com.oracle.jdbc:ojdbc7:jar:12.1.0.1 in spring-releases (https://repo.spring.io/libs-release) -> [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.
In my pom.xml, I do have the dependency defined as follows:
Is there anything I am doing wrong? Please let me know if I need to perform some additional testing?
I could see that in mvn install command -DgroupId is not correct, instead of giving "-DgroupId=com.oracle.jdbc", you have given just "-DgroupId=com.oracle"
Maven tells you it is installing the jar to
C:\Users\l-john\.m2\repository\com\oracle\ojdbc7\12.1.0.1\ojdbc7-12.1.0.1.jar
But you are looking at
C:\Users\john\.m2\repository\com\oracle\ojdbc7\12.1.0.1
l-john vs john

Cannot build Storm for the storm-starter example

I am a complete newbie with Apache storm. I tried to follow the storm-starter. I cloned the repository, and then I tried to build and install locally storm. Unfortunately I cannot even do that. The storm-metrics jar cannot be built
[INFO] ------------------------------------------------------------------------
[INFO] Building storm-metrics 2.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # storm-metrics ---
[INFO] Deleting /Users/apple/storm/external/storm-metrics/target
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (cleanup) # storm-metrics ---
[INFO]
[INFO] --- maven-antrun-plugin:1.6:run (prepare) # storm-metrics ---
[WARNING] Parameter tasks is deprecated, use target instead
[INFO] Executing tasks
main:
[echo] Downloading sigar native binaries...
[get] Getting: https://magelan.googlecode.com/files/hyperic-sigar-1.6.4.zip
[get] To: /var/root/.m2/repository/org/fusesource/sigar/1.6.4/hyperic-sigar-1.6.4.zip
[get] Error opening connection java.io.FileNotFoundException: https://magelan.googlecode.com/files/hyperic-sigar-1.6.4.zip
[get] Error opening connection java.io.FileNotFoundException: https://magelan.googlecode.com/files/hyperic-sigar-1.6.4.zip
[get] Error opening connection java.io.FileNotFoundException: https://magelan.googlecode.com/files/hyperic-sigar-1.6.4.zip
[get] Can't get https://magelan.googlecode.com/files/hyperic-sigar-1.6.4.zip to /var/root/.m2/repository/org/fusesource/sigar/1.6.4/hyperic-sigar-1.6.4.zip
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] storm-metrics ...................................... FAILURE [ 2.818 s]
[INFO] storm-cassandra .................................... SKIPPED
[INFO] storm-mqtt-parent .................................. SKIPPED
[INFO] storm-mqtt ......................................... SKIPPED
[INFO] storm-mqtt-examples ................................ SKIPPED
[INFO] storm-mongodb ...................................... SKIPPED
[INFO] storm-clojure ...................................... SKIPPED
[INFO] storm-starter ...................................... SKIPPED
[INFO] storm-kafka-client ................................. SKIPPED
[INFO] storm-opentsdb ..................................... SKIPPED
[INFO] storm-kafka-monitor ................................ SKIPPED
[INFO] storm-kinesis ...................................... SKIPPED
[INFO] storm-druid ........................................ SKIPPED
[INFO] storm-submit-tools ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.867 s
[INFO] Finished at: 2016-08-31T11:52:45+01:00
[INFO] Final Memory: 26M/270M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (prepare) on project storm-metrics: An Ant BuildException has occured: Can't get https://magelan.googlecode.com/files/hyperic-sigar-1.6.4.zip to /var/root/.m2/repository/org/fusesource/sigar/1.6.4/hyperic-sigar-1.6.4.zip -> [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/MojoExecutionException
I have no idea how to fix this. I tried to follow the link : https://magelan.googlecode.com/files/hyperic-sigar-1.6.4.zip but indeed there is nothing on this page.
So I have been stuck on this for like 4 hours, I cannot even run a topology yet... Please help :(
It seems like the download link for hyperic-sigar-1.6.4.zip has changed to
https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/magelan/hyperic-sigar-1.6.4.zip
Try to do the following:
In the file external/storm-metrics/pom.xml set the entry for <sigar.download.url> to <sigar.download.url>https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/magelan/hyperic-sigar-${sigar.version}.zip</sigar.download.url> and then re-run mvn clean install -DskipTests=true
In my case I grepped for all occurrences of the old download link and replaced them with the new link, but I guess this should not be necessary as all the other places where the link occurred were generated in the build process. Replacing the link worked for me. It is also weird, that the link already is corrected in their GitHub repository, but is not, when you download it as a zip file from GitHub.
Below existing issue link :
https://github.com/apache/storm/commit/ef3c4de133528d04f76a43a0e87e72cea19e173e
I tried to build with latest storm-starter clone and it's working fine. Update your repository and try again. Should work fine.

Build RPM on Debian with Maven

In theory, using the rpm-maven-plugin/ and having alien install (which provides both rpm and rpmbuild binaries) it should be rather easy. But I alway get it failing with a cryptic error (because some macros are nor expanded):
$ mvn package
...
[INFO] --- rpm-maven-plugin:2.1.5:rpm (build-rpm) # dist ---
[WARNING] rpm version string truncated to 0.2.2
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo/BUILD
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo/RPMS
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo/SOURCES
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo/SPECS
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo/SRPMS
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo/tmp-buildroot
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo/buildroot
[INFO] Copying files to /home/wikier/projects/foo/dist/target/rpm/foo/SOURCES
[INFO] Copying files to /home/wikier/projects/foo/dist/target/rpm/foo/tmp-buildroot/usr/share/foo-magic-api
[INFO] Creating spec file /home/wikier/projects/foo/dist/target/rpm/foo/SPECS/foo.spec
[INFO] error: Unknown icon type: Icon_foo.png
[INFO] Building target platforms: x86-64-pc-linux
[INFO] Building for target x86-64-pc-linux
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.578 s
[INFO] Finished at: 2016-07-04T14:16:49+02:00
[INFO] Final Memory: 42M/1237M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.1.5:rpm (build-rpm) on project dist: RPM build execution returned: '1' executing '/bin/sh -c cd '/home/wikier/projects/foo/dist/target/rpm/foo/SPECS' && 'rpmbuild' '-bb' '--target' 'x86-64-pc-linux' '--buildroot' '/home/wikier/projects/foo/dist/target/rpm/foo/buildroot' '--define' '_topdir /home/wikier/projects/foo/dist/target/rpm/foo' '--define' '_build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' '--define' '_builddir %{_topdir}/BUILD' '--define' '_rpmdir %{_topdir}/RPMS' '--define' '_sourcedir %{_topdir}/SOURCES' '--define' '_specdir %{_topdir}/SPECS' '--define' '_srcrpmdir %{_topdir}/SRPMS' 'foo.spec'' -> [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/MojoExecutionException
Anybody has some experience in a similar environment?
Got it! the log [INFO] error: Unknown icon type: Icon_foo.png should be actually ERROR, because later causes an error calling rpmbuild.

Jersey maven skeleton project not running

I'm just getting started with jersey and have built the jersey 2.0 skeleton webapp using maven.
The command being:
mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes \
-DarchetypeArtifactId=jersey-quickstart-webapp -DarchetypeVersion=2.0
Now if I try to execute this using mvn clean exec:java I get the following error:
[INFO] ------------------------------------------------------------------------
[INFO] Building testwebservice 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) # testwebservice ---
[INFO] Deleting /Volumes/data/Projects/TestWebService/testwebservice/target
[INFO]
[INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) # testwebservice >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) # testwebservice <<<
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) # testwebservice ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.627s
[INFO] Finished at: Sat Jun 22 17:46:18 CEST 2013
[INFO] Final Memory: 8M/125M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project testwebservice: The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java are missing or invalid -> [Help 1]
The help provided isn't very helpful and I can't seem to find anything about this on the web. I have no clue where to set the parameters mainClass for "goal" (whatever that means) org.codehaus... . This is my first maven project and I'm pretty lost
Thanks for the help guys
You have generated a WEB Project and you are trying to run a java Application.
If you have a look at the Exec Plungin Documentation you will find that it requires an mainClassargument
and that's what the error message tells you
The parameters 'mainClass' for goal
org.codehaus.mojo:exec-maven-plugin:1.2.1:java are missing or invalid
But as I've already written you have generated a WEB Application Skeleton running it as Java Application does not really make sense.
Have a look at Building Simple Jersey Web App With Maven to find out what you'll have to do to get your web application running.
Try to run the following command using command line by going inside your project directory:
mvn clean generate-sources package

Categories