i am using cruisecontrol framework for nightly build.
currently i tried to set some folders to readonly = "false"
2011-05-18 11:40:17,089 [Thread-23] WARN ScriptRunner - C:\builds\nightly_build.xml:30: Problem: failed to create task or type attrib
2011-05-18 11:40:17,089 [Thread-23] WARN ScriptRunner - Cause: the class org.apache.tools.ant.taskdefs.optional.windows.Attrib was not found.
2011-05-18 11:40:17,089 [Thread-23] WARN ScriptRunner - This looks like one of Ant's optional components.
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner - Action: Check that the appropriate optional JAR exists in
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner - -C:\builds\lib
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner - -C:\Documents and Settings\admin\.ant\lib
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner - -a directory added on the command line with the -lib argument
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner -
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner - Do not panic, this is a common problem.
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner - The commonest cause is a missing JAR.
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner -
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner - This is not a bug; it is a configuration problem
the errors are shown above.
This occurs when i use <attrib>:
<attrib readonly="false">
<dirset dir="C:/Work/6.70_Extensions/NightlyBuild" />
</attrib>
how do i solve this problem? and how do i find out the version of ANT that i have?
The attrib task came with Ant 1.6 - see Ant Manual
Check your Ant Version with builtin Property ant.version:
<echo>${ant.version}</echo>
Do you have ant-nodeps.jar in $ANT_HOME/lib? That is the jar which contains the Attrib class, so it needs to be on your Ant classpath.
Related
I am trying to associate junit test results with SonarQube.
Here is what I have for Sonar Properties:
sonar.projectKey=FXX
sonar.projectName=FUTURE_Jason
sonar.projectVersion=12.9.0
sonar.sourceEncoding=UTF-8
sonar.sources=src
sonar.tests=test-build/junit/classes/
sonar.junit.reportsPath=test-build/junit/reports
When executing a Jenkins job associated with SonarQube, I am receiving the following warnings:
13:52:12.923 INFO - Sensor SurefireSensor
13:52:12.924 INFO - parsing /var/lib/jenkins/jobs/FUTURE_SONAR_Jason/workspace/test-build/junit/reports
13:52:13.472 WARN - Resource not found: msc.rc.model.AbstractTrackingUpdateTest
In the Jenkins workspace I have the directory test-build and it includes both the reports and classes.
$ ll /var/lib/jenkins/jobs/FUTURE_SONAR_Jason/workspace/test-build/junit/classes/msc/rc/model/AbstractTrackingUpdateTest.class
-rwxr-xr-x 1 build build 9590 Dec 14 14:39 /var/lib/jenkins/jobs/FUTURE_SONAR_Jason/workspace/test-build/junit/classes/msc/rc/model/AbstractTrackingUpdateTest.class
Any idea what I am missing?
I changed the sonar.tests property to point to the .java files, problem is now resolved.
I'm trying to not get messages like this when I run pub build:
WARN: [Dart2JS on mylib|web/mylib.dart]:
| 1 warning(s) and 2 hint(s) suppressed in package:otherlib.
WARN: [Dart2JS on pinged|web/mylib.dart]:
| 2 warning(s) suppressed in package:mylib.
WARN: [Warning from Dart2JS on mylib|web/mylib.dart]:
| 1 hint(s) suppressed in package:mypackage.
WARN: [Warning from Dart2JS on pinged|web/mylib.dart]:
| 1 hint(s) suppressed in package:otherpackage.
I've tried building with pub build --verbose --trace and adding --verbose to my $dart2js transformer commandLineOptions in pubspec.yaml.
It seems that, by default, dart2js does not suppress hints and warnings (hence the --suppress-warnings and --suppress-hints options), but the pub build "wrapper" around dart2js changes these defaults and gives you no real way to enable verbosity.
transformers:
- polymer:
entry_points: web/index.html
- $dart2js:
commandLineOptions: [--show-package-warnings]
see also:
Can you pass compiler flags to dart2js via Dart Editor
https://www.dartlang.org/tools/pub/dart2js-transformer.html
I am trying to integrate SonarQube to generate report on my iOS project,
I am using Objective-C Sonar plugin
When i run ./run-sonar.sh
OCLint generates a compile_commands.json file in my root directory.
and after that getting following error
11:24:39.782 INFO - Processing OCLint report /Users/.......app/./sonar-reports/oclint.xml
11:24:39.899 ERROR - Reporting 1073 violations.
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 16.240s
Final Memory: 6M/86M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: The rule 'OCLint:ivar assignment outside accessors or init' does not exist.
Can any one help me on this issue?
Thanks
AMR
Thnaks
I had a similar error. My sonar server had two objective-c code analyser plugin. The Sonar Plugin for Objective C (free) and SonarSource Objective-C plugin (commercial)
When I removed (uninstalled) one of the plugin from sonar server the error stopped to occur
I had a similar error too with the last version of this plugin which is a fork of the one you used.
I downgrade my OCLint version from 0.11 to 0.10.1 and everything work perfectly.
It seems that the OCLint rules defined in the plugin was different of the OCLint version installed on my server.
I am not sure what version of the objective-c-sonar plugin that you were using.
I solved similar issue before.
Goto ${SONAR_INSTALLATION_FOLDER}/extensions/plugins/, copy the sonar-objective-c-plugin-${version}.jar to somewhere else.
unzip the jar file, and edit below file
org/sonar/plugins/objectivec/profile-oclint.xml
Add the rule you are missing following the layout of the xml file,
may be look similar below
<rule>
<repositoryKey>OCLint</repositoryKey>
<key>ivar assignment outside accessors or init</key>
</rule>
And edit another file org/sonar/plugins/objectivec/rules-oclint.xml
<rule>
<key>ivar assignment outside accessors or init</key>
<name>ivar assignment outside accessors or init</name>
<priority>MAJOR</priority>
<description>ivar assignment outside accessors or init</description>
</rule>
And then using zip to package the files unpacked as the new jar file.
Override the original plugin jar file in ${SONAR_INSTALLATION_FOLDER}/extensions/plugins/, restart the sonar, issue could be gone.
Repeat the step for all similar issues you encountered.
I am using SonarQube Runner 2.4 at jenkins since today but the analysis fail with the message:
SonarQube Runner 2.4
Java 1.7.0_51 Oracle Corporation (64-bit)
INFO: Runner configuration file: /.jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/Sonar_Runner_2.4/conf/sonar-runner.properties
INFO: Project configuration file: NONE
INFO: Default locale: "en_US", source code encoding: "ISO-8859-1" (analysis is platform dependent)
INFO: Work directory: /.jenkins/workspace/Sonar/.sonar
INFO: SonarQube Server 4.3.2
23:21:42.176 INFO - Load batch settings
23:21:42.160 INFO - User cache: /.sonar/cache
23:21:42.270 INFO - Install plugins
23:21:43.322 INFO - Install JDBC driver
23:21:43.329 INFO - Create JDBC datasource for jdbc:mysql://xxx
23:21:45.505 INFO - Initializing Hibernate
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 5.214s
Final Memory: 21M/429M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: You must define the following mandatory properties for ‚com.mypackage:MyProject: sonar.sources
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Build step 'Invoke Standalone Sonar Analysis' marked build as failure
[BFA] Scanning build for known causes...
[BFA] Done. 0s
Notifying upstream projects of job completion
Finished: FAILURE
But sonar-project.properties of My_Project contain sonar.sources.
sonar.language=java
sonar.projectName=My_Project
sonar.projectVersion=0.1
sonar.binaries=bin
sonar.projectDescription=
sonar.projectKey=MyProjectKey
sonar.sources=src
Where is the problem?
Greetings
Try adding "sonar.sources=." See if this works or not. Please add the log if the problem still persists.
sonar.sources and sonar.binaries path should be relative to the sonar runner home. You need to check that of the path is right as just src.
i am not very familar with taskdef and classname... i am having trouble running an ant script from another ant script:
2011-05-25 15:50:26,040 [Thread-23] WARN ScriptRunner - BUILD FAILED
2011-05-25 15:50:26,040 [Thread-23] WARN ScriptRunner - C:\Work\6.70_Extensions\NightlyBuild\nightly_build.xml:31: The following error occurred while executing this line:
2011-05-25 15:50:26,040 [Thread-23] WARN ScriptRunner - C:\Work\6.70_Extensions\NightlyBuild\Master Build.xml:6: taskdef class com.ANT_Tasks.CFileEdit cannot be found
where line 6 is:
<taskdef mame="CFileEdit" classname="com.ANT_Tasks.CFileEdit" />
my root directory is C:\Work\6.70_Extensions\NightlyBuild and i have a folder C:\Work\6.70_Extensions\NightlyBuild\com\ANT_Tasks and i have a CFileEdit.java in that folder. Anybody knows what is wrong?
Edit:
I do not wish to change the structure of my ANT script, therefore what is the next step here?
i Complied my CFileEdit.java file into CFileEdit.class
I converted CFileEdit.class into CFileEdit.jar
i put this CFileEdit.jar into C:\apache-ant-1.8.2\lib where this is my ant directory?
please tell me if i am doing it right or wrong, i am having issues with this currently
You must compile the .java into a .class and use the class for classpath for the taskdef
Compile CFileEdit.java
Define taskdef as follows -
<taskdef name="CFileEdit" classname="com.ANT_Tasks.CFileEdit">
<classpath>
<!-- refer to the compiled class here along with others as necessary to execute the task -->
</classpath>
</taskdef>