I use "atlas-create-confluence-plugin" to create a Confluence plugin skeleton, and found the pom.xml has many red lines, some are for project build error and some are for dependancy missing.
As below picture shows, the red lines indicate many errors:
How could I resolve the red lines since I used the official command to create this plugin project and didn't make any modification in the project.
I had the same problem in my Eclipse, because my Eclipse was configured with m2e Maven Integration for Eclipse.
For example, Eclipse Maven can't resolve the packaging atlassian-packaging. You don't have to worry about the pom.xml errors because you'll be compiling, packaging, cleaning, etc. thru the terminal/command prompt using the atlas-mvn commands. You don't compile, build, etc. using Eclipse. Eclipse sort of becomes your glorified editor.
Related
I am trying to develop with Eclipse 2020.6 and m2e using openJDK-11 on Win10.
The computer is maintained by IT department having jre-8 in its PATH and I dot have the rights to change that.
I have installed JDK11 below my user folder.
Changed eclipse.ini for Eclipse and toolchain.xml for commandline Maven.
I also checked Module Dependencies in Java Build Path: com.sun.tools.jar is no longer there.
Commandline Maven and Eclipse are using JDK11 instead of jre-8, except the eclipse-editor for pom.xml.
It shows Missing artifact com.sun:tools:jar:1.8.0
I checked Dependency Hierarchie with the pom.xml editor and it shows that ant:1.10.8 depends on tools:1.8.0. But this information must be wrong, as the project tests and installs correctly.
I guess, the eclipse-editor for pom.xml somehow does not use the java libaries pointed to by eclipse.ini or toolchain.xml or those configured with the project Build Path.
Eclipse Preferences/Maven/User Settings points to the local repository .m2\repository and to the user settings .m2\settings.xml. I also copied toolchain.xml to .m2, but without solving the problem.
Please note that I do not have any problem running Maven from within Eclipse. It works as expected. My problem is, that errors are flagged within Eclipse where there is none.
Why does the pom.xml editor in Eclipse complains about tools.jar:1.8.0? How can I make m2e not using java from the PATH but using JDK11 installation for my developments in Eclipse?
I am trying to achieve the following between Eclipse and Gradle:
Allow Gradle to handle 100% of my local build logic; only use Eclipse as an IDE for syntax highlighting, refactoring, etc. Every time I wish to build my app I want to drop into a command line and run a Gradle build invocation from there.
I want the dependencies closure of my build.gradle file to be the sole location for configuring 3rd party dependencies; every time I make a change to this closure (adding/removing a dependency/JAR), I want Eclipse to automagically "see" this change and adjust my project's classpath accordingly
I installed the Gradle-Eclipse Integration plugin and then I followed this tutorial for configuring it correctly.
First I ran:
gradle clean build
And then I added:
apply plugin: 'eclipse'
To my build.gradle, and then ran:
gradle eclipse
I saw a lot of output, the tail end of which is:
gradle eclipse
:myapp:eclipseClasspath
Download http://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2-sources.jar
Download http://repo1.maven.org/maven2/org/sonatype/sisu/inject/cglib/2.2.1-v20090111/cglib-2.2.1-v20090111-sources.jar
Download http://repo1.maven.org/maven2/asm/asm/3.1/asm-3.1-sources.jar
Download http://repo1.maven.org/maven2/com/google/inject/guice/3.0/guice-3.0-sources.jar
Download http://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/2.3.7/groovy-all-2.3.7-sources.jar
Download http://repo1.maven.org/maven2/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar
Download http://repo1.maven.org/maven2/javax/inject/javax.inject/1/javax.inject-1-sources.jar
:myapp:eclipseJdt
:myapp:eclipseProject
:myapp:eclipse
I then opened my .classpath file and see that its been correctly updated with all the transitive dependencies defined in my dependencies closure back inside build.gradle.
However, there is not visual indication inside Eclipse that anything is wired correctly. With Ivy or Maven, you usally get something like a Ivy Repository Manager or Maven Dependency Library that automatically changes anytime you modify ivy.xml or pom.xml.
Most importantly, this just doesn't seem to be working! As you see above, Apache Commons Lang 3 is a dependency, but when I try to add org.apache.commons.lang3.exception.ExceptionUtils to a Groovy source file, Eclipse can't find it. I have already tried restarting Eclipse to see if that shook any bugs out.
Am I just not using this plugin correctly, or does it just not work? Using Groovy/Grails Tool Suite 3.6.0.RELEASE here, which is based on Eclipse Luna 4.4.
I am new to eclipse and maven. I have been trying for two days to run the storm starter project and am hitting a number of problems.
I have a couple of questions of which I will explain my attempts below.
How can I import this project in to eclipse so that it runs and retrieves all required dependencies.
How can I start a storm project from scratch in eclipse. When I start a new maven project and add storm dependency, it only adds storm, and not all of its dependencies.
What I have tried:
I have the latest m2eclipse plugin installed. When I choose import existing maven project (I change the m2-pom.xml to pom.xml I dont know why it is named m2-pom) everything looks ok, but when I do maven install, in maven build, i get the error
clojure-maven-plugin:1.3.8:compile(1 errors)
No marketplace entries found to handle clojure-maven-plugin:1.3.8:compile in Eclipse. Please see Help for more information.
I have tried maven 2 and 3, I have tried creating a new java project then adding a maven configuration and running that.
I have got to the point where it looks like all dependencies have been downloaded, but in my project, all backtype types are still underlined in red and it when I hover over them, it does say import..
I also had another attempt when it said "import backtype.storm..." but when I cliked it the dependency still didnt resolve.
The code I am trying to run is:
https://github.com/nathanmarz/storm-starter
Please help
#girlcoder: I had a similar issue while playing with the "storm-starter" project (i.e. backtype types not recognized despite importing them). I used IntelliJ IDEA at that time, but the fix I found may apply to your case as well:
In the pom.xml file (I also renamed m2-pom.xml as pom.xml), go to the section that defines the dependency on Storm and change its scope to "compile":
<dependency>
<groupId>storm</groupId>
<artifactId>storm</artifactId>
<version>0.9.0.1</version>
<!-- keep storm out of the jar-with-dependencies -->
<!--<scope>provided</scope>-->
<scope>compile</scope>
</dependency>
I used the "provided" scope when deploying the topologies to an actual Storm cluster, but I had to change the scope to "compile" to submit a topology to a LocalCluster. I hope this will help you solve the problem.
UPDATE: I am now trying to package storm-starter in Eclipse 4.3. It turned out that the pom.xml file is not compatible with the m2e eclipse plugin. Besides the modification I suggested above, I was able to compile the project only after changing the pom.xml as described here: https://github.com/nathanmarz/storm-starter/issues/23.
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.
I have configured Eclipse to use ant for doing the builds by setting the builders in project properties to point to the ant build script.
The build goes thru fine. However in my eclipse project I have not imported the required jars as a part of the project settings. All of this is done in ant's build.xml.
So in the java files, I get red squiglly lines for all the import packages which eclipse is not able to resolve.
How do I make these squiglly lines go away? One way is to import the required jars in eclipse, but then I am maintaining the project at two places, ant build.xml and eclipse
go to Project Properties/Build Path and enter the jars you rely on there.
You could use Ivy to manage your dependencies. If you configure it properly, you will only be defining the jars in one place but both Eclipse and Ant will be able to see them. The eclipse plug-in is IvyDE.