How can I replace translations in compiled swf file? - maven

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.

Related

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

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"/>

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>

Using flexmojos maven plugin to build AIR mobile application

I have dial with AIR mobile application based on 's:ViewNavigatorApplication'.
I use Apache Flex SDK 4.10 and Flexmojos plugin 6.0.1 and JetBrains IDEA 12.1.4
I made 'pom.xml', added 'air-framework' dependencies. The IDE imported it successfully and made the project configuration. The dependencies are shown under the 'Extranl Libraries' node, I can see it. But I don't see ViewNavigatorApplication class, I only see WindowedApplication. The 'pom.xml' loads 'airmobile-config.xml'. When I try to compile it, I get the error 'Error: Could not resolve 's:ViewNavigatorApplication' to a component implementation'. I will soon tear my hair out from my head.
Here is the pom.xml I use.
<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>
<name>Mobile Catalog</name>
<parent>
<groupId>com.uni.versal</groupId>
<artifactId>versal</artifactId>
<version>2.0-SNAPSHOT</version>
</parent>
<artifactId>mobile-catalog</artifactId>
<packaging>air</packaging>
<properties>
<!--the application name which must match the main mxml file-->
<!--and application descriptor file names -->
<application.name>MobileCatalog</application.name>
</properties>
<build>
<directory>${project.basedir}/target</directory>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src/main/flex</sourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>net.flexmojos.oss</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>
<dependency>
<groupId>com.adobe.air</groupId>
<artifactId>compiler</artifactId>
<version>${air.version}</version>
<type>pom</type>
</dependency>
</dependencies>
<configuration>
<!--<targetPlayer>11</targetPlayer>-->
<swfVersion>13</swfVersion>
<flexBuilderCompatibility>true</flexBuilderCompatibility>
<loadConfig>${settings.localRepository}/com/adobe/flex/framework/framework/${flex.version}/configs_zip/airmobile-config.xml</loadConfig>
<sourceFile>${application.name}.mxml</sourceFile>
<descriptorTemplate>${basedir}/src/main/flex/${application.name}-app.xml</descriptorTemplate>
<!--<configurationReport>true</configurationReport>-->
<keystore>${project.basedir}/mobile_catalog.p12</keystore>
<storepass>asdf</storepass>
<!--optionally include files in the AIR package -->
<includeFileSets>
<fileSet>
<directory>src/main/resources</directory>
<includes>
<include>*.*</include>
</includes>
</fileSet>
</includeFileSets>
<storepass></storepass>
<contextRoot>versal</contextRoot>
<!--<localesCompiled>-->
<!--<locale>en_US</locale>-->
<!--<locale>ru_RU</locale>-->
<!--</localesCompiled>-->
<localesSourcePath>src/main/locales/{locale}</localesSourcePath>
<defines>
<property>
<name>CONFIG::debug</name>
<value>true</value>
</property>
<property>
<name>CONFIG::release</name>
<value>false</value>
</property>
</defines>
<debug>true</debug>
<optimize>false</optimize>
</configuration>
<executions>
<execution>
<goals>
<goal>sign-air</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework.air</groupId>
<artifactId>air-framework</artifactId>
<version>${flex.version}</version>
<type>pom</type>
</dependency>
</dependencies>
Thanx in advance.
RESOLVED: Officially Flexmojos doesn't support AIR mobile applications. That's all.

when i install ojdbc6.jar,i got this error,i don't know how to resolve it

I want to install oracle plugin--ojdbc6.jar.
when i run these command:
cd D:\sakai3\nakamura\contrib\oracle-jdbc-6
mvn install:install-file -DgroupId=com.oracle-jdbc-6 -DartifactId=ojdbc6 -Dversion=10.2.0.1.0 -Dpackaging=jar -Dfile=org.sakaiproject.nakamura.ojdbc.jar
mvn -P 10.2.0.1.0 clean install
cd D:\sakai3\nakamura
mvn clean install
cd D:\sakai3\nakamura\contrib\csu
mvn clean package
when i run the last one command i got this error:
[ERROR] Failed to execute goal on project edu.nyu.launchpad: Could not resolve d
ependencies for project edu.nyu:edu.nyu.launchpad:jar:1.4.2: The following artif
acts could not be resolved: org.apache.sling:maven-launchpad-plugin:jar:app:2.1.
0, org.sakaiproject.nakamura:org.sakaiproject.nakamura.ojdbc:jar:app:1.4.0, edu.
nyu:edu.nyu.launchpad:jar:app:1.4.2: Could not find artifact org.apache.sling:ma
ven-launchpad-plugin:jar:app:2.1.0 in maven repo (http://repo1.maven.org/maven2/
) -> [Help 1]
this is my pom:
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sakaiproject.nakamura</groupId>
<artifactId>base</artifactId>
<version>1.4.2</version>
</parent>
<groupId>edu.nyu</groupId>
<artifactId>edu.nyu.launchpad</artifactId>
<name>NYU Launchpad</name>
<properties>
<nakamura.version>1.4.0</nakamura.version>
<ux.version>1.4.0</ux.version>
</properties>
<packaging>jar</packaging>
<build>
<resources>
<resource>
<directory>../../app/src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-plugin</artifactId>
<executions>
<execution>
<id>prepare-package</id>
<goals>
<goal>prepare-package</goal>
</goals>
<configuration>
<defaultBundleList>
<groupId>org.sakaiproject.nakamura</groupId>
<artifactId>org.sakaiproject.nakamura.app</artifactId>
<version>${nakamura.version}</version>
</defaultBundleList>
<jarWebSupport>
<groupId>org.sakaiproject.nakamura</groupId>
<artifactId>org.sakaiproject.nakamura.jetty-config</artifactId>
<version>${nakamura.version}</version>
<startLevel>5</startLevel>
</jarWebSupport>
<additionalBundles>
<bundle>
<groupId>org.sakaiproject.nakamura</groupId>
<artifactId>org.sakaiproject.nakamura.ojdbc6</artifactId>
<version>${nakamura.version}</version>
<startLevel>1</startLevel>
</bundle>
<bundle>
<groupId>org.sakaiproject.nakamura</groupId>
<artifactId>org.sakaiproject.nakamura.uxloader</artifactId>
<version>${ux.version}</version>
<startLevel>30</startLevel> </bundle>
</additionalBundles>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.launchpad.base</artifactId>
<version>2.3.0</version>
<classifier>webapp</classifier>
<type>war</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-plugin</artifactId>
<version>2.1.0</version>
<classifier>app</classifier>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
i am very sorry about my English. I am a Chinese.Please forgive my broken English and my unclear Expression.Sorry!And Thank you!
First of all you can remove the dependency on the maven-launchpad-plugin. I cannot see any rational reason for it to be bundled at all. Or am I missing something? The error you get is quite clear about this:
Could not find artifact org.apache.sling:maven-launchpad-plugin:jar:app:2.1.0
The plugin is used during your build and not needed as a dependency. Remove the following:
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-plugin</artifactId>
<version>2.1.0</version>
<classifier>app</classifier>
<scope>provided</scope>
</dependency>
As a side-mark you should not pick up resources outside of the project like you do with this:
<resources>
<resource>
<directory>../../app/src/main/resources</directory>
</resource>
</resources>
The resources should be contained withing the 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