Maven build failure - Eclipse plugin - Tycho - java

I was trying to build eclipse plug-in using Tycho and while executing following command
mvn org.codehaus.tycho:maven-tycho-plugin:generate-poms -DgroupId=tycho.demo -Dtycho.targetPlatform=D:\practice\java\eclipse_galilio
I got error like
java.lang.NoSuchMethodError: org.codehaus.plexus.PlexusContainer.lookup(Ljava/lang/Class;)Ljava/lang/Object;
can anyone tell me what should be done to resolve this error. I am stuck at this point and not able to proceed.

What version of maven are you running? Tycho requires Maven 3. I can get that error trying to run on maven 2.1.0.

Related

Groovy files throwing ClassNotFoundException in Java Spring Boot application

I have updated my STS to v4 few days ago,since then I unable to run my application which has groovy files.
I have installed Groovy Development plugin and tried to build the project using the maven command "clean install".
Maven build has been successfully executed, but when I started my project it throws that the Groovy class has not found exception.
I tried cleaning the project many times, but getting the same ClassNotFoundException for the Groovy classes.
My STS v4 installation details:
Java Build path details:
Error Details, while I am running the project:
That parser class is the groovy class which throws ClassNotFoundException.
Moreover, I the project explorer some strange icon is shown next to those kind of groovy files.
I am also attaching the maven build details,
these build information shows that those groovy files are compiled successfully, but still it throws ClassNotFoundException while starting the application.
NOTE: I gave clean - build, "clean compile" and updated maven project more than 15 times. Yet no luck.
Please help me in reSolving this issue SO!
Found the answer!
Compiler mismatch is the culprit here.

Maven "Update Project" operation in Eclipse results in PMD "unable to find referenced rule" error

I have a Maven project imported into Eclipse via m2e. The project includes Spring and other dependencies, but for some reason they are not being recognized by Eclipse at all. When I attempt to use "Update Project..." (right click => Maven => Update Project) to rectify the issue, I get the following error:
An internal error occurred during: "Updating Maven Project".
Unable to find referenced rule EmptyIfStmt; perhaps the rule name is misspelled?
PMD and Checkstyle are not enabled for this project. Any ideas as to why I might be getting the error and/or how to address it?
The project builds fine via "mvn clean install," so I assume that this issue is Eclipse-specific.
I've tried disabling and re-enabling the Maven nature of the project but to no avail. I end up getting the same error upon converting the project back to a Maven one.
Go to your project folder and run mvn eclipse:eclipse before running Update Project. I hope it will resolve the issue.
The maven-eclipse-plugin (used in mvn eclipse:eclipse) is discontinued and shouldn't be used anymore. M2Eclipse replaces it for most, if not all, usage.

Eclipse build errors when using Gradle or Maven?

When using a build manager like Gradle or Maven, my dependencies are being managed correctly, however the Eclipse IDE is unaware of the resolved dependencies so it will still show errors and I cannot build through Eclipse, I have to run a 'build' command through the build manager.
How do you get Eclipse to be aware of the resolved dependencies taken care of by a build manager and running the app through the IDE?
You can generate Eclipse metadata using eclipse plugin distribute with Gradle - http://www.gradle.org/docs/current/userguide/eclipse_plugin.html - this will set up the project with its classpath.
Or install Gradle plugin for Eclipse developed by Pivotal folks.
The question is vague. Using m2e or Gradle plugin for Eclipse developed by Pivotal can lead you to different errors. You should ask exact question, sharing error that you got here on stackoverflow.

Maven NatTable clean+install failure

I'm trying to import and resolve the developer projects for the NatTable project as explained in their Getting Started tutorial.
I'm getting the following error on mvn -f [path to pom] clean install:
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSession;
More details:
mvn --version works fine
%MAVEN_HOME% points to [devel]/maven-3.1.0
The NatTable project seems to have configured the Tycho build extension in a version which is not compatible with Maven 3.1.
Either ask the project to switch to a Tycho version which works with Maven 3.1 (0.18.1 or later), or downgrade your local Maven installation to 3.0.5.
The NatTable project recently updated to use Maven Tycho 0.19.0.
Thanks for the hint.

Building a project with maven

I am trying to execute a sample application from here: http://www.ixtendo.com/secure-your-jsf-application-with-jaas/#comment-3792. The author says:
To build the project, you have to install Maven and call mvn clean package.
I have installed Maven in my Ubuntu 12.04. But I am new to Maven and don't know how to build the project with it. Could someone please explain in detail how to build the project with Maven?
The command mvn clean will work only if you are executing the command from the context of the application where pom.xml is located.
here is a quick tutorial for Maven.

Categories

Resources