Error executing .jar in Windows PowerShell with Maven

0

Good afternoon everyone.

I'm trying to run this tool (CPA - link ). Through the link available, I download the classes. After that, I run Maven, which generates a .jar. The configuration file (pom.xml) used in Maven is this: link

After installing Maven, it generates the "target" folder with the .jar quoted above. When trying to execute this .jar, the problem starts.

In all my attempts, I have received the following error:

"Erro: Não foi possível localizar nem carregar a classe principal com.ericsson.research.iot.citypulse.CityPulseInterface"

This is the command I have executed:

.\java -jar C:\Users\Vinicius\Documents\GitHub\cpa\apache-maven-3.3.9\bin\target\cpa-1.0-SNAPSHOT-jar-with-dependencies.jar

The MANIFEST.MF file looks like this:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: Vinicius
Build-Jdk: 1.8.0_73
Main-Class: com.ericsson.research.iot.citypulse.CityPulseInterface

My classes directory and the location of .jar:

JAR: C:\Users\Vinicius\Documents\GitHub\cpa\apache-maven-3.3.9\bin\target

Classe: C:\Users\Vinicius\Documents\GitHub\cpa\apache-maven-3.3.9\bin\target\src\main\java\com\ericsson\research\iot\citypulse

I made a number of changes at the directory level, putting the .jar in the same class (within the package), but the error continued.

Note: JAVA_HOME and PATH are already configured. I use Windows 10.

Can you help me?

    
asked by anonymous 13.07.2016 / 17:27

1 answer

0

Open your jar with winrar or with some jd-gui code decompiler and make sure the class is in the generated jar. If it is not you are with some wrong maven configuration.

    
13.07.2016 / 18:44