flexmojos-maven-plugin:7.0.1:test-compile build failure at net.flexmojos.oss.unitestingsupport.TestApplication - flexmojos

I have a project with Flexmojos 4.0-beta-7 and multiple modules.
There is an artifact with swc packaging and some tests.
During maven install phase it creates the following MXML file
/target/test-classes/TestRunner.mxml
<?xml version="1.0" encoding="utf-8"?>
<unitestingsupport:TestApplication
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:unitestingsupport="net.flexmojos.oss.unitestingsupport.*"
layout="absolute"
initialize="init()"
port="59896"
controlPort="59895"
>
<mx:Script>
<![CDATA[
import projekt.service.command.CommandServiceTest; CommandServiceTest;
import projekt.service.command.impl.CommandTest; CommandTest;
import projekt.service.console.ConsoleLogTargetTest; ConsoleLogTargetTest;
import projekt.service.dump.dumper.ServiceDumperTest; ServiceDumperTest;
private function init():void {
addTest( CommandServiceTest);
addTest( CommandTest);
addTest( ConsoleLogTargetTest);
addTest( ServiceDumperTest);
}
]]>
</mx:Script>
</unitestingsupport:TestApplication>
So the phase on Flexmojos 4.0-beta-7 runs fine, producing the following output.
[exec] [INFO] --- flexmojos-maven-plugin:4.0-beta-7:test-compile (default-test-compile) # Projekt ---
[exec] [INFO] Flexmojos 4.0-beta-7
[exec] [INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
[exec] [INFO] Compiling test class: [projekt.service.command.CommandServiceTest, projekt.service.command.impl.CommandTest, projekt.service.console.ConsoleLogTargetTest, projekt.service.dump.dumper.ServiceDumperTest]
[exec] Writing configuration dump to C:\Users\Uzer\Documents\Projekt\target\test-classes\TestRunner-configs.xml
[exec] C:\Users\Uzer\Documents\Projekt\target\test-classes\TestRunner.swf (1181091 bytes)
[exec] [INFO]
[exec] [INFO] --- flexmojos-maven-plugin:4.0-beta-7:test-run (default-test-run) # Projekt ---
But then I have had to upgrade it to Flexmojos 7.0.1 because of FLEXMOJOS-886
https://flexmojos.atlassian.net/browse/FLEXMOJOS-886
Unfortunately, it breaks the phase, producing the following output.
Initially it begins the same way
[exec] [INFO] --- flexmojos-maven-plugin:7.0.1:test-compile (default-test-compile) # Projekt ---
[exec] [INFO] Flexmojos 7.0.1
[exec] [INFO] GPL License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
[exec] [INFO] Compiling test class: [projekt.service.command.CommandServiceTest, projekt.service.command.impl.CommandTest, projekt.service.console.ConsoleLogTargetTest, projekt.service.dump.dumper.ServiceDumperTest]
But then it fails with the following messages.
Writing configuration dump to C:\Users\Uzer\Documents\Projekt\target\test-classes\TestRunner-configs.xml
C:\Users\Uzer\Documents\Projekt\target\test-classes\TestRunner.mxml(30): Error: Cannot resolve attribute 'layout' for component type net.flexmojos.oss.unitestingsupport.TestApplication.
C:\Users\Uzer\Documents\Projekt\target\test-classes\TestRunner.mxml(30): Error: Cannot resolve attribute 'initialize' for component type net.flexmojos.oss.unitestingsupport.TestApplication.
C:\Users\Uzer\Documents\Projekt\target\test-classes\TestRunner.mxml(30): Error: Cannot resolve attribute 'port' for component type net.flexmojos.oss.unitestingsupport.TestApplication.
C:\Users\Uzer\Documents\Projekt\target\test-classes\TestRunner.mxml(30): Error: Cannot resolve attribute 'controlPort' for component type net.flexmojos.oss.unitestingsupport.TestApplication.
How to fix it and make it work with Flexmojos 7.0.1, any ideas?

Related

The SonarQube Post-build Action is deprecated

Using Jenkins 1.642.2 for code analysis with SonarQube 5.6.1 for all my maven projects.
When I use maven goal sonar:sonar they take more time to analyse files (more than 7 seconds by file) :
[INFO] Sensor SCM Sensor
[INFO] SCM provider for this project is: svn
[INFO] 1079 files to be analyzed
[INFO]
[INFO] 2/1079 files analyzed
[INFO] 3/1079 files analyzed
[INFO] 4/1079 files analyzed
[INFO] 5/1079 files analyzed
When I use the SonarQube Scanner with this config :
then i have this error :
WARN: Property 'sonar.jdbc.url' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
WARN: Property 'sonar.jdbc.username' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
WARN: Property 'sonar.jdbc.password' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
INFO: User cache: /var/lib/jenkins/.sonar/cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=43ms
INFO: SonarQube server 5.6.1
INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Process project properties
INFO: ---------------------------------------------------------------------- --
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 1.621s
INFO: Final Memory: 39M/132M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: You must define the following mandatory properties for 'Unknown': sonar.projectKey, sonar.projectName, sonar.projectVersion, sonar.sources
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
Build step 'Execute SonarQube Scanner' marked build as failure
Finished: FAILURE
My settings file :
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.jdbc.url>
jdbc:mysql://11.230.5.88:3306/sonar
</sonar.jdbc.url>
<sonar.jdbc.username>sonar</sonar.jdbc.username>
<sonar.jdbc.password>sonar</sonar.jdbc.password>
<!-- Optional URL to server. Default value is http://localhost:9000 -->
<sonar.host.url>
http://sonarqube-groupe.com/
</sonar.host.url>
</properties>
</profile>
Any idea to solve this problem because i have a problem to understand the new sonarqube use
i must make a sonar-project.properties file for the maven project?
You can and should still analyze with Maven, using a Build Step. As stated in the docs, you should first "Enable injection of SonarQube server configuration" at the global configuration level, and then in your build enable the Build Environment Option "Prepare SonarQube Scanner environment". Then you can set your Maven goal to the following:
$SONAR_MAVEN_GOAL -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_AUTH_TOKEN

How do I install the Neo4j-spatial plugin?

Vanilla neo4j 2.2.0 install on a Ubuntu 14.04 system via their repository.
The instructions given on the neo4j-spatial website don't work. Does anyone have something that works no-questions-asked?
Is there some binary repository I can just apt-get install neo4j-spatial and not deal with this mess?
Thanks!
$ mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Neo4j - Spatial Components
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.neo4j:neo4j-cypher-compiler-2.2
Reason: Error getting POM for 'org.neo4j:neo4j-cypher-compiler-2.2' from the repository: Unable to read local copy of metadata: Cannot read metadata from '/home/ubuntu/.m2/repository/org/neo4j/neo4j-cypher-compiler-2.2/2.2-SNAPSHOT/maven-metadata-oss.sonatype.org.xml': end tag name </body> must match start tag name <hr> from line 5 (position: TEXT seen ...</center>\r\n</body>... #6:8)
org.neo4j:neo4j-cypher-compiler-2.2:pom:2.2-SNAPSHOT
for project org.neo4j:neo4j-cypher-compiler-2.2
The Neo4j-Spatial Project was updated and released for Neo4j 2.2
The readme was also updated with the new binary download links.

Jenkins API documentation with phpdox

The API MyProject link ( generated by the HTML Publisher Jenkins plugin ) gives 404.
Problem accessing /job/MyProject /API_MyProject/index.html. Reason: Not found
I checked the inputs from the configuration section, in the job item, and in the Publish HTML reports configuration I see the following:
HTML directory to archive: build/api
Index page[s]: index.html
Report title: API MyProject
the url which kicks me to the api documentation, is the following:
http://jenkins.dev:8080/job/MyProject/API_MyProject/
then, I checked if documentation is generated in the build/api folder and I see two folders:
docs/ xml/
there is no index.html, but whether I generated manually a dummy index.html file I still get the same error... another weird behaviour is when I edit the Report title, it changes the link to the still not found api docs..
phpdox.xml file:
<?xml version="1.0" encoding="utf-8" ?>
<phpdox xmlns="http://xml.phpdox.net/config" silent="false">
<project name="MyProject" source="${basedir}/protected/models" workdir="${basedir}/build/api/xml">
<collector publiconly="false">
<include mask="*.php" />
</collector>
<generator output="${basedir}/build/api/docs">
<build engine="html" enabled="true" output="api">
<file extension="html" />
</build>
</generator>
</project>
</phpdox>
Jenkins final Console output:
phpdox:
[exec] phpDox 0.7.0 - Copyright (C) 2010 - 2014 by Arne Blankerts
[exec]
[exec] [26.12.2014 - 05:57:27] Using config file './phpdox.xml'
[exec] [26.12.2014 - 05:57:27] Registered collector backend 'parser'
[exec] [26.12.2014 - 05:57:27] Registered enricher 'build'
[exec] [26.12.2014 - 05:57:27] Registered enricher 'git'
[exec] [26.12.2014 - 05:57:27] Registered enricher 'checkstyle'
[exec] [26.12.2014 - 05:57:27] Registered enricher 'phpcs'
[exec] [26.12.2014 - 05:57:27] Registered enricher 'pmd'
[exec] [26.12.2014 - 05:57:27] Registered enricher 'phpunit'
[exec] [26.12.2014 - 05:57:27] Registered enricher 'phploc'
[exec] [26.12.2014 - 05:57:27] Registered output engine 'xml'
[exec] [26.12.2014 - 05:57:27] Registered output engine 'html'
[exec] [26.12.2014 - 05:57:27] Starting to process project 'MyProject'
[exec] [26.12.2014 - 05:57:27] Starting collector
[exec] [26.12.2014 - 05:57:27] Scanning directory '/var/lib/jenkins/jobs/MyProject/workspace/protected/models' for files to process
[exec]
[exec] ................ [16]
[exec]
[exec] [26.12.2014 - 05:57:34] Saving results to directory '/var/lib/jenkins/jobs/MyProject/workspace/build/api/xml'
[exec] [26.12.2014 - 05:57:39] Resolving inheritance
[exec]
[exec] ................ [16]
[exec]
[exec] [26.12.2014 - 05:57:39] The following unit(s) had missing dependencies during inheritance resolution:
[exec] [26.12.2014 - 05:57:39] - Category (missing CActiveRecord)
[exec] [26.12.2014 - 05:57:39] - LoginForm (missing CFormModel)
[exec] [26.12.2014 - 05:57:39] - Mimetype (missing CActiveRecord)
[exec] [26.12.2014 - 05:57:39] - ContactForm (missing CFormModel)
[exec] [26.12.2014 - 05:57:39] - File (missing CActiveRecord)
[exec] [26.12.2014 - 05:57:39] - UserAccountReference (missing CActiveRecord)
[exec] [26.12.2014 - 05:57:39] - Currency (missing CActiveRecord)
[exec] [26.12.2014 - 05:57:39] - Account (missing CActiveRecord)
[exec] [26.12.2014 - 05:57:39] Collector process completed
[exec]
[exec] [26.12.2014 - 05:57:39] Starting generator
[exec] [26.12.2014 - 05:57:39] Loading enrichers
[exec] [26.12.2014 - 05:57:39] Starting event loop.
[exec]
[exec] .................................................. [50]
[exec] .................................................. [100]
[exec] .................................................. [150]
[exec] .................................................. [200]
[exec] .................................................. [250]
[exec] ............ [262]
[exec]
[exec] [26.12.2014 - 05:57:41] Generator process completed
[exec] [26.12.2014 - 05:57:41] Processing project 'MyProject' completed.
[exec]
[exec]
[exec] Time: 13 seconds, Memory: 12.75Mb
[exec]
build:
BUILD SUCCESSFUL
Total time: 1 minute 57 seconds
[CHECKSTYLE] Collecting checkstyle analysis files...
[CHECKSTYLE] Finding all files that match the pattern build/logs/checkstyle.xml
[CHECKSTYLE] Parsing 1 file in /var/lib/jenkins/jobs/MyProject/workspace
[CHECKSTYLE] Successfully parsed file /var/lib/jenkins/jobs/MyProject/workspace/build/logs/checkstyle.xml with 67 unique warnings and 0 duplicates.
[PMD] Collecting PMD analysis files...
[PMD] Finding all files that match the pattern build/logs/pmd.xml
[PMD] Parsing 1 file in /var/lib/jenkins/jobs/MyProject/workspace
[PMD] Successfully parsed file /var/lib/jenkins/jobs/MyProject/workspace/build/logs/pmd.xml with 61 unique warnings and 0 duplicates.
[DRY] Collecting duplicate code analysis files...
[DRY] Finding all files that match the pattern build/logs/pmd-cpd.xml
[DRY] Parsing 1 file in /var/lib/jenkins/jobs/MyProject/workspace
[DRY] Successfully parsed file /var/lib/jenkins/jobs/MyProject/workspace/build/logs/pmd-cpd.xml with 0 unique warnings and 0 duplicates.
Recording plot data
Publishing Clover coverage report...
Clover xml file does not exist in: /var/lib/jenkins/jobs/MyProject/workspace called: build/logs/clover.xml and will not be copied to: /var/lib/jenkins/jobs/MyProject/builds/2014-12-26_11-55-21/cloverphp/clover.xml
Could not find 'build/coverage/build/logs/clover.xml'. Did you generate the XML report for Clover?
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level /var/lib/jenkins/jobs/MyProject/workspace/build/api to /var/lib/jenkins/jobs/MyProject/builds/2014-12-26_11-55-21/htmlreports/API_Unnamed
[JDepend] JDepend plugin is ready
[JDepend] Found 16 classes in 2 packages
Finished: SUCCESS
Having just faced a similar problem I checked the skeleton phpdox.xml that the component generates as a guide when you run phpdox --skel.
The included documentation will help you understand what is wrong with your configuration
The way it is configured now, the documentation is generated inside the directory ${basedir}/build/api/docs/api because the build->output parameter is appended to the generator->output url
So in order for jenkins to find the documentation and copy it to the htmlreports folder you need to set the above directory as the "HTML directory to archive" in your project configuration->html reports
My configuration that works is the following:
<generator output="${basedir}/build">
<build engine="html" enabled="true" output="api">
and in project configuration "HTML directory to archive":"app/build/api"
In case your configuration is not the problem check if an index.html file exists in the output directory, because I think that phpdox generates an index.xhtml by default instead. If this is the case you can also change it in the configuration
<build engine="html" enabled="true" output="api">
<file extension="xhtml" />
</build>
change xhtml to html

Blackberry Phonegap load device showing error

I am developing the blackberry phonegap application. I have set all environment required to build the application. I am using command prompt to debug the application when i build the application it build successfully. But while loading the device it causing error as follows.
C:\bbtest>ant blackberry load-device
Buildfile: C:\bbtest\build.xml
blackberry:
load-device:
generate-cod-name:
[echo] Generated name: cordovaExample.cod
clean:
[delete] Deleting directory C:\bbtest\build
package-app:
[mkdir] Created dir: C:\bbtest\build\widget
[copy] Copying 24 files to C:\bbtest\build\widget
[zip] Building zip: C:\bbtest\build\cordovaExample.zip
load-device:
[exec] [INFO] Parsing command line options
[exec] [INFO] Parsing bbwp.properties
[exec] [INFO] Validating application archive
[exec] [INFO] Parsing config.xml
[exec] [INFO] Populating application source
[exec] [INFO] Compiling BlackBerry WebWorks applicatio
n
[exec] [INFO] Starting signing tool
[exec] [INFO] Signing complete
[exec] [INFO] Generating output files
[exec] [INFO] BlackBerry WebWorks application packagin
g complete
[exec] RIM Wireless Handheld Java Loader
[exec] Copyright 2001-2009 Research In Motion Limited
[exec] Connecting to device...debug: HRESULT error during Open: 80040154
[exec] Error: unable to open port
BUILD FAILED
C:\bbtest\build.xml:49: The following error occurred while executing this line:
C:\bbtest\blackberry.xml:53: exec returned: 3
Total time: 53 seconds
C:\bbtest>
Any Idea why this is happing any help would be appreciated.
Its hard to nail down the problem with that information but I suspect you have a problem with "target name" in your xml.
Make sure the load-device is correctly targeted in your blackberry.xml as shown.
<target name="load-device" depends="package-app">
<bbwp code-sign="true" />
<exec executable="${javaloader}" dir="." failonerror="true">
<arg value="-u" />
<arg value="-w${properties.blackberry.sim.password}" />
<arg value="load" />
<arg file="${build.dir}/StandardInstall/${cod.name}.cod" />
</exec>
</target>
Also make sure that your directories are properly set in project.properties.
blackberry.bbwp.dir=C:\\TheBlackBerryWebWorksSDK
blackberry.sim.dir=C:\\TheEclipseBlackBerry\\plugins\\net.rim.ejde.componentpack5.0.0_5.0.0.25\\components\\simulator
blackberry.mds.dir=C:\\TheBlackBerryWebWorksSDK\\mds
I think that you may not have BlackBerry Desktop Manager installed. You can download this from http://uk.blackberry.com/software/desktop/desktop-pc.html
This error is also thrown when using the incorrect deployment command.
In my case I tried to deploy my application to a BB10 device using ant blackberry load-device instead of ant qnx load-device.
Here's a snippet from the documentation:
BlackBerry 10 (QNX) - ant qnx load-device
BlackBerry PlayBook - ant playbook load-device
BlackBerry Smartphone (OS5-7) - ant blackberry load-device
See http://cordova.apache.org/docs/en/2.5.0/guide_getting-started_blackberry_index.md.html

Not created by default settings.xml in $/user/.m2/repository path using Maven

I tried below command its work properly
C:\Documents and Settings\users>mvn -v
Apache Maven 3.0 (r1004208; 2010-10-04 17:20:56+0530)
Java version: 1.6.0_21
Java home: C:\Program Files\Java\jdk1.6.0_21\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
and once I tried to compile simple HelloWorld.java program. Its give me below error...
C:\my-app>mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Quick Start Archetype 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: repo1.maven.org/maven2/org/apache/maven/plugins/maven-resour
ces-plugin/2.4.3/maven-resources-plugin-2.4.3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.454s
[INFO] Finished at: Thu Nov 18 13:08:50 IST 2010
[INFO] Final Memory: 1M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of i
ts dependencies could not be resolved: Could not transfer artifact org.apache.ma
ven.plugins:maven-resources-plugin:jar:2.4.3 from central (http://repo1.maven.or
g/maven2): Error transferring file: Connection refused: connect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/PluginResoluti
onException
Please any one update me with proper solutions.
First, you really should format your questions better. Just cutting and pasting without any regard what it would look like when submitted doesn't help you in getting a quick and concise answer.
Second, what exactly is your question? You subject says one thing, but your text says another.
Now I'll take a stab at both your subject and your text.
As far as the subject is concerned, the settings.xml file is not automatically created by Maven. You have to create this and configure it the way you want. See this website for more info about the settings.xml.
As far as the text is concerned, looks like you do not have access to the Maven repo. This can because by a number things. The most obvious ones are:
The repository is not specified in the project's pom.xml file as described here.
The server you are running this on does not have access to http://repo1.maven.org/maven2/ due to firewall or internet connectivity reasons.
Double check that:
this was not an intermittent problem
you didn't get bad metadata (and clean up the entire ~/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/)

Resources