Mavenize Grails project not works in STS - maven

I am using STS 3.6.1, Java 7, Grails 2.4.3.
When create a normal Grails project, it works good. However, my Grails project need to depends on other java projects, so I convert it to maven project. After that STS prompt error
Could not find the grails dependency file. This probably means that there is a bad dependency in the pom file.
java.lang.Exception
The maven grails project can be build in grails command.
How to resolve is issue? Or if there is walk around to let grails project depends on other Java project.

Related

Packaging issue with Maven project in STS

I have set up one spring boot project at STS IDE .
Getting issue with maven read with JDK 1.8 java version
I have restart the IDE
Error - Project build error: Invalid packaging for parent POM
org.springframework.boot:spring-boot-starter:1.5.9.RELEASE, must be
"pom" but is "jar".

deployment error through maven using ----java jar <jarfile>.jar

I have created a Spring Starter data jpa project and its connecting with mysql. through STS its running fine.
i wanted to deploy it individually so i clean install the application using maven and used java jar <jarfile.jar> in command prompt.
I followed the video of java brains.
Below is the error which get
JAXB is not found.
It seems that you set the scope of the JAXB dependency to provided or built the project for an old Java Version (like Java 8) that comes with JAXB and run it with a newer Java version (like Java 10) that does not come with JAXB.
You can fix this by adding the JAXB dependency to the classpath when running the JAR or by adding the dependency to your project manually(or set the scope to compile)

maven does not copy dependencies

I have Dynamic Web Application project in eclipse that was converted to maven project.
Problem is that all dependencies are copied to:
<project>/target/<project>-SNAPSHOT/WEB-INF/lib
not <project>/WebContent/WEB-INF/lib
so when I run application from eclipse, there are no libs from maven and I get some errors.
I assume that application started from eclipse i.e on tomcat server gets it source from <project>/WebContent/WEB-INF/lib.
You should use m2e (Maven Plugin for Eclipse). It automatically adds Maven dependencies to the classpath, so you donĀ“t need them in /WEB-INF/lib while running from Eclipse.

MyEclipse 8.5 creating 'maven-archetype-quickstart' has encountered a prob?

I use the built-in maven of MyEclipse 8.5 to create maven projects.
It shows the following error:
Image is here:pic
Sorry, because I'm new I can't post pictures here yet.
I did it twice on two computers (both are MyEclipse 8.5), but the error was the same.
I use a Eclipse to do the same job and it is successful.
But when using MyEclipse 8.5 to do the job if check "create a simple project (skip archetype selection)" during the process, the project can be created and no error happens, but there is no the folder "Maven Dependencies" in the project created in Package Explorer.
Is this a bug of this version of MyEclipse? Because Eclipse Indigo works fine on this.
If you create a simple project, the folder Maven Dependencies is missing simply because there are no Maven Dependencies in a simple project. Just add a dependency, and the folder Maven Dependencies should be created with your dependency in it.

POM file for integrating Grails with Maven, with dependencies in BuildConfig.groovy

I've got a Grails application as part of a larger Java source bas that's all built with Maven. I'd like to include the Grails app in the Maven continuous integration, nightly builds, etc.
(Ideally I'd also like it to be part of a Maven parent-project hierarchy, so I could pick up live code changes from other projects without having to install them into my local repository. I would also like a pony.)
I tried running "grails create-pom", setting "pom true" in BuildConfig.groovy, and using the POM to manage my dependencies. However, this left me stuck in org.xml.sax.Locator classloader hell. So I went back to using BuildConfig.groovy for my dependencies.
I understand that "pom true" is a recent (Grails 2.1.0) feature, and it should be possible to integrate Grails into a Maven build while still managing dependencies in BuildConfig.groovy. Problem is, I can't find any documentation on what should go into the POM in that case. What do I put in my POM?

Resources