jmeter-analysis-plugin IllegalArgumentException: Null or zero length 'values' argument - maven

I am getting an illegal argument exception when running the jmeter-analysis plugin. I have validated all the output .jtl files and it doesn't appear that the xml files are malformed. Below I have posted the maven command I am using to run the performance test suite (which runs fine), as well as my project structure, pom and output. I can't quite figure out what is going on, as everything was actually working before I updated the JMeter test plan in the .jmx. The suite runs fine in the JMeter GUI and runs fine before it gets to the analyze step. Has anyone encountered this before? What can I do to solve this?
Maven
mvn -pl performance-tests clean verify -U -X
Project Structure
Project
Performance Test Module
src
test
jmeter
performance-tests.jmx
resources
properties
artifact_headers.properties
artifact_users.properties
index.html
POM
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<artifactId>artifact-id</artifactId>
<groupId>com.group.id</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>performance-tests</artifactId>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<threads>1</threads>
<loops>1</loops>
<ramp>1</ramp>
<delay>1</delay>
<account></account>
<password></password>
</properties>
</profile>
</profiles>
<properties>
<com.artifact.jmeter.test>${project.basedir}/src/test/jmeter/*.jmx</com.artifact.jmeter.test>
<com.artifact.target.environment>https://dev-dot-api-dot-labs-horizon-1.appspot.com</com.artifact.target.environment>
<com.artifact.jmeter.loops>${loops}</com.artifact.jmeter.loops>
<com.artifact.jmeter.threads>${threads}</com.artifact.jmeter.threads>
<com.artifact.jmeter.ramp>${ramp}</com.artifact.jmeter.ramp>
<com.artifact.jmeter.startup.delay>${delay}</com.artifact.jmeter.startup.delay>
<com.artifact.jmeter.account>${account}</com.artifact.jmeter.account>
<com.artifact.jmeter.password>${password}</com.artifact.jmeter.password>
<reportdirectory>${project.build.directory}/results</reportdirectory>
<kg.apc.version>1.4.0</kg.apc.version>
<commons.lang.version>2.6</commons.lang.version>
<net.minidev.version>2.3</net.minidev.version>
<surefire.version>2.19.1</surefire.version>
</properties>
<dependencies>
<dependency>
<groupId>com.vault</groupId>
<artifactId>vault-lib</artifactId>
<version>2.13</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>${surefire.version}</version>
</dependency>
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>${net.minidev.version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons.lang.version}</version>
</dependency>
<dependency>
<groupId>kg.apc</groupId>
<artifactId>jmeter-plugins-standard</artifactId>
<version>${kg.apc.version}</version>
</dependency>
<dependency>
<groupId>kg.apc</groupId>
<artifactId>jmeter-plugins-extras</artifactId>
<version>${kg.apc.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.0.3</version>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<configuration>
<customPropertiesFiles>
<file>${project.build.directory}/jmeter/bin/properties/artifact_headers.properties</file>
<file>${project.build.directory}/jmeter/bin/properties/artifact_users.properties</file>
</customPropertiesFiles>
<propertiesFilesDirectory>${project.build.directory}/jmeter/bin/properties</propertiesFilesDirectory>
<jmeterExtensions>
<extension>commons-lang:commons-lang:2.6</extension>
<extension>net.minidev:json-smart:2.3</extension>
<artifact>kg.apc:jmeter-plugins-standard:1.4.0</artifact>
<artifact>kg.apc:jmeter-plugins-extras:1.4.0</artifact>
<artifact>kg.apc:jmeter-plugins-extras-libs:1.4.0</artifact>
<artifact>org.apache.jmeter:jorphan:3.0</artifact>
</jmeterExtensions>
<propertiesUser>
<jmeter.loops>${com.artifact.jmeter.loops}</jmeter.loops>
<jmeter.threads>${com.artifact.jmeter.threads}</jmeter.threads>
<jmeter.ramp>${com.artifact.jmeter.ramp}</jmeter.ramp>
<jmeter.account>${com.artifact.jmeter.account}</jmeter.account>
<jmeter.password>${com.artifact.jmeter.password}</jmeter.password>
<RESULTS_PATH>${reportdirectory}</RESULTS_PATH>
</propertiesUser>
<propertiesJMeter>
<aggregate_rpt_pct1>80</aggregate_rpt_pct1>
<aggregate_rpt_pct2>90</aggregate_rpt_pct2>
<aggregate_rpt_pct3>99</aggregate_rpt_pct3>
</propertiesJMeter>
<overrideRootLogLevel>warning</overrideRootLogLevel>
<testResultsTimestamp>false</testResultsTimestamp>
<!--<resultsFileFormat>csv</resultsFileFormat>-->
<resultsDirectory>${reportdirectory}</resultsDirectory>
</configuration>
</plugin>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-analysis-maven-plugin</artifactId>
<version>1.0.6</version>
<executions>
<execution>
<phase>verify</phase>
<id>thread</id>
<goals>
<goal>analyze</goal>
</goals>
<configuration>
<!--<source>${project.build.directory}/**/*.jtl</source>-->
<source>${reportdirectory}/performance-tests.jtl</source>
<targetDirectory>${reportdirectory}/generatedreport</targetDirectory>
<sourceDirFailed>false</sourceDirFailed>
<checkResult>
<throughput>
<threshold>-1</threshold>
<toleranceDirection>UPPER_LOWER_TOLERANCE</toleranceDirection>
<tolerance>5</tolerance>
</throughput>
<errors>
<threshold>-1</threshold>
<toleranceDirection>UPPER_LOWER_TOLERANCE</toleranceDirection>
<tolerance>5</tolerance>
</errors>
</checkResult>
<configurationCharts>
<width>950</width>
<height>500</height>
</configurationCharts>
<maxSamples>50000</maxSamples>
<preserveDirectories>false</preserveDirectories>
<sampleNames>
<sampleName>sample</sampleName>
<sampleName>httpSample</sampleName>
</sampleNames>
<processAllFilesFound>true</processAllFilesFound>
<remoteResourcesFromUntilDateFormat>HH:mm_yyyyMMdd</remoteResourcesFromUntilDateFormat>
<writers>
<!--<com.lazerycode.jmeter.analyzer.writer.SummaryTextToStdOutWriter/>-->
<!--<com.lazerycode.jmeter.analyzer.writer.SummaryTextToFileWriter/>-->
<!--<com.lazerycode.jmeter.analyzer.writer.HtmlWriter/>-->
<!--<com.lazerycode.jmeter.analyzer.writer.DetailsToCsvWriter/>-->
<com.lazerycode.jmeter.analyzer.writer.DetailsToHtmlWriter/>
<com.lazerycode.jmeter.analyzer.writer.ChartWriter/>
</writers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/jmeter/bin</outputDirectory>
<resources>
<resource>
<directory>${pom.basedir}/src/test/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Stack Trace
[ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-analysis-maven-plugin:1.0.6:analyze (thread) on project performance-tests: Error analysing: Null or zero length 'values' argument. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.lazerycode.jmeter:jmeter-analysis-maven-plugin:1.0.6:analyze (thread) on project performance-tests: Error analysing
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
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:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error analysing
at com.lazerycode.jmeter.analyzer.AnalyzeMojo.execute(AnalyzeMojo.java:233)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 21 more
Caused by: java.lang.IllegalArgumentException: Null or zero length 'values' argument.
at org.jfree.data.statistics.HistogramDataset.getMinimum(HistogramDataset.java:221)
at org.jfree.data.statistics.HistogramDataset.addSeries(HistogramDataset.java:136)
at com.lazerycode.jmeter.analyzer.writer.ChartWriter.createResponseTimesPlot(ChartWriter.java:188)
at com.lazerycode.jmeter.analyzer.writer.ChartWriter.writeCharts(ChartWriter.java:95)
at com.lazerycode.jmeter.analyzer.writer.ChartWriter.write(ChartWriter.java:65)
at com.lazerycode.jmeter.analyzer.ResultAnalyzer.analyze(ResultAnalyzer.java:47)
at com.lazerycode.jmeter.analyzer.AnalyzeMojo.analyze(AnalyzeMojo.java:318)
at com.lazerycode.jmeter.analyzer.AnalyzeMojo.execute(AnalyzeMojo.java:217)
... 23 more

I have downloaded the plugin and see the exception is happening with ChartWriter component when it doesn't have 'values' to generate charts (I think).
To by-pass it without changing code, you can disable ChartWriter (if you not really need it) by changing in pom as below.
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-analysis-maven-plugin</artifactId>
<version>1.0.6</version>
<executions>
<execution>
<id>create-html-report</id>
<phase>test</phase>
<configuration>
<processAllFilesFound>true</processAllFilesFound>
<source>${project.build.directory}/**/*.jtl</source>
<writers>
<com.lazerycode.jmeter.analyzer.writer.SummaryTextToStdOutWriter/>
<com.lazerycode.jmeter.analyzer.writer.SummaryTextToFileWriter/>
<com.lazerycode.jmeter.analyzer.writer.HtmlWriter/>
<com.lazerycode.jmeter.analyzer.writer.DetailsToCsvWriter/>
<com.lazerycode.jmeter.analyzer.writer.DetailsToHtmlWriter/>
**<!--<com.lazerycode.jmeter.analyzer.writer.ChartWriter/>-->**
</writers>
</configuration>
<goals>
<goal>analyze</goal>
</goals>
</execution>
</executions>
</plugin>

I've been struggled with this issue for while, finally figured it out.
I installed JMeter-3.2, but copied a jmx file created during version-3.1. After I created a new jmx file under new version, it works.
Not sure you had same experience. Hope it helps.

Remark: This is not an direct answer to the question, but a possible solution to the given exception of jmeter-analysis-maven-plugin.
In my case all tests fail because of server errors (unauthorized). So you first should check the jtl file (here performance-tests.jtl) for valid entries:
<httpSample t="329" lt="329" ts="1551219503246" s="false" lb="/" rc="401" rm="Unauthorized" tn="performancetest 1-6" dt="text" by="932" ng="9" na="9"/>

Related

java.lang.NoClassDefFoundError: com.trueaccord.scalapb.GeneratedEnum with Gatling Maven Plugin

Using the latest OpenJDK 11.0.7 with the Gatling Maven Plugin is resulting in this compilation crash. I tried deleting the local Maven repository folders for Gatling, scala-lang, and scala-sbt and re-running a clean install. Below I've pasted my pom.xml. Can someone help to resolve this?
java.lang.ClassNotFoundException: com.trueaccord.scalapb.GeneratedEnum
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:766)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1078)
... 31 common frames omitted
Wrapped by: java.lang.NoClassDefFoundError: com.trueaccord.scalapb.GeneratedEnum
at java.base/java.lang.ClassLoader.defineClassImpl(Native Method)
at java.base/java.lang.ClassLoader.defineClassInternal(ClassLoader.java:476)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:437)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:1110)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:898)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:806)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:764)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1078)
at sbt.internal.inc.FileAnalysisStore$BinaryFileStore.<init>(FileAnalysisStore.scala:50)
at sbt.internal.inc.FileAnalysisStore$.binary(FileAnalysisStore.scala:36)
at io.gatling.compiler.ZincCompiler$.doCompile(ZincCompiler.scala:174)
at io.gatling.compiler.ZincCompiler$.delayedEndpoint$io$gatling$compiler$ZincCompiler$1(ZincCompiler.scala:216)
at io.gatling.compiler.ZincCompiler$delayedInit$body.apply(ZincCompiler.scala:39)
at scala.Function0.apply$mcV$sp(Function0.scala:39)
at scala.Function0.apply$mcV$sp$(Function0.scala:39)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
at scala.App.$anonfun$main$1$adapted(App.scala:80)
at scala.App$$Lambda$5/0000000000000000.apply(Unknown Source)
at scala.collection.immutable.List.foreach(List.scala:392)
at scala.App.main(App.scala:80)
at scala.App.main$(App.scala:78)
at io.gatling.compiler.ZincCompiler$.main(ZincCompiler.scala:39)
at io.gatling.compiler.ZincCompiler.main(ZincCompiler.scala)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
My redacted pom.xml:
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>***</groupId>
<artifactId>****</artifactId>
<version>1.0</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<gatling.version>3.3.1</gatling.version>
<gatling-plugin.version>3.0.5</gatling-plugin.version>
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
<!-- <scala-maven-plugin.version>4.3.1</scala-maven-plugin.version> -->
</properties>
<dependencies>
<dependency>
<groupId>io.gatling.highcharts</groupId>
<artifactId>gatling-charts-highcharts</artifactId>
<version>${gatling.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testSourceDirectory>simulations</testSourceDirectory>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>bash</executable>
<arguments>
<argument>run.sh</argument>
<argument>${env.NS}</argument> <!-- will be empty if running with services -->
</arguments>
</configuration>
</plugin>
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>${gatling-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- the name of the single Simulation class to run -->
<simulationClass>${env.SIMULATION}</simulationClass>
<runMultipleSimulations>false</runMultipleSimulations> <!-- if the plugin should run multiple simulations sequentially -->
<includes> <!-- include filters, see dedicated section below -->
<include></include>
</includes>
<excludes> <!-- exclude filters, see dedicated section below -->
<exclude></exclude>
</excludes>
<reportsOnly></reportsOnly> <!-- to only trigger generating HTML reports from the log file contained in folder parameter -->
<runDescription>****</runDescription> <!-- short text that will be displayed in the HTML reports -->
<failOnError>true</failOnError> <!-- report failure in case of assertion failure, typically to fail CI pipeline -->
<continueOnAssertionFailure>false</continueOnAssertionFailure> <!-- keep on executing multiple simulations even if one fails -->
<useOldJenkinsJUnitSupport>true</useOldJenkinsJUnitSupport> <!-- report results to Jenkins JUnit support (workaround until we manage to get Gatling support into Jenkins) -->
<!-- pass extra parameters to the Gatling JVM -->
<jvmArgs>
<jvmArg>-DIAM=${env.IAM}</jvmArg>
<jvmArg>-DStarterkitsDir=${env.STARTERKITS_DIR}</jvmArg>
<jvmArg>-DServicesDir=${env.SERVICES_DIR}</jvmArg>
<jvmArg>-DGROUP=${env.RESOURCE_GROUP}</jvmArg>
<jvmArg>-DGORG=${env.ORG_GUID}</jvmArg>
<jvmArg>-DSPACE=${env.SPACE_GUID}</jvmArg>
<jvmArg>-DURL=${env.URL}</jvmArg>
<jvmArg>-DUsers=${env.USERS}</jvmArg>
<jvmArg>-DDuration=${env.DURATION}</jvmArg>
</jvmArgs>
<overrideJvmArgs>false</overrideJvmArgs> <!-- if above option should override the defaults instead of replacing them -->
<propagateSystemProperties>true</propagateSystemProperties> <!-- if System properties from the maven JVM should be propagated to the Gatling forked one -->
<!-- pass extra parameters to the Compiler JVM -->
<compilerJvmArgs>
</compilerJvmArgs>
<!-- if above option should override the defaults instead of replacing them -->
<overrideCompilerJvmArgs>false</overrideCompilerJvmArgs>
<!-- extra options to be passed to scalac -->
<!-- <extraScalacOptions>
<extraScalacOption></extraScalacOption>
</extraScalacOptions> -->
<disableCompiler>false</disableCompiler> <!-- if compiler should be disabled, typically because another plugin has already compiled sources -->
<simulationsFolder>${project.basedir}/simulations</simulationsFolder> <!-- where the simulations to be compiled are located -->
<resourcesFolder>${project.basedir}</resourcesFolder> <!-- where the test resources are located -->
<resultsFolder>${project.basedir}/target/gatling</resultsFolder> <!-- where the simulation log and the HTML reports will be generated -->
</configuration>
</plugin>
</plugins>
</build>
</project>
There's nothing wrong with gatling-maven-plugin.
As I said in the issue you opened on our bug tracker, you most likely have some corrupted jars in your local maven repository.
Maven sometimes messes up when downloading jars and still installs the corrupted files in the local repository. The ClassLoader can't open the jars (jars are just zip files) and silently ignores them, causing NoClassDefFoundErrors at runtime.
It looks like the gatling-maven-plugin compilation is not working or something else is going on with it. I switched to using scala-maven-plugin and that compiles my simulation classes successfully.
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<jvmArgs>
<jvmArg>-Xss100M</jvmArg>
</jvmArgs>
<args>
<arg>-target:jvm-1.8</arg>
<arg>-deprecation</arg>
<arg>-feature</arg>
<arg>-unchecked</arg>
<arg>-language:implicitConversions</arg>
<arg>-language:postfixOps</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>

How can I replace translations in compiled swf file?

I have flex project compiled in swf by flexmojos-maven-plugin and it is used in two other projects. In first with default translations, in second i want to change it to custom one. I tried to compile to swc and then in second project change locale files with other translations but the maven build is failing then.
For changing pom configuration http://www.adobe.com/devnet/flex/articles/flex-maven-flexmojos-pt1.html but it didnt help me.
Its my pom of the flex project:
<parent>
<artifactId>project-parent</artifactId>
<groupId>com.company.surveo</groupId>
<version>2.9.2-SNAPSHOT</version>
</parent>
<artifactId>surveo-flex</artifactId>
<packaging>swf</packaging>
<build>
<sourceDirectory>src/main/flex</sourceDirectory>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.version}</version>
<type>pom</type>
</dependency>
</dependencies>
<configuration>
<optimize>true</optimize>
<showWarnings>false</showWarnings>
<extensions>true</extensions>
<configFile>flex-config.xml</configFile>
<definesDeclaration>
<property>
<name>CONFIG::debug</name>
<value>false</value>
</property>
<property>
<name>CONFIG::release</name>
<value>true</value>
</property>
</definesDeclaration>
<debug>false</debug>
<contextRoot>/surveo-webapp</contextRoot>
<swfVersion>15</swfVersion>
<targetPlayer>11.2</targetPlayer>
<sourceFile>Surveo.mxml</sourceFile>
<resourceBundlePath>${basedir}/locale/{locale}</resourceBundlePath>
<compiledLocales>
<locale>en_US</locale>
<locale>pl_PL</locale>
</compiledLocales>
<allowSourcePathOverlap>true</allowSourcePathOverlap>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>${basedir}/target/generated-resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>${basedir}/src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
</build>
<dependencies>
<dependency>
<groupId>com.company.surveo</groupId>
<artifactId>surveo-flex-common</artifactId>
<type>swc</type>
</dependency>
<dependency>
<groupId>com.company.flex</groupId>
<artifactId>autocomplate</artifactId>
<type>swc</type>
</dependency>
<dependency>
<groupId>com.company.flex</groupId>
<artifactId>flexlib</artifactId>
<type>swc</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<type>pom</type>
</dependency>
</dependencies>
<profiles>
<profile>
<id>m2e</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.maven.ide.eclipse</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<mappingId>customizable</mappingId>
<configurators>
<configurator id="org.maven.ide.eclipse.configuration.flex.configurator" />
</configurators>
<mojoExecutions>
<mojoExecution>
org.apache.maven.plugins:maven-resources-plugin::
</mojoExecution>
</mojoExecutions>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
</project>
When trying to build I get this error:
[ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:3.9:compile-swc (default-compile-swc) on project surveo-flex: Error compiling! -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:3.9:compile-swc (default-compile-swc) on project surveo-flex: Error compiling!
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
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:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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.MojoExecutionException: Error compiling!
at org.sonatype.flexmojos.compiler.AbstractCompilerMojo.callCompiler(AbstractCompilerMojo.java:1141)
at org.sonatype.flexmojos.compiler.AbstractCompilerMojo.run(AbstractCompilerMojo.java:2404)
at org.sonatype.flexmojos.AbstractIrvinMojo.execute(AbstractIrvinMojo.java:155)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Versions of maven and java (mvn -v):
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0
Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T15:51:42+02:00)
Maven home: D:\Installed\apache-maven-3.2.2
Java version: 1.8.0_40, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_40\jre
Default locale: pl_PL, platform encoding: Cp1250
OS name: "windows 8.1", version: "6.3", arch: "amd64", family: "dos"
Whether it is possible to change translations like this? Or I'm doing it completely wrong?
You have a compile error, you have to resolve this first.
Also the <configuration> belongs into a <plugin>. I guess there is a plugin for the swf packaging.
Define this in
<build><plugins><plugin>..</plugin><plugins><build>
like
<build>
<plugins>
<plugin>
<artifactId>maven-myquery-plugin</artifactId>
<version>1.0</version>
<configuration>
<url>http://www.foobar.com/query</url>
<timeout>10</timeout>
<options>
<option>one</option>
<option>two</option>
<option>three</option>
</options>
</configuration>
</plugin>
</plugins>
</build>
see maven plugin configuration for a detailed description.

Using embedded database with Flyway and jOOQ in Maven for continuous integration

So I'm really trying to do things 'right' with SQL that will break at compile time using flyway and jOOQ. To do this I need a database solution that can work on the continuous integration server with no access to any server-based database. Ultimately, I want to deploy this to Amazon so I need a solution that is mostly compatible with postgreSQL. HSQLDB's file protocol seems to fit that bill.
<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">
<properties>
<schema></schema>
<db.groupId>org.hsqldb</db.groupId>
<db.artifactId>hsqldb</db.artifactId>
<db.version>2.3.2</db.version>
<flyway.url>jdbc:hsqldb:file:myDB/db</flyway.url>
<flyway.driver>org.hsqldb.jdbcDriver</flyway.driver>
<jooq.generator.database.name>org.jooq.util.hsqldb.HSQLDBDatabase</jooq.generator.database.name>
<flyway.user></flyway.user>
<flyway.password></flyway.password>
</properties>
<dependencies>
<dependency>
<groupId>${db.groupId}</groupId>
<artifactId>${db.artifactId}</artifactId>
<version>${db.version}</version>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jooq</artifactId>
<version>3.4.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>3.1</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>migrate</goal>
</goals>
</execution>
</executions>
<configuration>
<locations>
<location>filesystem:src/main/resources/db/migration</location>
</locations>
</configuration>
</plugin>
<plugin>
<!-- Specify the maven code generator plugin -->
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<version>3.4.2</version>
<!-- The plugin should hook into the generate goal -->
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<!-- Work around Maven's classloader -->
<dependencies>
<dependency>
<groupId>${db.groupId}</groupId>
<artifactId>${db.artifactId}</artifactId>
<version>${db.version}</version>
</dependency>
</dependencies>
<configuration>
<!-- JDBC connection parameters -->
<jdbc>
<driver>${flyway.driver}</driver>
<url>${flyway.url}</url>
<user>${flyway.user}</user>
<password>${flyway.password}</password>
</jdbc>
<!-- Generator parameters -->
<generator>
<name>org.jooq.util.DefaultGenerator</name>
<database>
<name>${jooq.generator.database.name}</name>
<includes>.*</includes>
<excludes></excludes>
<inputSchema>${schema}</inputSchema>
</database>
<target>
<packageName>package.goes.here</packageName>
<directory>target/generated-sources/jooq</directory>
</target>
</generator>
</configuration>
</plugin>
</plugins>
</build>
The problem is that Flyway can create the database fine, but when it becomes jOOQ's turn to use the database to generate code, it fails with:
Caused by: org.hsqldb.HsqlException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile#1096ec89[file =...db/db.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2015-02-09 03:56:15 heartbeat - read: -863 ms.
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.persist.LockFile.newLockFileLock(Unknown Source)
at org.hsqldb.persist.Logger.acquireLock(Unknown Source)
at org.hsqldb.persist.Logger.open(Unknown Source)
at org.hsqldb.Database.reopen(Unknown Source)
at org.hsqldb.Database.open(Unknown Source)
at org.hsqldb.DatabaseManager.getDatabase(Unknown Source)
at org.hsqldb.DatabaseManager.newSession(Unknown Source)
The core of problem is that Maven's plugins do not share the same classloader as the rest of the POM, and you must specify the JDBC driver dependency a second time. Thus I get a new instance of the driver and it conflicts with the already open driver Flyway has open, instead of using the same one.
So a solution may exist along a number of different paths:
Flyway could close the database properly. Apparently Flyway has a workaround in its plugin to read the project's classpath.
jOOQ could be configured somehow to read the project's classpath.
There might be another database that would work better.
Yours!
Thanks Thilo for the direction. Replacing the Flyway plugin with exec works, but I had to create a simpler command line client to make it work.

What is the correct way to make Maven find the parent POM of my project?

I have a Maven project which is a part of a large scale enterprise system. I have not developed this project, but I have developed a small framework, which I am supposed to test, integrated with it. Upon copying, building and installing the project, it compiled, and I was able to launch it. However, after trying to add my framework (parent pom + 3 modules), I may have changed some settings, and now I am having trouble building the project. I have spent a lot of time trying to break down the problem, but all I have been able to do, is produce different errors, that I understand even less of.
I can't seem to find out where I can tell maven where to look for the parent POM. I have tried both the pom.xml, and settings.xml, but I haven't found any good options. I have also tried to change less obvious parameters, like changing localRepository, or adding repositories, but they proved ineffective
Here is my error message, interlaced with my attempts to fix it:
C:\development\my-main\customer-webpart>mvn install -Dmaven.test.skip=true
This is my domain. this includes the master pom of this project, although it is still part of a bigger system, and not the root. I would like to build, install and run this project, to test my framework. My framework is added as a dependency in the pom.xml.
[INFO] Scanning for projects...
Downloading: http://my-server:8080/archiva/repository/my-repository//
org/myportal/client-product/0.0/client-product-0.0.pom
I do not know where this archiva repository is defined. It is not in the pom.xml, or settings.xml. It seems to have an error with the double /, but the client-product-0.0.pom should not be retrieved from here anyway. It is located at C:/mavenLocalRepository/my-main/client-product/0.0/client-product-0.0.pom
Downloading: http://repo1.maven.org/maven2/org/myportal/
client-product/0.0/client-product-0.0.pom
This was also the wrong location to look for the .pom-file... so then the rest of the error is produced:
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: null:customer-webpart:zip:${org.myportal.version}
Reason: Cannot find parent: org.myportal:client-product for project: null:customer-webpart:zip:${org.myportal.version} for project null:customer-webpart:zip:${org.myportal.version}
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.myportal:client-product for project: null:customer-webpart:zip:${org.myportal.version} for project null:customer-webpart:zip:${org.myportal.version}
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:292)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: org.myportal:client-product for
project: null:customer-webpart:zip:${org.myportal.version} for project null:customer-webpart:zip:${org.myportal.version}
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1370)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:821)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.ja
va:506)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:198)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:583)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:461)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
... 11 more
Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.myportal:client-product' not found in repository: Unable to download the artifact from any repository
org.myportal:client-product:pom:0.0
from the specified remote repositories:
my-repository (http://my-server:8080/archiva/repository/my-repository/),
localRepository2 (C:/mavenLocalRepository/logging-framework/),
localRepository (C:/mavenLocalRepository/my-main/),
central (http://repo1.maven.org/maven2)
for project org.myportal:client-product
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:6
03)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1366)
... 17 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository
org.myportal:client-product:pom:0.0
from the specified remote repositories:
my-repository (http://my-server:8080/archiva/repository/my-repository/),
localRepository2 (C:/mavenLocalRepository/logging-framework/),
localRepository (C:/mavenLocalRepository/my-main/),
central (http://repo1.maven.org/maven2)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:212)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:74)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:5
56)
... 18 more
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:331)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:200)
... 20 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Tue Oct 28 11:15:40 CET 2014
[INFO] Final Memory: 4M/61M
[INFO] ------------------------------------------------------------------------
C:\development\my-main\customer-webpart>
Also, this Eclipse-warning is given on my parent-tag of pom.xml for the project:
Project build error: Non-resolvable parent POM: Failure to transfer org.myportal:client-product:pom:0.0 from http://my-server:8080/archiva/repository/my-repository/ was cached in the local repository, resolution will not be reattempted until the update
interval of my-repository has elapsed or updates are forced. Original error: Could not transfer artifact org.myportal:client-product:pom:0.0 from/to my-repository (http://my-server:8080/archiva/repository/my-repository/): Failed to transfer http://my-server:8080/archiva/repository/my-repository/org/myportal/client-product/0.0/client-product-0.0.pom. Error code 307, Temporarily Moved for Domain Name Expansion and 'parent.relativePath' points at wrong local POM
...and I have tried three different approaches to the parent.relativePath. 1. None at all (no tag present), 2. Empty tag (suggested at another post here) 3. tag with full path of the .pom file.
POM.XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<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>
<parent>
<groupId>org.myportal</groupId>
<artifactId>client-product</artifactId>
<version>0.0</version>
<relativePath>C:\mavenLocalRepository\my-main\org\myportal\client-product\0.0\client-product-0.0.pom</relativePath>
</parent>
<artifactId>my-webpart</artifactId>
<version>${org.myportal.version}</version>
<name>my-webpart</name>
<packaging>zip</packaging>
<description>
customer webpart
</description>
<properties>
<maven.test.skip>true</maven.test.skip>
<org.logging.framework.version>0.0.1-SNAPSHOT</org.logging.framework.version>
</properties>
<build>
<sourceDirectory>src/java</sourceDirectory>
<resources>
<resource>
<directory>src/java</directory>
</resource>
</resources>
<testSourceDirectory>src/test</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.maven.plugins</groupId>
<artifactId>unzip-plugin</artifactId>
<version>${org.unzip.plugin.version}</version>
<executions>
<execution>
<id>unpack</id>
<goals>
<goal>unzip</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<resources>
<resource>
<groupId>org.workflow</groupId>
<artifactId>workflow-framework</artifactId>
<version>${org.myportal.version}</version>
<type>jar</type>
<includes>
<include>*.pdpart</include>
</includes>
<target>src/java/generated/common-pdparts</target>
</resource>
<resource>
<groupId>org.myportal</groupId>
<artifactId>myportal-portletframework</artifactId>
<version>${org.myportal.version}</version>
<type>jar</type>
<includes>
<include>*.pdpart</include>
</includes>
<target>src/java/generated/common-pdparts</target>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.maven.plugins</groupId>
<artifactId>descriptorloader-plugin</artifactId>
<version>${org.descriptorloader.plugin.version2}</version>
<executions>
<execution>
<id>vdoclet-java-clean</id>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<source>src/java</source>
<target>src/java</target>
</configuration>
</execution>
<execution>
<id>vdoclet-java</id>
<goals>
<goal>vdoclet</goal>
</goals>
<configuration>
<source>src/java</source>
<target>src/java</target>
<template>portletdescriptor/Control.vm</template>
<report>target/java-conversion.txt</report>
</configuration>
</execution>
<execution>
<id>vdoclet-jsp-clean</id>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<source>src/java</source>
<target>src/webapp</target>
</configuration>
</execution>
<execution>
<id>vdoclet-jsp</id>
<goals>
<goal>vdoclet</goal>
</goals>
<configuration>
<source>src/java</source>
<target>src/webapp</target>
<template>portletdescriptor/JspControl.vm</template>
<report>target/jsp-conversion.txt</report>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.main</groupId>
<artifactId>main-build-dependencies</artifactId>
<version>${org.main.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.maven.plugins</groupId>
<artifactId>zip-plugin</artifactId>
<version>${org.zip.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<fileSets>
<fileSet>
<directory>src/webapp</directory>
</fileSet>
<fileSet>
<directory>target/classes</directory>
<outputDirectory>WEB-INF/classes/</outputDirectory>
</fileSet>
</fileSets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<!-- Clean generated diretory -->
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>src/java</directory>
<includes>
<include>**/generated/**</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.myportal</groupId>
<artifactId>my-client</artifactId>
<version>${org.myportal.version}</version>
</dependency>
<dependency>
<groupId>org.myportal</groupId>
<artifactId>my-portletdomain</artifactId>
<version>${org.myportal.version}</version>
</dependency>
<dependency>
<groupId>org.myportal</groupId>
<artifactId>effect-client</artifactId>
<version>${org.myportal.version}</version>
</dependency>
<dependency>
<groupId>org.myportal</groupId>
<artifactId>mycase-client</artifactId>
<version>${org.myportal.version}</version>
</dependency>
<dependency>
<groupId>org.myportal</groupId>
<artifactId>mycase-portletdomain</artifactId>
<version>${org.myportal.version}</version>
</dependency>
<!-- myportal -->
<dependency>
<groupId>org.myportal</groupId>
<artifactId>mysecondportal-common</artifactId>
<version>${org.myportal.version}</version>
</dependency>
<dependency>
<groupId>org.myportal</groupId>
<artifactId>mysecondportal-webpartcommon</artifactId>
<version>${org.myportal.version}</version>
</dependency>
<dependency>
<groupId>org.myportal</groupId>
<artifactId>host-types</artifactId>
<version>${org.myportal.version}</version>
</dependency>
<dependency>
<groupId>org.workflow</groupId>
<artifactId>workflow-framework</artifactId>
<version>${org.myportal.version}</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${library.commons.fileupload.version}</version>
</dependency>
<!-- external -->
<dependency>
<groupId>faceless</groupId>
<artifactId>bfopdf</artifactId>
<version>0.0</version>
</dependency>
<!-- main -->
<dependency>
<groupId>org.main</groupId>
<artifactId>main-assemble-ear</artifactId>
<type>pom</type>
<version>${org.main.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.myportal</groupId>
<artifactId>my-webdelegate</artifactId>
<version>${org.myportal.version}</version>
</dependency>
<dependency>
<groupId>org.myportal</groupId>
<artifactId>myportal-portletframework</artifactId>
<version>${org.myportal.version}</version>
</dependency>
<dependency>
<groupId>org.myshare</groupId>
<artifactId>myshare-common</artifactId>
<version>${org.myshare.version}</version>
</dependency>
<dependency>
<groupId>org.myshare</groupId>
<artifactId>myshare-webpartcommon</artifactId>
<version>${org.myshare.version}</version>
</dependency>
<dependency>
<groupId>org.docflow</groupId>
<artifactId>docflow-client</artifactId>
<version>${org.myportal.version}</version>
</dependency>
<dependency>
<groupId>org.docflow</groupId>
<artifactId>docflow-webdao</artifactId>
<version>${org.myportal.version}</version>
</dependency>
<dependency>
<groupId>org.esb.logging</groupId>
<artifactId>logging-framework</artifactId>
<version>${org.logging.framework.version}</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>localRepository</id>
<url>C:/mavenLocalRepository/my-main/</url>
</repository>
<repository>
<id>localRepository2</id>
<url>C:/mavenLocalRepository/logging-framework/</url>
</repository>
</repositories>
</project>
parent (client-product-0.0.pom):
<?xml version="1.0" encoding="ISO-8859-1"?>
<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>
<parent>
<groupId>org.product</groupId>
<artifactId>my-version-pom</artifactId>
<version>0.0</version>
<relativePath>..</relativePath>
</parent>
<groupId>org.product</groupId>
<artifactId>my-product</artifactId>
<packaging>pom</packaging>
<version>0.0</version>
<name>my-product ${project.version} (old root-pom, now child of ${parent.artifactId})</name>
<modules>
<module>my-foundation-pom</module>
<module>pb-product-pom</module>
</modules>
<properties>
<!-- NISX: These properties should never be changed. Only change the value of org.component.version. -->
<org.assemble.my.version>${org.component.version.with.build.number}</org.assemble.my.version>
<org.myportal.version>${org.component.version}</org.myportal.version>
<org.myshare.version>${org.component.version}</org.myshare.version>
... + several others. shortened for stackoverflow
</properties>
<build>
<plugins>
<plugin>
<!-- NISX: This is a trick to avoid the ghost pom to be ever deployed to a repository. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.4</version>
<inherited>false</inherited>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.maven.plugins</groupId>
<artifactId>qdev-maven-plugin</artifactId>
<version>${org.qdev.plugin.version}</version>
<inherited>true</inherited>
<configuration>
<beaDeployDirectory>${qdev.deploy.dir}</beaDeployDirectory>
<earName>${qdev.ear.name}</earName>
<warName>${qdev.war.name}</warName>
<isSingleWar>true</isSingleWar>
</configuration>
</plugin>
<plugin>
<groupId>org.maven.plugins</groupId>
<artifactId>maven-udv-plugin</artifactId>
<version>1.1.2</version>
<configuration>
<settingsApplicationName>my</settingsApplicationName>
<settingsApplicationVersion>${my.branch.name}</settingsApplicationVersion>
<settingsApplicationState>${profile.state}</settingsApplicationState>
</configuration>
</plugin>
</plugins>
</build>
</project>

Deploying Javadocs via the Maven Wagon WebDAV provider to an NTLM-authenticated server

I'm attempting to use Maven to deploy my Javadocs (which are created successfully) to a Sharepoint server, which requires NTLM authentication. I'm using the Maven Wagon plugin with the WebDAV provider to do this. I am using m2eclipse to set up a run configuration to execute goals within a specific profile.
I've essentially pieced together a solution from various solutions I've found regarding these tools. It sounds as though NTLM may not be supported at all with Maven currently, but other pages have suggested that the tag may allow for this. I've also seen solutions where the deployment site is specified in distribution management, contrary to Apache's usage page for it. At any rate, I'm encountering a number of problems.
First of all, when I run from the run configuration menu (which executes 'clean' and 'package' within the 'release' profile), the Wagon plugin, which contains an execution of the 'wagon:upload' goal within the 'package' phase, the execution is ignored. It creates the project jar and the Javadocs, and attaches the sources, but the Wagon plugin does not execute.
I've also attempted to run the 'wagon:upload' goal on its own once the Javadocs have been created separately, but I encounter this error (in debug):
[DEBUG] Configuring mojo org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload
from plugin realm ClassRealm[plugin>org.codehaus.mojo:wagon-maven-plugin:1.0-bet
a-3, parent: sun.misc.Launcher$AppClassLoader#11b86e7]
[DEBUG] Configuring mojo 'org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload
' with basic configurator -->
[DEBUG] (f) followSymLink = false
[DEBUG] (f) fromDir = C:\Documents and Settings\c40208\IBM\rationalsdp\CEC\cec
-diagnostics
[DEBUG] (f) optimize = false
[DEBUG] (f) project = MavenProject: com.mycompany.cec:cec-diagnostics:0.5.0-SNAPSH
OT # C:\Documents and Settings\c40208\IBM\rationalsdp\CEC\cec-diagnostics\pom.xm
l
[DEBUG] (f) serverId = serverId
[DEBUG] (f) settings = org.apache.maven.execution.SettingsAdapter#11b86c7
[DEBUG] (f) skip = false
[DEBUG] (f) useDefaultExcludes = true
[DEBUG] -- end configuration --
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.687s
[INFO] Finished at: Fri Apr 13 08:54:34 EDT 2012
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:u
pload (default-cli) on project cec-diagnostics: The parameters 'url' for goal or
g.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload are missing or invalid -> [
Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload (default-cli) on project c
ec-diagnostics: The parameters 'url' for goal org.codehaus.mojo:wagon-maven-plug
in:1.0-beta-3:upload are missing or invalid
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:221)
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.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.PluginParameterException: The parameters 'url
' for goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload are missing or
invalid
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePl
uginFields(DefaultMavenPluginManager.java:576)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfigu
redMojo(DefaultMavenPluginManager.java:529)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:92)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
... 19 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginParamete
rException
I know it's a loaded question, but does anyone have any advice or suggestions which might help me along my way?
Here's my POM file:
<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>com.mycompany.cec</groupId>
<artifactId>cec-diagnostics</artifactId>
<version>0.5.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>CEC Diagnostics Jar</name>
<description><![CDATA[Assertion capture and analysis library for Java]]]></description>
<inceptionYear>2011</inceptionYear>
<scm>
<developerConnection>scm:svn:(FQDN)/(path)</developerConnection>
<url>(FQDN)/(path)</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.framework.version>3.0.5.RELEASE</spring.framework.version>
<jar.plugin.version>2.4</jar.plugin.version>
<bundle.plugin.version>2.3.6</bundle.plugin.version>
<surefire.plugin.version>2.12</surefire.plugin.version>
<testng.version>6.3.1</testng.version>
<javadoc.plugin.version>2.8.1</javadoc.plugin.version>
<source.plugin.version>2.1.2</source.plugin.version>
<wagon.plugin.version>1.0-beta-3</wagon.plugin.version>
<project.info.reports.plugin.version>2.4</project.info.reports.plugin.version>
<site.plugin.version>3.0</site.plugin.version>
<pdf.plugin.version>1.2</pdf.plugin.version>
<confluence.plugin.version>3.1.3</confluence.plugin.version>
<confluence.root>http://confluence.sys.mycompany.com/confluence</confluence.root>
<confluence.space>SEI</confluence.space>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${jar.plugin.version}</version>
<configuration>
<archive>
<index>true</index>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
<manifestEntries>
<Specification-Title>${project.name}</Specification-Title>
<Specification-Version>${project.version}</Specification-Version>
<Specification-Vendor>${project.organization.name}</Specification-Vendor>
<Implementation-Title>${project.name}</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${bundle.plugin.version}</version>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav-jackrabbit</artifactId>
<version>2.2</version>
</extension>
</extensions>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${javadoc.plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<additionalJOption>-J-Dhttp.auth.ntlm.domain=dav:https//(domain)</additionalJOption>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${source.plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>${wagon.plugin.version}</version>
<executions>
<execution>
<id>upload-javadocs</id>
<phase>package</phase>
<goals>
<goal>upload</goal>
</goals>
<configuration>
<serverId>(serverId)</serverId>
<fromDir>${project.build.directory}/apidocs</fromDir>
<includes>*</includes>
<excludes>pom.xml</excludes>
<url>dav:https://(domain)/(path)</url>
<toDir>(path)</toDir>
<optimize>true</optimize>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${site.plugin.version}</version>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>${project.info.reports.plugin.version}</version>
<reportSets>
<reportSet>
<reports>
<report>summary</report>
<report>project-team</report>
<report>plugins</report>
<report>dependencies</report>
<report>scm</report>
<report>cim</report>
<report>issue-tracking</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${javadoc.plugin.version}</version>
<configuration>
<show>public</show>
</configuration>
</plugin>
</plugins>
</reporting>
<repositories>
(repositories)
</repositories>
<distributionManagement>
(repositories)
</distributionManagement>
<developers>
(developers)
</developers>
</project>
Hopefully it's understood what's going on despite the fact that I had to censor company-related sites. Additionally, I added proxy and server configurations to settings.xml, as follows:
<proxy>
<active>true</active>
<protocol>https</protocol>
<host>(host address)</host>
<port>9090</port>
<username>(username)</username>
<password>(password)</password>
<nonProxyHosts>*.mycompany.com</nonProxyHosts>
</proxy>
Server:
<server>
<id>(the same serverId from the POM)</id>
<username>(username)</username>
<password>(password)</password>
</server>
Thanks a lot.
Your URL should look like this <url>dav:http://...</url>.
Try beta-4 first and then set per command like -Dwagon.url=. If it still does not work you have to file a ticket at Codehaus's JIRA. The source code seems fine. This is an injection problem. Can you try another Maven version?

Resources