Failed to execute goal org.apache.cxf on java-9 - java-9

Why I am facing the org.pache.cxf issue's even if I am using the same version which apache cxf document mentioned that apache cxf with java 9 supports 3.3.X versions but I am getting errors. Any help would be great to resolve the issue.
Below is my POM file with required dependencies.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-security</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.moxy</artifactId>
<version>3.3.0</version>
</dependency>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>3.3.0</version>
<dependencies>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-bindings-soap</artifactId>
<version>3.3.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>generate-jaxb</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated-sources/afxlink</sourceRoot>
<additionalJvmArgs>-Dfile.encoding=UTF8</additionalJvmArgs>
<wsdlOptions>
<wsdlOption>
<wsdl>https://test.com/sample.svc?wsdl</wsdl>
<!-- <wsdl>${basedir}/src/main/resources/wsdl/ABC.wsdl</wsdl> -->
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
Generated Error:
ERROR] Failed to execute goal org.apache.cxf:cxf-codegen-plugin:3.3.0:wsdl2java (generate-jaxb) on project tobp:
[ERROR] Exit code: 1
[ERROR] Command line was: "C:\Program Files\Java\jdk-9.0.4\bin\java.exe" --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=java.xml/com.sun.org.apache.xerces.internal.impl.xs=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED -Dfile.encoding=UTF8 -jar C:\Users\XXXXX\AppData\Local\Temp\cxf-tmp-13521710507515144969\cxf-codegen8120209960104723950.jar C:\Users\XXXXX\AppData\Local\Temp\cxf-tmp-13521710507515144969\cxf-w2j13650852005823843615args
[ERROR] -> [Help 1]

Related

How to generate jar file from wsdl present in maven project

Sample Structure
|-src
|-wsdl
|-Abc.wsdl
Can someone guide me for what plugins I have to use to generate jar file from wsdl
<plugin>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.3.2</version>
<executions>
<execution>
<id>generate-java-sources</id>
<phase>process-sources</phase>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<extension>true</extension>
<wsdlFiles>
<wsdlFile>${basedir}/src/wsdl/Abc.wsdl</wsdlFile>
</wsdlFiles>
<wsdlLocation>./src/wsdl/Abc.wsdl</wsdlLocation>
<sourceDestDir>src/main/java/</sourceDestDir>
<keep>true</keep>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>javax.jws</groupId>
<artifactId>javax.jws-api</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</plugin>
The above code is generate corresponding java code but what I need is jar file.
Thanks in advance 😊

'[TestNG] Couldn't find the testng.xml in the jar file, running all the classes' error while running test on AWS Device Farm

I am trying to run a test suite on AWS device farm, It is a Maven project, I get the following error on the device farm Parsing result document: [TestNG] Couldn't find the testng.xml in the jar file, running all the classes.
While creating the zip for AWS device farm from Maven I get the following warning:
[WARNING] The POM for org.testng:testng:jar:5.14.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details.
I have the latest version of testng and surefire plugin nothing seems to help. any help on this one will be much appreciated.
My pom.xml is as follows:
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
<groupId>com.pankanis.cameraplus </groupId>
<artifactId>CameraPlusApp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>CameraPlusApp</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<suiteXmlFile>./testng.xml</suiteXmlFile>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/io.appium/java-client -->
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.1</version>
</dependency>
<dependency>
<groupId>com.github.genium-framework</groupId>
<artifactId>Appium-Support</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>1.4.9</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
</dependency>
<dependency>
<groupId>com.sikulix</groupId>
<artifactId>sikulixapi</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.41.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.uncommons</groupId>
<artifactId>reportng</artifactId>
<version>1.1.4</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/dependency-jars/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>zip-with-dependencies</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/zip.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
You need to add the testng.xml to the root of the -tests.jar file created. To do this put it in the src/test/resources directory to take advantage of the super pom configuration. Alternatively, you can create some testResources tags to reference where the testng.xml is at currently.
Hope that helps
Just added a pull request here
https://github.com/awslabs/aws-device-farm-appium-tests-for-sample-app/pull/14
[update]
There is now a premium support article about this
https://aws.amazon.com/premiumsupport/knowledge-center/xml-file-tests-jar-file-device-farm/

MUnit test fails with Maven (Failed to invoke lifecycle phase "start")

We have a Mule flow with an associated MUnit test suite. The test runs fine when executed out of Anypoint Studio (right-click in the MUnit flow and select "Run MUnit Suite").
However with Maven with mvn test -X from the command line we get exceptions.
We are using Anypoint Studio 5.4.1 MUnit 1.1.0 Mule Version 3.6.1
Full stack trace:
[ERROR] Failed to execute goal com.mulesoft.munit.tools:munit-maven-plugin:1.1.0:test (test) on project integration_sci_entityapi: Execution test of goal com.mulesoft.munit.tools:munit-maven-plugin:1.1.0:test failed: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.util.queue.DelegateQueueManager#494a48cc: org.apache.commons.io.FileUtils.deleteQuietly(Ljava/io/File;)Z -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.mulesoft.munit.tools:munit-maven-plugin:1.1.0:test (test) on project integration_sci_entityapi: Execution test of goal com.mulesoft.munit.tools:munit-maven-plugin:1.1.0:test failed: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.util.queue.DelegateQueueManager#494a48cc
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution test of goal com.mulesoft.munit.tools:munit-maven-plugin:1.1.0:test failed: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.util.queue.DelegateQueueManager#494a48cc
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: java.lang.RuntimeException: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.util.queue.DelegateQueueManager#494a48cc
at org.mule.munit.runner.mule.MunitSuiteRunner.<init>(MunitSuiteRunner.java:48)
at org.mule.MUnitMojo.buildRunnerFor(MUnitMojo.java:311)
at org.mule.MUnitMojo.doExecute(MUnitMojo.java:173)
at org.mule.MUnitMojo.execute(MUnitMojo.java:122)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 more
Caused by: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.util.queue.DelegateQueueManager#494a48cc
at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:248)
at org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:273)
at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:152)
at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:123)
at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:76)
at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:136)
at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:91)
at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:87)
at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:69)
at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:61)
at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:278)
at org.mule.munit.runner.MuleContextManager.startMule(MuleContextManager.java:62)
at org.mule.munit.runner.MuleContextManager.startMule(MuleContextManager.java:57)
at org.mule.munit.runner.mule.MunitSuiteRunner.<init>(MunitSuiteRunner.java:42)
... 25 more
Caused by: java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.deleteQuietly(Ljava/io/File;)Z
at org.mule.util.journal.TransactionJournalFile.clear(TransactionJournalFile.java:161)
at org.mule.util.journal.TransactionJournal.clear(TransactionJournal.java:135)
at org.mule.util.journal.queue.AbstractQueueTransactionJournal.clear(AbstractQueueTransactionJournal.java:121)
at org.mule.util.journal.queue.LocalTxQueueTransactionRecoverer.recover(LocalTxQueueTransactionRecoverer.java:122)
at org.mule.util.queue.TransactionalQueueManager.start(TransactionalQueueManager.java:91)
at org.mule.util.queue.DelegateQueueManager.start(DelegateQueueManager.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:237)
... 38 more
And here is the POM file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>za.co.company.cmpy</groupId>
<artifactId>integration_cmpy_entityapi</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>mule</packaging>
<name>${project.groupId} :: ${project.artifactId} :: ${project.packaging}</name>
<scm>
<connection>scm:git:http://git.company.co.za/scm/cmpyon/Integration_cmpy_EntityApi.git</connection>
<developerConnection>scm:git:http://git.company.co.za/scm/cmpyon/Integration_cmpy_EntityApi.git</developerConnection>
<url>http://git.company.co.za/projects/cmpyON/repos/Integration_cmpy_EntityApi.git/browse</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<mule.version>3.6.2</mule.version>
<eclipsePluginVersion>2.8</eclipsePluginVersion>
<jdkName>JavaSE-1.7</jdkName>
<jdk.version>1.7</jdk.version>
<junit.version>4.9</junit.version>
<munit.version>1.1.0</munit.version>
<mule.munit.support.version>3.6.1</mule.munit.support.version>
</properties>
<build>
<filters>
<filter>src/main/resources/integration-cmpy-entityapi.properties</filter>
</filters>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
</resource>
</resources>
<!-- Use a newer version of the install plugin than what your Maven uses
by default. The older version failed to install the project if there was
no target/classes folder. Since we use mule packaging on the project we actually
create and attach the zip that must be installed. -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.mule.tools</groupId>
<artifactId>maven-mule-plugin</artifactId>
<versionRange>[1.6,)</versionRange>
<goals>
<goal>attach-test-resources</goal>
<goal>filter-resources </goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.mule.tools</groupId>
<artifactId>maven-mule-plugin</artifactId>
<version>1.9</version>
<extensions>true</extensions>
<configuration>
<copyToAppsDirectory>true</copyToAppsDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<encoding>ISO-8859-1</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>project</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>${eclipsePluginVersion}</version>
<configuration>
<!-- by default download all sources when generating project files -->
<downloadSources>true</downloadSources>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
</execution>
</executions>
<configuration>
<resources>
<resource>
<directory>src/main/app/</directory>
</resource>
<resource>
<directory>src/main/api/</directory>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>org.mule.MuleServer</mainClass>
<arguments>
<argument>-config</argument>
<argument>src/main/app/mule-config.xml</argument>
</arguments>
<classpathScope>compile</classpathScope>
</configuration>
</plugin>
<!--Install clover-plugins -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>copy-clover-plugins</id>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<overWriteReleases>true</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<stripVersion>true</stripVersion>
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
<artifactItems>
<artifactItem>
<groupId>com.cloveretl</groupId>
<artifactId>cloveretl-engine</artifactId>
<version>${mule.version}</version>
<type>zip</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>compile</phase>
<configuration>
<tasks>
<!-- Using an ant task to deflate cloveretl-engine.zip -->
<unzip dest="${project.build.testOutputDirectory}" src="${project.build.testOutputDirectory}/cloveretl-engine.zip"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.nicholasastuart</groupId>
<artifactId>mule-mmc-rest-plugin</artifactId>
<version>1.2.2-SNAPSHOT</version>
<executions>
<execution>
<id>mule-deploy</id>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<name>${artifactId}</name>
<username>${mulemmc.username}</username>
<password>${mulemmc.password}</password>
<version>${version}</version>
<serverGroup>${mulemmc.serverGroup}</serverGroup>
<muleApiUrl>${mulemmc.muleApiUrl}</muleApiUrl>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.mulesoft.munit.tools</groupId>
<artifactId>munit-maven-plugin</artifactId>
<version>${munit.version}</version>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<coverage>
<runCoverage>true</runCoverage>
<formats>
<format>html</format>
</formats>
</coverage>
</configuration>
</plugin>
</plugins>
<testResources>
<testResource>
<directory>src/test/munit</directory>
</testResource>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
</build>
<!-- plugins for creating site reports -->
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.4.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.5</version>
<configuration>
<configLocation>http://mulesoft.org/download/attachments/92/checkstyle.xml?version=1</configLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.5</version>
<configuration>
<targetJdk>${jdk.version}</targetJdk>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
<version>2.4</version>
<configuration>
<tags>
<tag>TODO</tag>
<tag>#todo</tag>
<tag>FIXME</tag>
<tag>#fixme</tag>
<tag>#deprecated</tag>
</tags>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<configuration>
<source>${jdk.version}</source>
<links>
<link>http://java.sun.com/j2ee/1.4/docs/api</link>
<link>http://java.sun.com/j2se/1.4.2/docs/api</link>
<link>http://java.sun.com/j2se/1.5.0/docs/api</link>
</links>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jdepend-maven-plugin</artifactId>
<version>2.0-beta-2</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.3.2</version>
</plugin>
</plugins>
</reporting>
<!-- Mule Dependencies -->
<dependencies>
<dependency>
<groupId>za.co.cmpy.core.shared</groupId>
<artifactId>MessageSpec</artifactId>
<version>1.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.mule</groupId>
<artifactId>mule-core</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb.modules</groupId>
<artifactId>mule-module-boot-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- Xml configuration -->
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-spring-config</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb</groupId>
<artifactId>mule-core-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb.modules</groupId>
<artifactId>mule-module-data-mapper</artifactId>
<version>${mule.version}</version>
</dependency>
<!-- Xml configuration -->
<dependency>
<groupId>com.mulesoft.muleesb.modules</groupId>
<artifactId>mule-module-spring-config-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- Mule Transports -->
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-file</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-http</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-jdbc</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-jms</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-vm</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- Mule Modules -->
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-client</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-cxf</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-management</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-scripting</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-sxc</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-xml</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- for testing -->
<dependency>
<groupId>org.mule.tests</groupId>
<artifactId>mule-tests-functional</artifactId>
<version>${mule.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mockobjects</groupId>
<artifactId>mockobjects-core</artifactId>
<version>0.09</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.cloveretl</groupId>
<artifactId>cloveretl-engine</artifactId>
<version>${mule.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb.transports</groupId>
<artifactId>mule-transport-ftp-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-sftp</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-db</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>4.0</version>
</dependency>
<dependency>
<groupId>org.beanio</groupId>
<artifactId>beanio</artifactId>
<version>2.1.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.3.1</version>
<scope>test</scope>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-json</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.ricston.connectors</groupId>
<artifactId>mule-mybatis-connector</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.2.8</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-quartz</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-http</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.42</version>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb.modules</groupId>
<artifactId>mule-module-batch-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>mule-munit-support</artifactId>
<version>${mule.munit.support.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-runner</artifactId>
<version>${munit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>deployment</id>
<name>Internal Releases</name>
<url>${nexus.release}</url>
</repository>
<snapshotRepository>
<id>deploymentSnapshot</id>
<name>Internal Releases</name>
<url>${nexus.snapshot}</url>
</snapshotRepository>
</distributionManagement>
Could you please update the mule.munit.support.version to 3.6.2? That is the latest released version. I saw this kind of errors in the past and I solved it by doing that. In case that it continues failing, could you attach an example of the flow that you are testing?
Update the munit version to latest one. I had the same error while executing the munit.
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-runner</artifactId>
<version>2.3.0</version>
<classifier>mule-plugin</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-tools</artifactId>
<version>2.3.0</version>
<classifier>mule-plugin</classifier>
<scope>test</scope>
</dependency>

aspectj-maven-plugin can't resolve java.util.stream.*

I'm trying to compile a project I recently upgraded to Java 8.
Now that I'm starting to use Java 8 specific features, I find myself getting exception on the aspectj-maven-plugin. Compilation in Eclipse and normal compilation in Maven works fine.
[ERROR] The import java.util.stream cannot be resolved
/Users/Shared/java/projects/msa/platform/core/src/main/java/nl/project/social/SomeClass.java:6
import java.util.stream.Collectors;
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.8.5</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>1.8.5</version>
</dependency>
</dependencies>
<configuration>
<complianceLevel>1.8</complianceLevel>
<source>1.8</source>
<target>1.8</target>
<verbose>false</verbose>
<outxml>true</outxml>
<encoding>UTF-8</encoding>
<showWeaveInfo>true</showWeaveInfo>
<forceAjcCompile>true</forceAjcCompile>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
</aspectLibraries>
</configuration>
</plugin>
I use Spring 4.1.x and jdk1.8.0_31
Any suggestions?
Ok, this was because of a setting in my bash profile which hard wired Java 6 as runtime environment.

Unable to download Alfresco Artifacts using Maven

I have been trying to build a project (Alfresco 4.1.2), and I keep getting a Build Failure.
I am a little bit lost...
I have configured setting.xml correctly (with credentials for the repository)
here's my pom.xml
Does anybody have a clue??
<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>xxx</groupId>
<artifactId>xxx</artifactId>
<version>0.1</version>
<name>Project</name>
<properties>
<alfresco.version>4.1.2</alfresco.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Alfresco dependencies -->
<dependency>
<groupId>org.alfresco.enterprise</groupId>
<artifactId>alfresco-core</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.alfresco.enterprise</groupId>
<artifactId>alfresco-data-model</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.alfresco.enterprise</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
</dependency>
<!-- Junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- MOCKITO -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.0</version>
<scope>test</scope>
</dependency>
<!-- DUMBSTER -->
<dependency>
<groupId>dumbster</groupId>
<artifactId>dumbster</artifactId>
<version>1.6</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Gson: Java to Json conversion -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>jtidy</groupId>
<artifactId>jtidy</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- DOCX4J dependencies -->
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>xhtmlrenderer</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>xmlgraphics-commons</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
<version>0.93</version>
</dependency>
<dependency>
<groupId>org.plutext</groupId>
<artifactId>jaxb-xmldsig-core</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.plutext</groupId>
<artifactId>jaxb-xslfo</artifactId>
<version>1.0.1</version>
</dependency>
<!-- JODA TIME -->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>1.2.1</version>
</dependency>
<!-- JOD CONVERTER -->
<dependency>
<groupId>com.artofsolving</groupId>
<artifactId>jodconverter-core</artifactId>
<version>3.0-alfresco-patched-20120820</version>
<scope>provided</scope>
</dependency>
<!-- JTIDY -->
<dependency>
<groupId>net.sf.jtidy</groupId>
<artifactId>jtidy</artifactId>
<version>r938</version>
</dependency>
</dependencies>
<!-- Repositories to download Alfresco dependencies -->
<repositories>
<repository>
<id>alfresco-private</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
</repository>
<repository>
<id>alfresco-thirdparty</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/thirdparty</url>
</repository>
<repository>
<id>alfresco-public-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/public-snapshots</url>
</repository>
</repositories>
<!-- Build lifecycle -->
<build>
<plugins>
<!-- Load properties from build.properties file (in order to get Tomcat location) -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${basedir}/build.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<!-- on "install" copy generated JAR to Alfresco Tomcat -->
<executions>
<execution>
<id>copy-jar-to-alfresco</id>
<phase>install</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${tomcat.alfresco.webapps.alfresco}/WEB-INF/lib</outputDirectory>
<resources>
<resource>
<directory>${basedir}/target/</directory>
<includes>
<include>${project.build.finalName}.jar</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<!-- Disable default "install" phase (which copies the JAR into the local repository) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<id>default-install</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<!-- copy dependencies to alfresco tomcat -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>install</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<includeScope>runtime</includeScope>
<outputDirectory>${tomcat.alfresco.lib}</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<excludeTransitive>true</excludeTransitive> <!-- you have to be careful about jars copied in alfresco. Check that each jar does not exist already before copying them -->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.6,)</versionRange>
<goals>
<goal>copy-dependencies</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
I get this error when I try to build:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8:57.331s
[INFO] Finished at: Fri Jan 17 16:41:56 EET 2014
[INFO] Final Memory: 11M/185M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project xxx: Could not resolve dependencies for project com.genia.alfresco.xxx:xxx-alfresco:jar:0.1: The following artifacts could not be resolved: jaxen:jaxen:jar:1.1.3, org.apache.chemistry.opencmis:chemistry-opencmis-commons-impl:jar:0.7.0, org.apache.httpcomponents:httpclient-cache:jar:4.1.1, org.codehaus.jackson:jackson-mapper-asl:jar:1.8.3, com.googlecode.mp4parser:isoparser:jar:1.0-RC-1, com.drewnoakes:metadata-extractor:jar:2.6.2, asm:asm-util:jar:3.2, edu.ucar:netcdf:jar:4.2, org.apache.chemistry.opencmis:chemistry-opencmis-server-bindings:jar:classes:0.7.0, org.apache.maven:maven-core:jar:2.0.6, org.apache.maven.wagon:wagon-ssh-common:jar:1.0-beta-2, classworlds:classworlds:jar:1.1, org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1, net.arnx:wmf2svg:jar:0.9.0, batik:batik-dom:jar:1.6-1, batik:batik-css:jar:1.6-1, batik:batik-xml:jar:1.6-1, batik:batik-parser:jar:1.6-1, batik:batik-bridge:jar:1.6-1, batik:batik-script:jar:1.6-1, batik:batik-awt-util:jar:1.6-1, batik:batik-util:jar:1.6-1, batik:batik-gui-util:jar:1.6-1, batik:batik-gvt:jar:1.6-1, batik:batik-transcoder:jar:1.6-1, batik:batik-extension:jar:1.6-1, batik:batik-ext:jar:1.6-1, xml-apis:xmlParserAPIs:jar:2.0.2, org.apache.avalon.framework:avalon-framework-api:jar:4.3.1, org.apache.avalon.framework:avalon-framework-impl:jar:4.3.1, org.plutext:jaxb-xmldsig-core:jar:1.0.0, org.plutext:jaxb-xslfo:jar:1.0.1, joda-time:joda-time:jar:1.2.1, net.sf.jtidy:jtidy:jar:r938: Could not transfer artifact jaxen:jaxen:jar:1.1.3 from/to central (http://repo1.maven.org/maven2): No response received after 60000 -> [Help 1]

Resources