I'm pretty new to java and maven and I'm trying to build the apache cxf project. I get an error during the build and I don't have any clue what I'm doing wrong. Can anybody give me some input on what I need to change to run the build properly?
I have been running mvn clean install and got an build error I don't understand. You can find it here: https://pastebin.com/Vdvi4unU
My end goal is to run mvn dependency:tree -DoutputType=tgf -DappendOutput=true -DoutputFile=output.tgf to get all the dependencies of a project.
The pom from apache cfx: https://github.com/apache/cxf/blob/master/pom.xml
Related
I keep getting a
Failed to execute goal
org.apache.maven.plugins:maven-shade-plugin:2.1:shade (default) on
project PermissionsPlugin: Error creating shaded jar: Error in ASM
processing class net/perms/commands/rank/deleteRank.class" error.
I can't figure out what is happening, as Intellij isn't giving me any errors when I build with it. The reason I build with maven is to shade, in case you were wondering. Any suggestions on how to fix this?
The solution was to update the Maven shade plugin.
I found out my issue. My maven shade plugin wasn't up to date... The error has been fixed by Maven a while ago.
I have a Maven error like the following in Eclipse for a Maven project.:
Project 'project1' is missing required library: '.../.m2/repository/.../project2/0.37.0-SNAPSHOT/project2-0.37.0-SNAPSHOT.jar'
The project cannot be built until build path errors are resolved
The error is wrong, because in the parent pom.xml version 0.38.0-SNAPSHOT is defined, which also lies in the .m2 repository as project2-0.38.0-SNAPSHOT.jar
I tried: "Right click" -> "Maven" -> "Update Project...", but it does now solve the problem.
Then I tried: mvn eclipse:clean eclipse:eclipse, which solved the problem. But, then the problem is, that it converts the Eclipse Maven project to an Eclipse project. So I have to manually convert it back to an Eclipse Maven project. I also wonder because Apache Maven Eclipse Plugin is RETIRED.
Is there another solution to the above Problem?
Your error messages sais something about 0.37.0-SNAPSHOT but in your text you refere to 0.38.0-SNAPSHOT. Is it a mistake or maybe the version in your dependency is wrong?
First your are right not to mix mvn eclipse:eclipse and eclipse-m2e plug-in. Second the Maven->Update Project should fix any misconfiguration.
I would suggest to call mvn clean install in your console to verify that there are no real dependency problems. Eclipse sometimes does not update its index correctly.
Second if the error still appears try to restart your eclipse. I often saw that eclipse-m2e does cache some stra
I build an Apache Project in java which runs fine on my laptop, now that I try to run the same project in Netbeans on my work PC I get an error:
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project aping: Command execution failed.
With a reference to:
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
The Maven plugin in Netbeans was installed by default. When I tried to find out if the Apache version in the POM file was correct I tried to check the version on my PC with mvn -version I got the error:
'mvn' is not recognized as an internal or external command,
operable program or batch file.
Does this mean that Maven is not installed on my PC and should I also install Maven on my PC first in order to use the plugin, or should just installing the plugin be enough and do I have a different problem?
The error message you see is
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project aping: Command execution failed.
This is a message from the Maven executable embedded inside Netbeans (so Maven is running), saying that a specific maven plugin (here exec-maven-plugin) failed. This is most likely trying to invoke another program on your computer that is not installed so Netbeans (and hence the embedded Maven) can see it.
If you want to run maven outside Netbeans, you must download and install a copy and invoke the "mvn" binary inside.
You Have to install Maven To run Maven on your PC - http://www.avajava.com/tutorials/lessons/what-is-maven-and-how-do-i-install-it.html see how to install maven
in linux - http://www.mkyong.com/maven/how-to-install-maven-in-ubuntu/
I mistakenly assumed that the problem had something to do with Maven, the problem seems to be something in my source code unrelated to Maven. When I change some of the code the program is build succesfully
I followed Storm Starter instructions and imported Twitter Storm in IntelliJ. For sake of testing I edited ExclaimationToplogy a bit and used following Maven command to build and run it:
mvn -f m2-pom.xml compile exec:java -Dstorm.topology=storm.starter.ExclamationTopology
But I am more interested to build and run within IDE rather than from command line. What actions do I need to perform?
Thanks
Follow the steps in storm-starter's: Using storm-starter with IntelliJ IDEA
Open Maven's pom.xml file and remove <scope>provided</scope> line from storm dependency. This enables IntelliJ to compile storm dependency on build.
Go to /src/jvm/storm/starter/, right click on ExclamationTopology file and Run 'ExclamationTop....main()'
From within IntelliJ, if you get Clojure related compiler errors involving LocalCluster then .... do a mvn clean install -DskipTests from the command line on the same project first. Then do a 'Rebuild Project' from within IntelliJ. Life is full of mysteries :-).
You need to also ensure that the storm-core is not in provided scope for storm-starter.
I am trying to build jahia from source for a project at school. From the instructions online, all I seem to find to run is
maven install
which fails... any help would be much appreciated.
Jahia is a Maven 2 project, the command you posted, "maven install", is the command for building with Maven 1.
To use Maven 2, you need to run the "mvn install" command. For details on installing Maven 2 check out the installation section of the Maven book.
The Jahia pom defines a repositories section, so should be able to access all the required dependencies.
If you have problems running the mvn command, please update your question with the build trace.