The import com.xom.dm.mulesoft.AbstractInputTransformer cannot be resolved - java-8

I am new to the Mulesoft and Java. We have a Mule application in Mule 3.9.1, jdk8 and Maven 3.8.4. I am getting below errors could you please help to resolve the Anypoint Studio setup issues.
The import com.xom.dm.mulesoft.AbstractInputTransformer cannot be resolved
The method getFunctionalMap(String) of type PlannerGroupsInputTransformer must override a superclass method
Unable to find type 'org.mule.module.apikit.exception.NotFoundException'
<modelVersion>4.0.0</modelVersion>
<groupId>com.xom.dm.project</groupId>
<artifactId>dm-10-notifications</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>mule</packaging>
<name>Mule Application</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<mule.version>3.9.1</mule.version>
<mule.tools.version>1.2</mule.tools.version>
<munit.version>1.3.8</munit.version>
<mule.munit.support.version>3.9.1</mule.munit.support.version>
<service.instance>${instance}</service.instance>
</properties>
I have tried changing build path and jre libraries... nothing works.

Probably the project is not correctly configured to build with Anypoint Studio 6 built-in Maven support. That you are trying to configure manually the build path is a tip that something is wrong for a Maven based project. Studio should configure the build path automatically from the pom. You must not change it manually. Read the documentation pages for that feature that I shared above and all its child pages to learn how to use a Maven project correctly in Studio 6.

Related

Error:java: release version 5 not supported

I have a maven project in IntelliJ IDEA;
When I run the test using mvn test everything is fine, but when I use
the green arrow on IntelliJ IDEA I got this error: Error:java: release version 5 not supported
Go to: File->Project structure->Project and configure Project SDK to 1.8
It is a common error in IntelliJ.
Try adding
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
to your POM file.
Or:
update Java Compiler
update SDK version

creating Spring boot starter project

When i create my spring Boot starter project im getting error as maven configuration problem. Please help me to solve.
enter image description here
Similar Bug was reported in eclipse: https://bugs.eclipse.org/bugs/show_bug.cgi?id=547340
You can fix this by temporary downgrading the maven jar plugin version to 3.1.1 from 3.1.2. Add this to the properties section:
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
In your pom.xml
<properties>
<java.version>1.8</java.version>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
</properties>
Update: A fix has been released. Click Help > Check for updates in Eclipse/STS and install the newest m2e connector.

maven - remove -SNAPSHOT from properties tag in pom.xml

The parent pom.xml of my application contains the following snippet:
...
<version>2.0-SNAPSHOT</version>
...
<properties>
<property.version>1.0-SNAPSHOT</property.version>
</properties>
Essentially, I would like to update both the -SNAPSHOT versions to release versions. i.e., I want my resultant pom.xml to be like:
...
<version>2.0</version>
...
<properties>
<property.version>1.0</property.version>
</properties>
[Note: v1.0 of <property.version> is not yet deployed to the artifactory and also might not be the latest version available
There might exist more properties with SNAPSHOT versions that I do not want to update to release versions]
I figured out a way to update the <version> using maven versions:set plugin. However, I could not find any solution for updating the version (by removing -SNAPSHOT) inside the <properties> tag.
I've looked at documentations for versions:update-properties, versions:update-property.
I am trying to achieve this by using the mvn versions plugin, otherwise I would have to write a script (eg. shell) which would parse and do the needful.

How to import all provided Wildfly libraries in my maven project?

Is there a way to translate this human language in an xml codeblock that Maven will happily understand?
Hey Maven, look you are a great dependency management system. I am working on a JavaEE project which is intended to be deployed on Wildfly 10.1.0. Please put all Libraries that are specified in Wildflys parent BOM http://repo1.maven.org/maven2/org/wildfly/wildfly-parent/10.1.0.Final/wildfly-parent-10.1.0.Final.pom on the compiletime classpath and consider them as provided by Wildfly at runtime. And please dont bother me to list every single referenced artifact in the dependencies section of the projects pom file. Thank you Maven, you are so cool.
To clarify:
As far as I understand, importing the bom file in the dependencyManagement section of my pom file will only spare me to specify the Version Number of every single artifact, but I will still have to declare every artifactID and groupID.
This is indeed discussed here How to use BOM file with Maven
But in this answer is also stated:
Then you do not have to specify the version attribute of a dependency.
I would prefer to declare only that I am using wildfly and then be able to use all client libraries without declaring any other dependencies.
But I must admit, I have the feeling to miss something obvious. There should be an easy way to do this.
If you want everything in a another pom to be set as a dependency and as provided you can specify that in your pom. A minimal pom for wildfly 10.1.0.Final that includes everything seems to be as follows:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>wft</groupId>
<artifactId>wft</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>wft</name>
<description>wft</description>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>
<dependencies>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-spec-api</artifactId>
<version>10.1.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
But I would still recommend doing it the way that wildfly does it themselves, which is to put the BOM in the depencency management section and declare artifacts as you need them. Why? I don't know other than it's cleaner to read and maybe easier for maven/java to compile and build.

Intellij not detecting appropriate Java version in Tycho/Maven build

I'm trying to migrate a Tycho/Maven project from Eclipse PDE to Intellij and i'm having trouble getting Intellij to use the appropriate java source versions. In particular, my MANIFEST.MF has Bundle-RequiredExecutionEnvironment: JavaSE-1.7, and my tycho-compiler-plugin has configuration -> [source|target] both equal to 1.7. The modules are imported into Intellij as maven projects with an OSGI facet.
Whenever I reimport the poms for the modules, it sets the language-level in the module to 1.5, which I understand to be the default. Where does Intellij pick op the project language level for these projects such that I can get it to detect the one I'd like?
Got same problem. Solved with adding to pom.xml:
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>

Resources