Apache Geode Pulse WAR File - geode

I am following the Apache Geode build instructions to build the project. My environment is Windows 10.
What I am actually interested is to get Geode Pulse WAR artifact from the build. However, the build is not successful because of errors like this,
> Could not resolve all files for configuration ':geode-core:integrationTestCompileClasspath'.
> Could not find log4j-core-tests.jar (org.apache.logging.log4j:log4j-core:2.11.1).
Searched in the following locations:
file:/C:/Users/james/.m2/repository/org/apache/logging/log4j/log4j-core/2.11.1/log4j-core-2.11.1-tests.jar
> Could not find log4j-core-test-sources.jar (org.apache.logging.log4j:log4j-core:2.11.1).
Searched in the following locations:
file:/C:/Users/james/.m2/repository/org/apache/logging/log4j/log4j-core/2.11.1/log4j-core-2.11.1-test-sources.jar
How do I skip all the tests including integration tests or continue to build with tests failure? I have tried gradlew build -x test but it broke with the same build error. Please advise. Thanks

I've had this issue in the past and I believe it's related to your local MAVEN repository, not to Geode. Can you try to entirely remove the folder C:/Users/james/.m2/repository/org/apache/logging/log4j/log4j-core/2.11.1 and try again?, MAVEN will surely download the jar from scratch and everything should work fine.
Cheers.

Related

Gatling Build from Frontline Exception

Gatling Build is failing with exception:
[ERROR] Failed to execute goal
io.gatling.frontline:frontline-maven-plugin:1.0.3:package (default) on
project msg-service-prf: Execution default of goal
io.gatling.frontline:frontline-maven-plugin:1.0.3:package failed:
java.util.zip.ZipException: error in opening zip file -> [Help 1].
Same thing is working fine from local laptop.
Gatling version using: 3.3.1.
More details on what I did:
Since, the existing Gatling support is not able providing support for multiple connections, we tried to extend it from Gatling code. As part of that, one scala Gatling source file is modified and tried testing it.
It worked fine in local laptop. But, I configured the TC in Frontline and started test, it went to Broken state. logs showing the above error.
What I did to resolve this:
1) excluded the Gatling jms jar in pom.xml. because, "gatling jms" source project is available for the targeted project as source. locally, it's not giving any issue.
If anyone of you come across such issue, please let me know how did you solve the issue.
It looks like maven didn't properly download the frontline-maven-plugin jar and it ended up corrupted in the maven local cache on your FrontLine machine.
Please remove ~/.m2/repository/io/gatling/frontline/frontline-maven-plugin directory and try again.

Maven - Artifcat Descriptor Exception - Local Repository and Online Conflict

So, I have a bit of a problem and being a bit new to Maven am not sure how to procede.
I have a Maven Project with a bunch of dependencies. Most of them are the typical stuff like Jackson, Mongo, Junit, etc. However, I also have dependencies on some local requirements that I have.
In eclipse I went File->Import->Install Or Deploay an Artifact to a Maven Repo
I point to the proper artifact and it's coresponding pom file and all is well. the pom.xml file doesn't throw any errors and all is good. However, if I go to the overview or look at the code in general it's not picking up these libraries.
I went and verified in my .m2\repository folder and all the libraries are there. I used 7zip and the code is in the jars as I'd except.
So, I thought - I'll try to do a Maven Update and have it be done in Offline mode to tell it to look at the local repos. Well, if I do that - the following error occurs:
UnresolvableModelException: Cannot access central (http://repo.maven.apache.org/maven2) in offline mode and the artifact has not been downloaded from it before.
If I then go back and try to do a regular update I get the following
ArtifactDescriptorException: Failed to read artifact descriptor for XXXX:YYYY which is my local repository stuff.
Seems I lose either one or the other.
Any help would be great!
Try to run Maven in debug mode with -X option :
mvn install -X
You should see more information :
[DEBUG] Reading global settings from D:\tools\apache-maven-3.2.1\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\jrrevy\.m2\settings.xml
[DEBUG] Using local repository at D:\tools\apache-maven-3.0.5\.m2\repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for D:\tools\apache-maven-3.0.5\.m2\repository
$M2_HOME or localrepository could be wrong due to settings.xml not configured or overriden by another one. This often happen, even to me.

source is missing when debugging maven build configuration

I have a maven build run configuration which I use to start tomcat server. Barely this is tomcat:run command which is executed by m2eclipse plugin.
That was all fine until I needed to jump into spring source code. I can not set source code lookup for debugger!!! All jars have their source code location setup, so I can open spring classes by Ctrl+click. But debugger seems does not understand this settings, I tried to add project to source code lookup, but that worked only for code that is in that project and not in its dependencies.
Try Igor's source lookup feature, it will help you get jar sources automatically during external process execution (maven plugin invocation, in your case).

Errors when importing Mahout's maven resource to eclipse

I'm trying to import Mahout's maven resource to eclipse, but i meet these errors:
I have tried google but it doesn't help.
Eclipse : Helios Service Release 1
Maven : External Maven 3.
Edit: If I try to play with latest stable release ( Mahout 0.7 ) and not the latest snapshot that the official site recommends for downloading, I experience the same error.
Follow step-by-step this link: https://cwiki.apache.org/MAHOUT/buildingmahout.html
After doing this and re-importing mahout, these errors you noticed go away.
Notice: Before compiling the code in the right way (as stated at the link above), I have followed the instructions from here:
http://domengrabec.wordpress.com/2010/12/14/installing-maven-on-eclipse/
Q: If anyone could help me with this related issue:
Include classes of Mahout math libraries of both core & math folders - Eclipse - Hadoop , I would be grateful.
I think what you need is to build mahout in a different way,
first install m2e plugin for eclipse, then you can create maven project. You can make the run configuration (package) after that to make sure everything is fine.
The important part is that you have the pom.xml in the project so you have to add the dependencies of mahout that you want.
You can get the dependencies from searching on google " name of the dependency in mahout api".
i solved it by manually applying the patch in https://issues.apache.org/jira/browse/MAHOUT-1043 to 0.7 sources (changes pom.xml files and src/conf/driver.classes.conf )
just one note, do not remove the groupid in distribution/pom.xml
launch an external mvn eclipse:clean and update the projects. All errors are gone when workspace is rebuilt

gwt-maven-plugin with Eclipse Indigo

I would just like to setup a new GWT project in Eclipse and use Maven for dealing with all the jar jungle. I used gwt-maven-plugin with this instructions, but I can't get the project to work in Eclipse.
What I've actually done:
Created a maven project using the archetype gwt in command line.
Imported the projet in eclipse using import > existing maven project
While doing that I had errors saying:
gwt-maven-plugin:2.3.0-1:generateAsync - "No marketplace entries found to handle"
gwt-maven-plugin:2.3.0-1:i18n - "No marketplace entries found to handle"
gwt-maven-plugin:2.3.0-1:exploded - "No marketplace entries found to handle"
These errors don't go away even if I ignore them on the import.
How can I make these projects working? Is the problem that I skipped the "process-resources" setting? (There is no such setting in the latest version of m2e.)
Should I even use gwt-maven-plugin? Is there any other way of making a GWT project to use Maven? Or – is there any other way to fight with the jar jungle? What does GWT guys use?
I use Eclipse Indigo with m2e plugin 1.0.0 and Google suite plugin version 2.3.3.
Eventually I gave up Maven. As one other developer said "good ideas and bad code build communities faster" , I also remember my experience with Maven on all the projects: very promising on the beginning, but eventually you get to some problems and end up working more with configuring Maven than actually dealing with your own code.
I decided to manually copy needed .jar-s into /lib folder. I spent some time due to transitive dependencies, but LESS than dealing with Maven and now I have things under control. If sometime in the future working with libraries will become an overhead, I will consider using Ivy.
If someone wishes to stick with Maven, I lately found a very useful link by Google team:
http://code.google.com/p/google-web-toolkit/wiki/WorkingWithMaven
They recommend using their sample projects and not gwt-maven-plugin archetypes (due to issues). I agree. They also provide needed pom lifecycle changes for Eclipse Indigo.
According to a recent post on the gwt-maven-plugin mailing list the Maven integration is not complete for Eclipse Indigo, since the M2Eclipse 1.0 release has brought about a large number of changes. The suggested workarounds from David Chandler, Google engineer, are:
You can run "mvn package" on the command line or right-click on the project > Maven > Run as > Maven build.
The plugin execution failures you're seeing can be resolved by adding lifecycle mapping metadata as in the sample POMs. They are only needed for Indigo. You should not get these errors in Helios or when running mvn package from the command line.
Disclaimer: The following guidelines are for Windows users. These steps are on the basis that, they have worked when tried by the replier and doesn't guarantee fulfledge working unless experimented by self and tried with proper prerequisites.
::Creating a simple gwt project using archetype::
Following are few commands that can be used to create a simple gwt project "Web Starter Application":
mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo
-DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.3.0
mvn -DarchetypeGroupId=org.codehaus.mojo
-DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.3.0 -DgroupId={project packaging} -DartifactId={application name} -Dversion=1.0 org.apache.maven.plugins:maven-archetype-plugin:generate
mvn -DarchetypeGroupId=org.codehaus.mojo
-DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.3.0 -DgroupId={project packaging} -DartifactId={application name} -Dversion=1.0 -Dmodule={module name} org.apache.maven.plugins:maven-archetype-plugin:generate
(The value of archetypeVersion can be 2.3.0 or any higher stable version.)
Few coordinates are required by maven to create the gwt project. They are as follows:
groupId
artifactId
version
module
The first command doesn't take any of the above coordinates hence, we need to supply them at the time it executes. Notice that the archetype goal is mentioned right at the beginning of the command. It is mandatory to give the archetype goal.
The meanings of these coordinates can be found here.
One of the best ways to start with understanding maven is this.
The second command doesn't consider the module name hence, you will be prompted to give it at the time the command executes.
The third command is equivalent to running it in batch mode where you just have to confirm the inputs for groupId, artifactId, version, module as mentioned in command itself.
Once any of these commands gives a BUILD SUCCESS result, then navigate to the just-now-created project folder from command line and execute the following command:
mvn gwt:run
It should start the project in Development Mode so that you can Launch the Default Browser to run the project or Copy the URL to clipboard and navigate to it through any browser.
Good luck with the execution.