Have been trying to set up sonar to run on my Jenkins instance at the end of each build. As there are restrictions on my work computer I have set up nexus to work as proxy so i can download artifacts from the central maven repository. Whenever I run my build it is successful and the tests pass however the sonar step fails.
[INFO] Building Customer 1.0-SNAPSHOT
[INFO] ---------------------------------------------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:2.3:sonar (default-cli) # Customer ---
[INFO] ---------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ---------------------------------------------------------------------
[INFO] Total time: 2.543s
[INFO] Finished at: Mon Mar 23 11:44:46 GMT 2015
[INFO] Final Memory: 8M/156M
[INFO] ---------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven- plugin:2.3:sonar (default-cli) on project Customer: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.3:sonar failed: Unable to load the mojo 'sonar' in the plugin 'org.codehaus.mojo:sonar-maven-plugin:2.3'. A required class is missing: Lorg/apache/maven/rtinfo/RuntimeInformation;
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.codehaus.mojo:sonar-maven-plugin:2.3
The required class that is missing - org/apache/maven/rtinfo/RuntimeInformation
I have tried several steps to resolve this already including cleaning my repository and restarting the build. I have also tried different versions of sonar-maven-plugin. I am currently using maven 3.0.
Any advice would be greatly appreciated!
Try to use Apache Maven 3.2.5 in combination with org.codehaus.mojo:sonar-maven-plugin:2.7.1.
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>2.7.1</version>
</plugin>
<!-- ... -->
</plugins>
</build>
Related
I am trying to use spotbugs from maven.
In the <reporting/> section of my POM, I include
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.5.3.0</version>
<configuration>
<includeFilterFile>spotbugs-security-include.xml</includeFilterFile>
<excludeFilterFile>spotbugs-security-exclude.xml</excludeFilterFile>
<plugins>
<plugin>
<groupId>com.h3xstream.findsecbugs</groupId>
<artifactId>findsecbugs-plugin</artifactId>
<version>1.11.0</version>
</plugin>
</plugins>
</configuration>
</plugin>
Where do I put the filter files spotbugs-security-include.xml and spotbugs-security-exclude.xml?
According to the documentation, the plugin will find the filter files on the classpath. But what is the classpath for executing a reporting plugin? And where in the source tree do I put the files in order to have them copied there during report generation? I have tried src/main/resources, src/test/resources, and src/site/resources with no luck.
Log snippet:
[INFO] 6 reports detected for maven-javadoc-plugin:3.2.0: aggregate-no-fork, javadoc, javadoc-no-fork, test-aggregate-no-fork, test-javadoc, test-javadoc-no-fork
[INFO] configuring report plugin com.github.spotbugs:spotbugs-maven-plugin:4.5.3.0
[INFO] 1 report detected for spotbugs-maven-plugin:4.5.3.0: spotbugs
[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:3.1.2
[INFO] 15 reports detected for maven-project-info-reports-plugin:3.1.2: ci-management, dependencies, dependency-info, dependency-management, distribution-management, index, issue-management, licenses, mailing-lists, modules, plugin-management, plugins, scm, summary, team
[INFO] Fork Value is true
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.587 s
[INFO] Finished at: 2022-02-11T15:31:56+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find resource 'spotbugs-security-include.xml'. -> [Help 1]
I run under OpenJDK 11 on linux.
I am trying to deploy maven project to heroku but it is showing error.
[INFO] Webapp assembled in [765 msecs]
[INFO] Building war:
C:\Users\Lenovo\Documents\GitHub\MakeMyEvent\target\MakeMyEvent-0.0.1-SNAPSHOT.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.406 s
[INFO] Finished at: 2018-08-23T16:16:19+05:30
[INFO] Final Memory: 16M/90M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-
plugin:2.2:war (default-war) on project MakeMyEvent: Error assembling WAR:
webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
it is a jsp project and working fine on my local machine.
As per the information you have provided here, your war building triggers the error.
basically if you are using maven war plugin try considering adding <failOnMissingWebXml>false</failOnMissingWebXml>
Example :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
Below is the error i am getting when i am adding any new method to existing code (especially when i am adding any method to interface or class)
--- animal-sniffer-maven-plugin:1.15:check (default) # deepser ---
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java18:1.0
[INFO]
[INFO] --- maven-bundle-plugin:3.0.1:bundle (default-bundle) # deepser ---
[INFO]
[INFO] --- maven-bundle-plugin:3.0.1:baseline (baseline) # deepser ---
[INFO] Baseline Report - Generated by Apache Felix Maven Bundle Plugin on 2018-07-09T20:24Z based on Bnd - see http://www.aqute.biz/Bnd/Bnd
[INFO] Comparing bundle deepser version 18.6.5-SNAPSHOT to version 18.6.4
[INFO]
[INFO] PACKAGE_NAME DELTA CUR_VER BASE_VER REC_VER WARNINGS
[INFO] = ================================================== ========== ========== ========== ========== ==========
[INFO] * com.myowncompany.analytica.deepser.config major 18.6.5 18.6.4 19.0.0 Version increase required
[INFO] > interface com.myowncompany.analytica.deepser.config.DeepSearchConfig
[INFO] + method getDeepSearchLibsCDNUrl()
[INFO] + access abstract
[INFO] + return java.lang.String
[INFO] - version 18.6.4
[INFO] + version 18.6.5
[INFO] -----------------------------------------------------------------------------------------------------------
[INFO] * com.myowncompany.analytica.deepser.config.impl minor 18.6.5 18.6.4 18.7.0 Version increase required
[INFO] < class com.myowncompany.analytica.deepser.config.impl.DeepSearchConfigImpl
[INFO] + method getDeepSearchLibsCDNUrl()
[INFO] + return java.lang.String
[INFO] - version 18.6.4
[INFO] + version 18.6.5
[INFO] -----------------------------------------------------------------------------------------------------------
[ERROR] com.myowncompany.analytica.deepser.config: Version increase required; detected 18.6.5, suggested 19.0.0
[ERROR] com.myowncompany.analytica.deepser.config.impl: Version increase required; detected 18.6.5, suggested 18.7.0
[INFO] Baseline analysis complete, 2 error(s), 0 warning(s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.179 s
[INFO] Finished at: 2018-07-09T20:24:41+05:30
[INFO] Final Memory: 41M/1038M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:3.0.1:baseline (baseline) on project deepser: Baseline failed, see generated report -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=1024m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0
My pom.xml contains below plugin:
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-scr-plugin</artifactId>
<version>${scr.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${mvn.bundle.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Category>search</Bundle-Category>
<!-- Export only the packages that should be visible to other bundles
and JSPs -->
<Export-Package>
com.myowncompany.analytica.*
</Export-Package>
</instructions>
</configuration>
</plugin>
Any idea....i googled it out, and spend 3 hours, still not able to find root cause. Earlier this was working fine. But recently it start giving issue version need to be updated.
The baseline plugin checks if exported packages changed according to semantic versioning rules. It compares the signature of classes in the new packages against the latest release by default.
The results tell you that a minor version increase is needed for the impl package and a major version increase for the .config package.
In case you did not intend to run the baseline goal you can skip it using the maven property: baseline.skip=true
Btw. you should only run the baseline checks on API packages. On impl they do not make much sense .. but you should try to not export impl packages anyway.
On Basis of AEM 6.5
I tried the -Dbaseline.skip=true option as indicated by others but still failed.
This article here: https://felix.apache.org/components/bundle-plugin/baseline-mojo.html
Talks about adding 'skip' property.
I then added this property under my core module as indicated below and all worked fine:
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-baseline-maven-plugin</artifactId>
<configuration>
<failOnMissing>false</failOnMissing>
<skip>true</skip>
</configuration>
</plugin>
I ran the command :
mvn clean -Dbaseline.skip=true install,
it worked like a charm
I am using weblogic 10.3.6.0 and maven 3. I want to deploy my project to weblogic server with maven plugin. I do same steps in this oracle documents
But when I build my project, I get this error
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building JBoss Portlet Bridge - JSF 2 Basic Portlet 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- weblogic-maven-plugin:2.9.5:deploy (default-cli) # TestWeblogic ---
[WARNING] The POM for weblogic:weblogic:jar:10.3.6 is missing, no dependency i information available
[WARNING] The POM for weblogic:webservices:jar:10.3.6 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.446s
[INFO] Finished at: Mon Jul 01 16:50:02 EEST 2013
[INFO] Final Memory: 7M/111M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:weblogic-maven-plugin:2.9.5:deploy ( (default-cli) on project TestWeblogic: Execution default-cli of goal org.codehaus.mojo:weblogic-maven-plugin:2.9.5:deploy failed: Plugin org.codehaus.mojo:weblogic-maven-plugin:2.9.5 or one of its dependencies could not be resolved: The following artifacts could not be resolved: weblogic:weblogic:jar:10.3.6, weblogic:webservices:jar:10.3.6: Failure to find weblogic:weblogic:jar:10.3.6 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
My pom xml is here
<plugin>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-maven-plugin</artifactId>
<version>10.3.6.0</version>
<configuration>
<adminurl>t3://localhost:7001</adminurl>
<user>username</user>
<password>password</password>
<upload>true</upload>
<action>deploy</action>
<remote>false</remote>
<verbose>true</verbose>
<source>${project.build.directory}/${project.build.finalName}.${project.packaging}</source>
<name>${project.build.finalName}</name>
</configuration>
</plugin>
I use weblogic server 10.3.6.0, eclipse juno , maven 3.0.4.
You need to import wlfullclient.jar and webservices.jar. I tried importing the weblogic.jar first, but maven threw a ClassCastException by weblogic.utils.Debug.
To build this client you need to execute: java -jar wljarbuilder.jar inside the WL_HOME/server/lib.
Once you are ready, import into the maven repository by executing the following commands:
mvn install:install-file -DgroupId=weblogic -DartifactId=weblogic
-Dversion=10.3.6 -Dpackaging=jar -Dfile=wlfullclient.jar
mvn install:install-file -DgroupId=weblogic -DartifactId=webservices -Dversion=10.3.6 -Dpackaging=jar -Dfile=webservices.jar
Looks like you are using JBoss, not Weblogic based on your logs:
Building JBoss Portlet Bridge
I'm trying to use the github site plugin to copy a directory to my gh-pages branch on github. I'm getting a 500 error whenever I try, though.
Here's my build configuration:
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.7</version>
<configuration>
<message>Creating site for ${project.version}</message>
<branch>gh-pages</branch>
<noJekyll>true</noJekyll>
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
<includes>
<include>**/*</include>
</includes>
<repositoryName>greenDAO</repositoryName>
<repositoryOwner>emmby</repositoryOwner>
</configuration>
</plugin>
Here's the output of mvn ghSite:site
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building DaoCore 1.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- site-maven-plugin:0.7:site (default-cli) # greendao ---
[INFO] Creating 12 blobs
[INFO] Creating tree with 13 blob entries
[INFO] Creating commit with SHA-1: 656a23ffd7d898c2d45a107ee4f8f2d8ee86706e
[INFO] Creating reference gh-pages starting at commit 656a23ffd7d898c2d45a107ee4f8f2d8ee86706e
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.608s
[INFO] Finished at: Sat Dec 22 22:25:21 MST 2012
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.github:site-maven-plugin:0.7:site (default-cli) on project greendao: Error creating reference: Server Error (500) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
You can find the full output of mvn -X ghSite:site here.
Any ideas what I might be doing wrong?
(My authentication credentials are in my ~/.m2/settings.xml file and appear to be correct, since the push fails with an authentication error if I comment them out.)
Your branch is incorrect:
<branch>gh-pages</branch>
Remove it and use the default.
Did you try this maven plugin http://maven.apache.org/plugins/maven-scm-publish-plugin/various-tips.html ?