Cannot invoke "java.io.File.isFile()" because "this.inputFile" is null - maven

I met a problem when trying to build Quickfixj Project on Windows 10.
I tried the command using Git:
$ mvn clean package -Dmaven.javadoc.skip=true -DskipTests -PskipBundlePlugin
and it returned error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.4.2:single (bin-assembly) on project quickfixj-distribution: Execution bin-assembly of goal org.apache.maven.plugins:maven-assembly-plugin:3.4.2:single failed: Cannot invoke "java.io.File.isFile()" because "this.inputFile" is null -
I've never met such problem and I searched online but no relevant solutions were found.
Shall I reinstall maven or other solutions recommended? Thanks!

This seems to be a bug with the QuickFIX/J build process.
If you omit -PskipBundlePlugin the build will succeed.

I had the same problem for me with mac m1, on vscode;
I just changed the version in the pom.xml file to:
maven-assembly-plugin-version>3.1.0</maven-assembly-plugin-version
and it worked for me.
in addition to that I Installed some apache extension for vscode.

Related

How to set up apache ranger on apple macbook pro m1

I'm trying to set up apache ranger for work using this https://github.com/apache/ranger/tree/master/dev-support/ranger-docker
however by running
mvn clean package -DskipTests
I'm getting the following error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:exploded (prepare) on project security-admin-web: Execution prepare of goal org.apache.maven.plugins:maven-war-plugin:2.6:exploded failed: Unable to load the mojo 'exploded' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.6' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null The entire error can be seen in this picture:
[1]
and as an alternative provided in the github, when I run:
docker-compose -f docker-compose.ranger-base.yml -f docker-compose.ranger-build.yml up
I get the error:
ranger-build | The JAVA_HOME environment variable is not defined correctly
ranger-build | This environment variable is needed to run this program
ranger-build | NB: JAVA_HOME should point to a JDK not a JRE
ranger-build | mv: cannot stat 'target/ranger-*': No such file or directory
ranger-build exited with code 1
I have also tried following https://medium.com/swlh/hands-on-apache-ranger-docker-poc-with-hadoop-hdfs-hive-presto-814344a03a17
however it gets stuck in the ranger-admin container and localhost:6080 doesn't work.
[1]: https://i.stack.imgur.com/57ubI.jpg
I was able to solve this by downgrading my maven to 3.6.3 as I was having incompatibility issues, although this particular issue was resolved by adding maven war 2.6 plug in in pom.xml but then more incompatibility issues arose so i had to uninstall and reinstall a completely different maven version and that fixed all the issues.

Jenkins Travis-CI build fails in cli module (shade fails)

I am running a custom Jenkins 2.263.4 build on Travis-CI. We need a fix with relative pathes that never made it into the Jenkins core...well for us it is mandatory.
Based on release 2.263.4 I applied the fix in core/SecretRewriter.java and core/VirtualFile.java and also changed the version name to give it branding. This worked very well in the past releases. But the last update we did was one year ago.
Now I am running into the error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.1:shade (default) on project cli: Error creating shaded jar: duplicate entry: META-INF/services/io.jenkins.cli.shaded.org.apache.sshd.common.io.IoServiceFactoryFactory -> [Help 1]
I am not able to understand it at all.
Travis-CI is here: https://travis-ci.com/github/DanielWeber/jenkins
GitHub: https://github.com/DanielWeber/jenkins
I was not able to find this exact problem from somewhere else. I tried a bit with the shade config to set
<minimizeJar>false</minimizeJar>
and similar small things, but didn't really help.
My change is so small, I don't really understand what's happening.
If nothing helps, I might consider doing changes step by step then, rather than just merging the releae to our for, but hope someone sees the problem.
The issue is that the build is being execute two times based on the mvn install followed by mvn package which is defined in travis.yml file. This causes the issue.

Jhipster project runs fine on Mac, but fails to run on Linux

I have a JHipster project that includes Spring Boot and React Native. I run it OK using ./mvnw as the guide specifies, however, when I put the entire project on Ubuntu, it fails to run and the log is as follows:
ERROR Failed to execute goal
com.github.eirslett:frontend-maven-plugin:1.8.0:npm (webpack build dev)
on project galley-1: Failed to run task: 'npm run webpack:build' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.8.0:npm (webpack build dev)
Some points to note are that: I use sudo, and I already changed the webpack space size to be as big as 9000, in package.json.
Just to answer my own question, I finally find a way to run this:
On mac, I package my project using 'mvn -Pprod package -DskipTests' (sorry there were some tests that didn't pass at that time, I didn't get time to fix those at that time), and then on Linux:
nohup sudo java -jar *.jar &
It will do the trick. But if anyone gets any better idea, please share.

Unable to generate allure report in jenkins

getting the following error.
screenshot is also attached.
basically .bat is not getting generated.
ERROR: Step ‘Allure Report’ aborted due to exception:
java.io.IOException: Failed to rename C:\Users\dell\.jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\allure2\allure-2.4.1 to C:\Users\dell\.jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\allure2\allure-2.4.1.__rename
Now its working.
There is problem in allure command installation.
Maven central installer is giving error
Tried by giving link in jenkins global tool configuration and its working
Link : https://bintray.com/qameta/generic/download_file?file_path=io%2Fqameta%2Fallure%2Fallure%2F2.4.1%2Fallure-2.4.1.zip
I faced the same issue when configured with the latest version of Maven under Jenkins->Global Tool Configurations->Allure Commandline. Once i downgraded the Maven version I was able to generate allure reports successfully.
I had the same problem. In my case it was enough to delete allure-jenkins plugin from the list of plugins in Jenkins.

Maven - peer not authenticated

A few days ago my maven stopped working. To be more specific it stops download dependencies. Below I note bunch of information and steps which I did in order to find solution.
I double checked settings.xml - this file is used also by my colleagues and they haven't any problems
I installed Maven 3.0.4, 3.0.5, 3.1.0 - it always fail during download dependencies
I have 3 computers - 2 with Ubuntu and 1 with Windows. On Windows it works great, on both Ubuntu it doesn't.
mvn clean install generates in debug mode something like that: Could not transfer artifact junit:junit:pom:3.8.1 from/to central...: peer not authenticated stacktrace
I tried to use additional parameters mvn -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true clean install
but it fails also. Output in debug mode ends with: Server key: Could not create EC public key: CKR_DOMAIN_PARAMS_INVALID
If I add all dependencies manually (copy&paste from my colleagues ~/.m2 directory) then mvn clean install works correctly. So, it seems to be a problem only with downloading.
Does anyone have any suggestions what can be wrong?
I found a solution for my problem. Be sure you have rights to write into {jdk_directory}/security/java.security file (in my case /etc/java-7-openjdk/security/java.security) and if so, then modify it this way:
from:
#security.provider.9=sun.security.ec.SunEC
security.provider.9=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg
to
security.provider.9=sun.security.ec.SunEC
#security.provider.9=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg
It fixed problem on all my computers (all with maven 3.0.4)

Resources