I was working with a Java project in the IntelliJ platform and started over after reinstalling the Mac OS again. The project structure looks slightly weird now with BitCoinWalletApp[1] and BitCoinWalletApp[2],
When I run with the Tomcat 8, I get the following error,
Error:Cannot build artifact 'BitcoinWalletApp (2):war exploded' because it is included into a circular dependency (artifact 'BitcoinWalletApp (2):war exploded', artifact 'BitcoinWalletApp (1):war exploded')
Whats the issue here and how to solve it?
turns out this happened because the project has more than one pom.xml file which intelliJ detected as another source of valid pom.xml, in this case its pom.xml.back, to fix it, delete the backup version of your pom.xml
Related
I have been working on a Java Maven project and my way of using it in Eclipse was to build it on command line and then import in Eclipse. The problem that I was facing is even though the project built successfully, eclipse was not able to resolve dependencies correctly.
This problem would usually go by cleaning, Maven updating and deleting and importing. However, this time it did not get resolved by following these steps. I tried a lot of already existing answers but nothing worked for me. However, I observed that the classpath is not getting created correctly:
I'm seeing that one of the dependency jars is marked as missing
I tried to create the Eclipse .classpath file using:
mvn eclipse:clean
mvn eclipse:eclipse
But mvn eclipse:eclipse fails with the following message:
Failed to execute goal on project consultation: Could not resolve
dependencies for project
company.compliance:consultation:jar:1.0-SNAPSHOT: Failure to find
company.compliance:commons:jar:1.0-SNAPSHOT in
http://maven.ia55.net/company was cached in the local repository,
resolution will not be reattempted until the update interval of
company-mvn-repository has elapsed or updates are forced -> [Help 1]
I read in some of the answers that this can also happen if m2e is not configured properly (it should be pointing to the commandline maven and not embedded maven). When I checked I saw that I don't even have m2e so in installed it. I don't know how to configure it to point to my Maven.
However, I doubt that this problem is because of the plugin not working otherwise I would not have been able to work in Eclipse peacefully till now.
So my other question is, isn't the success of mvn clean package enough to warrant that eclipse should not have any compilation errors regarding dependencies or does scope of dependency also plays a role and that I should work on getting the jar in the repo.
Is there any other possible issue that I am missing?
The issue got resolved. Earlier i was only importing the project that i wanted to work on. After importing all the projects in the directory which contained the pom, eclipse resolved the dependencies. Have no clue how this worked but it did.
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 have a maven project and I'm getting this error in Eclipse:
Description Resource Path Location Type
org.codehaus.plexus.archiver.jar.Manifest.write(java.io.PrintWriter) pom.xml /rpc-server line
1 Maven Configuration Problem
I can to run mvn clean install with no problems on command line.
This is just annoying and I'm hoping someone else already tackled this.
Using Eclipse Java EE IDE version 2.0.2.20140224,
with m2e connector for mavenarchiver pom properties version 0.17.1.201605251832.
Thanks
Your problem can be solved via
https://otto.takari.io/content/sites/m2e.extras/m2eclipse-mavenarchiver/0.17.2/N/LATEST/
I have a project that runs Spring and I am using IntelliJ as the compiler. I started building the project in Ubuntu but I was having problems viewing my database edits so I switched to Windows and lost my Ubuntu partition (due to some other unrelated error). I am trying to reset up my project in Windows but I can't get it to compile properly.
I have tried redownloading IntelliJ, restarting my computer, clean installing maven, and searching everywhere for a solution. I found a link on IntelliJ's website but they never actually address a solution to the problem ( http://devnet.jetbrains.com/thread/436515 ). I started to try the unfinished advice to "remove all artifacts selected for deployment from the list and then add them again" but I cannot figure out how to add them again once deleted.
Additionally, I keep seeing the error "Configuration Error: deployment source '(projectname): war exploded' is not valid"
Any advice or tips to what I could try or am doing wrong would be great.
Thanks!
This will happen when you remove an artifact that is already set in the configuration. You can see the artifact is red in the configuration:
To solve it, just removed the missing one and add another valid artifact.
Edit Configurations - deployment add your artifacts.
Maybe you can try the following process.
1.Open Project Structure add an artifact (web application:exploded) from modules, select your module, add it:
2.Build Artifacts [(top menu) - build - build artifacts - build]
3.Edit Configurations - deployment add your artifacts
I fixed the issue for me.
I do not know why, but for some reason my .war file got corrupted. I went to Project Structure > Artifacts, deleted my old artifact (which IntelliJ already highlighted red) and added it again.
One of the reason it may happen is, you have restructured your project packages. In that case you have to re-adjust your run configuration in the intelliJ. Edit Configuration > Deployment (On your server) > Delete the existing one and add newly build war again.
Long time ago, i faced similar issue. I made a Spring MVC webapp using IntelliJ on Ubuntu(Running on a VM).
Later on when i tried to run it on Windows IntelliJ, it went bonkers... so to fix that...
I deleted all IntelliJ configuration files, *.iml target WARs
and then it worked fine.
For those who restructured and/or moved a lot of files; a rebuild will fix this error
Build Artifacts (Top menu - Build - Build Artifacts):
In eclipse when I build I get the following warnings:
2/18/14, 4:30:35 PM MST: [INFO] Using org.maven.ide.eclipse.wtp.WarLifecycleMapping lifecycle mapping for MavenProject: com.foo:bar:14.4.19-SNAPSHOT # C:\dev\code\apps\iv\pom.xml.
2/18/14, 4:30:35 PM MST: [WARN] The POM for com.foo.libraries:s2j:jar:1.0.3-SNAPSHOT is missing, no dependency information available
2/18/14, 4:30:35 PM MST: [WARN] The POM for com.foo.libraries:caching:jar:1.0.1-SNAPSHOT is missing, no dependency information available
2/18/14, 4:30:35 PM MST: [WARN] The POM for com.foo.libraries:email:jar:1.0.1-SNAPSHOT is missing, no dependency information available
...
And so on. The build does not complete and I am unable to get anything more in my target directory than the m2e-wtp/web-resources folder.
When I build from the command line, there are no issues, these artifacts are found just fine. They certainly are in my local repository, why does this happen?
Some further details from experiments:
Deleting my local repository and rebuilding in eclipse downloaded some of the artifacts, but resulted in more artifacts to not be found (originally I had 5 missing artifacts, now I have 7). Those that were not found were not downloaded from Nexus.
After having deleted the repository in the experiment above, I then built from the command line and those artifacts that had been listed as missing were downloaded and the build was successful. However, going back to eclipse results in the same errors (despite now having them in my local repository).
Inside eclipse when I "Run As" > "Maven Install" The missing artifacts are downloaded and are found. If I do an eclipse "Build Project" after this I still get the same issue.
Other projects within eclipse are experiencing the same issues on the same artifacts.
Something similar happened to me once. I've checkout com.foo:bar as well as com.foo.libraries:s2j, but I haven't configure the library as maven project in eclipse. So the maven install worked just fine (only the pom file was used), but the eclipse build failed.
So check that all the projects are configured as maven ones and try Maven > Update project and check Force update of snapshots and Clean projects.
I found the solution.
Apparently when I did a mass close of workspace resolved projects some of them were left in a bad state. It looks like eclipse was trying to find the jar as a workspace resolved project, but the projects were closed and caused the result that they didn't exists (instead of looking at my local repository).
Once I opened (and then closed) the respective project for each of the missing dependencies they were then found in my local repository.