Adding dependencies to a Scala project (sbt) - java

There is a library I want to use https://github.com/randhindi/jerkson in Scala project. I might add something like this to build.sbt which is located in a project's base directory:
libraryDependencies += "com.domain_example" % "library_name_test123" % "0.1.1"
But where do I get all those data: domain name, library name, version? There is no such data at https://github.com/randhindi/jerkson
So what do I need to do to use it?

Here's a link to the Typesafe repository, which is the official repository maintained by Typesafe:
Type jerkson in the search box, which will show you all the related projects hosted on the repository.
You should be able to see the path, such as:
com/codahale/jerkson_2.8.2/0.5.0
You can decompose it to 3 components.
Try this:
libraryDependencies += "com.codahale" % "jerkson_2.8.2" % "0.5.0"
If you want the latest integration, you may use latest.integration as the third parameter
libraryDependencies += "com.codahale" % "jerkson_2.8.2" % "latest.integration"
In general, I would try Maven repository first.
Here's what Maven repository looks like:
This is nice because you can see a tab for sbt, and you can simply copy that to your code. Unfortunately, I did not see the library you want in Maven.

Based on your comments to the other answers, I believe what you wish to do is specify the dependency directly to the github URL. This has been asked before. Both answers are correct and should prove useful for you.

If you don't want to investigate build configuration then you may clone repository and do publish-local. There will be artifact information. Also you add artifact to your local Ivy repository. In this case:
[info] published jerkson_2.10 to /home/ezh/.ivy2/local/jerkson/jerkson_2.10/0.1-SNAPSHOT/...
In your case
"jerkson" %% "jerkson" % "0.1-SNAPSHOT"
or
"jerkson" % "jerkson_2.10" % "0.1-SNAPSHOT"
Library builded against Scala 2.10
Full log:
ezh#devbox ~/ze $ git clone https://github.com/randhindi/jerkson.git
Cloning into 'jerkson'...
remote: Counting objects: 3093, done.
remote: Compressing objects: 100% (1203/1203), done.
remote: Total 3093 (delta 984), reused 2863 (delta 790)
Receiving objects: 100% (3093/3093), 436.47 KiB | 177 KiB/s, done.
Resolving deltas: 100% (984/984), done.
ezh#devbox ~/ze $ cd jerkson/
ezh#devbox ~/ze/jerkson $ sbt-0.12 publish-local
[info] Loading project definition from /home/ezh/ze/jerkson/project
[info] Updating {file:/home/ezh/ze/jerkson/project/}default-b33f9c...
[info] Resolving org.scala-sbt#precompiled-2_10_1;0.12.4-RC1 ...
[info] Done updating.
[info] Compiling 1 Scala source to /home/ezh/ze/jerkson/project/target/scala-2.9.2/sbt-0.12/classes...
[info] Set current project to jerkson (in build file:/home/ezh/ze/jerkson/)
[info] Updating {file:/home/ezh/ze/jerkson/}jerkson...
[info] Packaging /home/ezh/ze/jerkson/target/scala-2.10/jerkson_2.10-0.1-SNAPSHOT-sources.jar ...
[info] Wrote /home/ezh/ze/jerkson/target/scala-2.10/jerkson_2.10-0.1-SNAPSHOT.pom
[info] Resolving org.scala-lang#scala-library;2.10.0 ...
[info] Done packaging.
[info] Resolving org.hamcrest#hamcrest-core;1.1 ...
[info] downloading http://oss.sonatype.org/content/groups/public/com/fasterxml/jackson/core/jackson-core/2.1.1/jackson-core-2.1.1.jar ...
[info] [SUCCESSFUL ] com.fasterxml.jackson.core#jackson-core;2.1.1!jackson-core.jar (2325ms)
[info] downloading http://oss.sonatype.org/content/groups/public/com/fasterxml/jackson/core/jackson-databind/2.1.1/jackson-databind-2.1.1.jar ...
[info] [SUCCESSFUL ] com.fasterxml.jackson.core#jackson-databind;2.1.1!jackson-databind.jar (2351ms)
[info] downloading http://oss.sonatype.org/content/groups/public/org/mockito/mockito-all/1.9.0/mockito-all-1.9.0.jar ...
[info] [SUCCESSFUL ] org.mockito#mockito-all;1.9.0!mockito-all.jar (7677ms)
[info] downloading http://oss.sonatype.org/content/groups/public/junit/junit/4.10/junit-4.10.jar ...
[info] [SUCCESSFUL ] junit#junit;4.10!junit.jar (1337ms)
[info] downloading http://oss.sonatype.org/content/groups/public/com/fasterxml/jackson/core/jackson-annotations/2.1.1/jackson-annotations-2.1.1.jar ...
[info] [SUCCESSFUL ] com.fasterxml.jackson.core#jackson-annotations;2.1.1!jackson-annotations.jar (1384ms)
[info] Done updating.
[info] :: delivering :: jerkson#jerkson_2.10;0.1-SNAPSHOT :: 0.1-SNAPSHOT :: integration :: Sun Jun 02 09:22:19 MSK 2013
[info] delivering ivy file to /home/ezh/ze/jerkson/target/scala-2.10/ivy-0.1-SNAPSHOT.xml
[info] Compiling 77 Scala sources and 1 Java source to /home/ezh/ze/jerkson/target/scala-2.10/classes...
[info] Generating Scala API documentation for main sources to /home/ezh/ze/jerkson/target/scala-2.10/api...
[info] 'compiler-interface' not yet compiled for Scala 2.10.0. Compiling...
[info] Compilation completed in 10.168 s
[warn] there were 51 feature warnings; re-run with -feature for details
model contains 312 documentable templates
[warn] /home/ezh/ze/jerkson/src/main/scala/com/codahale/jerkson/util/scalax/rules/Rules.scala:67: Tag '#requires' is not recognised
[warn] /A factory for rules that apply to a particular context.
[warn] ^
[warn] two warnings found
[info] Scala API documentation generation successful.
[info] Packaging /home/ezh/ze/jerkson/target/scala-2.10/jerkson_2.10-0.1-SNAPSHOT-javadoc.jar ...
[info] Done packaging.
[warn] there were 17 deprecation warnings; re-run with -deprecation for details
[warn] there were 1 unchecked warnings; re-run with -unchecked for details
[warn] there were 51 feature warnings; re-run with -feature for details
[warn] three warnings found
[warn] Error reading API from class file : java.lang.UnsupportedClassVersionError: com/codahale/jerkson/JsonSnakeCase : Unsupported major.minor version 51.0
[info] Packaging /home/ezh/ze/jerkson/target/scala-2.10/jerkson_2.10-0.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] published jerkson_2.10 to /home/ezh/.ivy2/local/jerkson/jerkson_2.10/0.1-SNAPSHOT/poms/jerkson_2.10.pom
[info] published jerkson_2.10 to /home/ezh/.ivy2/local/jerkson/jerkson_2.10/0.1-SNAPSHOT/jars/jerkson_2.10.jar
[info] published jerkson_2.10 to /home/ezh/.ivy2/local/jerkson/jerkson_2.10/0.1-SNAPSHOT/srcs/jerkson_2.10-sources.jar
[info] published jerkson_2.10 to /home/ezh/.ivy2/local/jerkson/jerkson_2.10/0.1-SNAPSHOT/docs/jerkson_2.10-javadoc.jar
[info] published ivy to /home/ezh/.ivy2/local/jerkson/jerkson_2.10/0.1-SNAPSHOT/ivys/ivy.xml
[success] Total time: 56 s, completed 02.06.2013 9:22:48

Related

Problem with Maven plugin :maven-enforcer-plugin:3.0.0-M3:enforce Some Enforcer rules have failed

A little bit of context:
Im working as a FE developer for an AEM project. The project is a SPA AEM as cloud service. I am running the author instance from the command line.
My pc specs are:
CPU: Intel(R) Core(TM) i5-7400 CPU # 3.00GHz 3.00 GHz
RAM: 24.0 GB
SSD: 476 GB
OS: Windows 10 Pro
For the AEM Project we are using
Java sdk 11
Maven 3.6.3
I have already set up everything, the path variables, JAVA_HOME, mvn. All of them work fine, even trying to build other type of projects with "older" versions of AEM like 6.5 build perfectly. I don't have a problem with them. But with this version of AEM I am getting this error
[WARNING] Rule 9: org.apache.maven.plugins.enforcer.RequireFileChecksum failed with message:
There have been changes detected in a file which is supposed to be immutable according to https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html#file-structure: src/conf.dispatcher.d/renders/default_renders.any
[WARNING] Rule 10: org.apache.maven.plugins.enforcer.RequireFileChecksum failed with message:
There have been changes detected in a file which is supposed to be immutable according to https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html#file-structure: src/conf.dispatcher.d/virtualhosts/default_virtualhosts.any
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for xxxxxx 1.0.0-SNAPSHOT:
[INFO]
[INFO] xxxxxx ................................. SUCCESS [ 0.270 s]
[INFO] xxxxxx - Core .......................... SUCCESS [ 59.232 s]
[INFO] xxxxxx - UI Frontend ................... SUCCESS [ 19.876 s]
[INFO] xxxxxx - UI Frontend React ............. SUCCESS [ 39.613 s]
[INFO] xxxxxx - Repository Structure Package .. SUCCESS [ 0.991 s]
[INFO] xxxxxx - UI apps ....................... SUCCESS [ 12.990 s]
[INFO] xxxxxx - UI content .................... SUCCESS [ 4.178 s]
[INFO] xxxxxx - UI config ..................... SUCCESS [ 0.314 s]
[INFO] xxxxxx - All ........................... SUCCESS [ 1.052 s]
[INFO] xxxxxx - Integration Tests ............. SUCCESS [ 12.166 s]
[INFO] xxxxxx - Dispatcher .................... FAILURE [ 0.030 s]
[INFO] xxxxxx - UI Tests ...................... SKIPPED
[INFO] xxxxxx - Project Analyser .............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:34 min
[INFO] Finished at: 2021-08-22T15:11:20-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce (enforce-checksum-of-immutable-files) on project xxxxxxx.dispatcher.cloud: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :xxxxxx.dispatcher.cloud
I've been searching in sites, some of the answers for this problem haven't work for me.
I tried to run everything from the "gitbash"
command line and I had the same problem.
I tried to change the version in the pom.xml, didnt work.
I tried to build the project using eclipse IDE and all the build-in tools, I get an error that org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce is missing
Disable firewall and antivirus, nope
Use other versions of maven like 3.8.2
Delete the .m2 directory and download again all the plugins, not working
One of many answers tell me to comment out the dispatcher module in the pom.xml and after I did that builds fine. Other is doing the same and upload the ui.apps/target/*.zip with the crx package manager I did it but im not sure if the result is the "best".
To end, I installed the same project in a Mac Pro and i did without a problem. I hope someone can help me with this. Thanks for reading.
[WARNING] Rule 9: org.apache.maven.plugins.enforcer.RequireFileChecksum failed with message:
There have been changes detected in a file which is supposed to be immutable according to https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html#file-structure: src/conf.dispatcher.d/renders/default_renders.any
The Maven Enforcer Plugin is checking for some files to have an specific checksum using requireFileChecksum rule
Somewhere in your pom.xml the Enforcer Maven plugin should be declared, so you will be able to see the rule and the hash it is applying. This xml snippet is from the maven plugin documentation.
<requireTextFileChecksum>
<file>E:\java-workspace\apache-maven-enforcer\maven-enforcer\target\checkout\enforcer-rules\target\classes/foo.txt</file>
<checksum>d41d8cd98f00b204e9800998ecf8427e</checksum>
<type>md5</type>
</requireTextFileChecksum>
Check that hash against the hash of the file of your filesystem. Maybe when you change aem version, you need to upgrade some of those files.
As discussed here: https://github.com/adobe/aem-guides-wknd/pull/202
Adobe have reported the issue and the fix to Adobe AEM WKND project:
Some Windows users experience a Maven enforcer issue where it appears that default dispatcher files have been modified. Unclear if this is a result of differences between Mac and Windows or something that occurs during the checkout process. Most users simply want to install the code base to a local environment and this check is unnecessary. Removing the enforcement for windows builds.
so you can :
Skips Dispatcher enforcement plugin for users on windows environments.
doing a change you dispatcher/pom.xml
with the commit reported here:
https://github.com/adobe/aem-guides-wknd/pull/202/commits/bebcf5d2236c75a95055d5ff71ea58f66379f271
replacing the line:
<goal>enforce</goal>
with:
<goal>display-info</goal>

How do I suppress some Maven logs but keep other output?

I'm running Maven in a CI environment and want to see some of its log output - but I don't want to see routine messages about downloading artifacts etc.
I can use -q but that suppresses everything useful too.
Maven uses slf4j and by default uses the slf4j-simple backend so there's no logging.properties etc, and anyway how would I even find out which class generates the log messages?
e.g. if I have
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] XXX JDBC Driver - JDBC 4.2 [bundle]
[INFO] XXX JDBC Driver aggregate [pom]
[INFO]
[INFO] -----------------< XXX:XXX >------------------
[INFO] Building XXX JDBC Driver - JDBC 4.2 XXXX [1/2]
[INFO] -------------------------------[ bundle ]-------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # XXXX-jdbc ---
[INFO] Deleting XXXX/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-java) # XXX-jdbc ---
[INFO]
[INFO] --- build-helper-maven-plugin:1.5:parse-version (parse-version) # XXXX-jdbc ---
[INFO]
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (default) # XXXX-jdbc ---
[WARNING] Ignoring missing properties file: XXX/build.local.properties
[INFO]
[INFO] --- jcp:6.0.1:preprocess (preprocessSources) # XXX-jdbc ---
[INFO] Added MAVEN property mvn.project.name=XXX JDBC Driver - JDBC 4.2
[INFO] Added MAVEN property mvn.project.version=XX.YY.ZZ
.... blah blah blah ...
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running XXX.TestSuite
Tests run: 58, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 6.43 sec
and for this task I just want the test output, how do I do that?
Maven uses slf4j-simple. Its configuration is loaded from the classpath in a file simplelogger.properties. You can modify the classpath to put your own copy of this file first, but you can also override these properties by setting system properties.
First re-run your build with -D-Dorg.slf4j.simpleLogger.showLogName=true so you can see which classes the logs are coming from. Then adjust log levels as desired by setting additional properties named -Dorg.slf4.simpleLogger.log.[[classname]]=[[level]].
You may require the -B (batch) flag too.
I find it convenient to set these in a .mvn/maven.config file in my project, but you can use MAVEN_OPTS or the command line instead. An example .mvn/maven.config might be:
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
-Dorg.slf4j.simpleLogger.log.com.igormaznitsa.jcp.maven.PreprocessorMojo=warn
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.event.ExecutionEventLogger=warn
-Dorg.slf4j.simpleLogger.log.org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering=warn
-Dorg.slf4j.simpleLogger.log.org.apache.maven.plugin.clean.CleanMojo=warn
-Dorg.slf4j.simpleLogger.showLogName=true
Note that putting these options in a simplelogging.properties of the project being compiled will not work, it must be in the classpath of the maven runtime.
Also beware that .mvn/maven.config doesn't appear to support comments. I tried #, ;, //, /* .. */.

Not able to create Maven project in eclipse neo

hi I have the eclipse neo and java1.8 in my system. I have added the drools 6.5 jar in the eclipse but I am not able to create the maven project.
Can some one let me know the complete process of creating the maven project or I forget some thing?
Make sure that the Maven Integration for Eclipse plugin is installed in your IDE (it should be installed by default in Eclipse Neon).
In order to verify that, navigate to Window->Preferences and make sure Maven is listed in the left preferences list.
In case maven is not installed, install it using the Eclipse Marketplace.
In case it is, just create a new Maven project by navigating to File->New->Other->Maven->Maven Project.
You coud also create project from command line
mvn archetype:generate
and then import it inside eclipse as an maven project
Example command output below
$ mvn archetype:generate
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:generate]
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: http://cocoon.apache.org -> cocoon-22-archetype-block-plain (Creates an empty Cocoon block; useful if you want to add another block to a Cocoon application)
2: http://cocoon.apache.org -> cocoon-22-archetype-block (Creates a Cocoon block containing some small samples)
3: http://cocoon.apache.org -> cocoon-22-archetype-webapp (Creates a web application configured to host Cocoon blocks. Just add the block dependencies)
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 1
Downloading: http://localhost:8081/nexus/content/groups/mac/org/apache/cocoon/cocoon-22-archetype-block-plain/1.0.0/cocoon-22-archetype-block-plain-1.0.0.jar
13K downloaded
Define value for groupId: : com.company
Define value for artifactId: : example
Define value for version: 1.0-SNAPSHOT: :
Define value for package: com.company: : com.company.example
Confirm properties configuration:
groupId: com.company
artifactId: example
version: 1.0-SNAPSHOT
package: com.company.example
Y: :
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating OldArchetype: cocoon-22-archetype-block-plain:1.0.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.company
[INFO] Parameter: packageName, Value: com.company.example
[INFO] Parameter: package, Value: com.company.example
[INFO] Parameter: artifactId, Value: example
[INFO] Parameter: basedir, Value: /private/tmp/archetype
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 20,column 6] : $Id is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml [line 20,column 6] : $Id is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/src/main/resources/META-INF/cocoon/spring/block-application-context.xml [line 18,column 6] : $Id is not a valid reference.
[INFO] OldArchetype created in dir: /private/tmp/archetype/example
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 20 seconds
[INFO] Finished at: Tue Sep 09 19:10:51 CEST 2008
[INFO] Final Memory: 8M/15M
[INFO] ------------------------------------------------------------------------

Analysing with SonarQube causes 0 files indexed and no reports (Maven Project)

I have some trouble using SonarQube on an extern server. I'm working with SonarQube just for a couple days now and when I analyze my Maven project local everything is working fine. We are using a Postgresql database.
But there are some problems when I try to analyze a project on an extern SonarQube server.
The Environment:
I'm using SonarQube 4.4 and Maven 3.3. Please find my Maven settings.xml down below.
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.jdbc.url>
jdbc:postgresql://databaseadress/sonarqube?useUnicode=true&characterEncoding=utf8
</sonar.jdbc.url>
<sonar.jdbc.username>username</sonar.jdbc.username>
<sonar.jdbc.password>password</sonar.jdbc.password>
<sonar.host.url>
http://hostAdress
</sonar.host.url>
</properties>
</profile>
I already added the correct database connection. I set up the SonarQoube server by myself and the sonar.propterties was changed correctly.The project is written in Java.
Running an analysis it connects to the database and it starts analysing.
The Problem:
If I analyze the project with mvn sonar:sonar I get the following message:
...
INFO: SonarQube Server 4.4
[INFO] [17:07:01.958] Load global settings
[INFO] [17:07:02.137] User cache: C:\Users\christian.braun.sonar\cache
[INFO] [17:07:02.142] Install plugins
[INFO] [17:07:02.159] Install JDBC driver
[INFO] [17:07:02.163] Create JDBC datasource for jdbc:postgresql://databaseadress/sonarqube?useUnicode=true&characterEncoding=utf8
[INFO] [17:07:02.229] Initializing Hibernate
[INFO] [17:07:04.077] Loading technical debt model...
[INFO] [17:07:04.089] Loading technical debt model done: 12 ms
[INFO] [17:07:04.090] Load project settings
[INFO] [17:07:04.170] Apply project exclusions
[INFO] [17:07:04.257] ------------- Scan TestMaven
[INFO] [17:07:04.259] Load module settings
[INFO] [17:07:04.394] Loading rules...
[INFO] [17:07:04.403] Loading rules done: 9 ms
[INFO] [17:07:04.415] Configure Maven plugins
[INFO] [17:07:04.444] Compare to previous analysis (2014-09-02)
[INFO] [17:07:04.445] Compare over 30 days (2014-08-03, analysis of 2014-09-02 15:58:02.965)
[INFO] [17:07:04.446] No quality gate is configured.
[INFO] [17:07:04.461] Base dir: E:\WORKSPACE_TEST\1
[INFO] [17:07:04.461] Working dir: E:\WORKSPACE_TEST\1\target\sonar
[INFO] [17:07:04.461] Source dirs: E:\WORKSPACE_TEST\1\src\main\java
[INFO] [17:07:04.461] Test dirs: E:\WORKSPACE_TEST\1\src\test\java
[INFO] [17:07:04.461] Binary dirs: E:\WORKSPACE_TEST\1\target\classes
[INFO] [17:07:04.461] Source encoding: windows-1252, default locale: de_DE
[INFO] [17:07:04.461] Index files
[INFO] [17:07:04.483] 0 files indexed
[INFO] [17:07:04.486] Sensor QProfileSensor...
[INFO] [17:07:04.495] Sensor QProfileSensor done: 9 ms
[INFO] [17:07:04.495] Sensor InitialOpenIssuesSensor...
[INFO] [17:07:04.503] Sensor InitialOpenIssuesSensor done: 8 ms
[INFO] [17:07:04.503] Sensor ProjectLinksSensor...
[INFO] [17:07:04.514] Sensor ProjectLinksSensor done: 11 ms
[INFO] [17:07:04.515] Sensor VersionEventsSensor...
[INFO] [17:07:04.523] Sensor VersionEventsSensor done: 8 ms
[INFO] [17:07:04.523] Sensor FileHashSensor...
[INFO] [17:07:04.524] Sensor FileHashSensor done: 1 ms
[INFO] [17:07:04.524] Sensor CpdSensor...
[INFO] [17:07:04.524] Sensor CpdSensor done: 0 ms
[INFO] [17:07:04.524] Sensor Maven dependencies...
[INFO] [17:07:04.554] Sensor Maven dependencies done: 30 ms
[INFO] [17:07:04.660] Execute decorators...
[INFO] [17:07:04.740] Store results in database
[INFO] [17:07:04.782] ANALYSIS SUCCESSFUL, you can browse http://hostAdress/dashboard/index/1:1
[INFO] [17:07:04.879] Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob
[INFO] [17:07:04.880] Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob
[INFO] [17:07:04.897] Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
[INFO] [17:07:04.904] -> Keep one snapshot per day between 2014-08-05 and 2014-09-01
[INFO] [17:07:04.905] -> Keep one snapshot per week between 2013-09-03 and 2014-08-05
[INFO] [17:07:04.905] -> Keep one snapshot per month between 2009-09-08 and 2013-09-03
[INFO] [17:07:04.905] -> Delete data prior to: 2009-09-08
[INFO] [17:07:04.908] -> Clean TestMaven [id=5]
[INFO] [17:07:04.911] <- Clean snapshot 9
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.234 s
[INFO] Finished at: 2014-09-02T17:07:04+02:00
[INFO] Final Memory: 14M/76M
[INFO] ------------------------------------------------------------------------
Looks good at first sight but Sonar doesn't find any files. 0 files indexed
When I take a look at SonarQube I discover the project folder but there are no reports.
Question:
What could be the problem that Sonar doesn't index any files?
I read that this problem could go with the missing sonar-runner, but the SonarQube Documentation says that there is no need of the Sonar-Runner while using the Maven-Plugin.
Just to make this clear, the project is not on the same mashine as sonarqube. Does this matter for indexing files?
Please consider that I'm a complete newbie to SonarQube
Best regards
Christian
So i fixed the problem. SonarQube was just missing the needed plugins. I didn't had to do that using SonarQube on my localhost. After installing them through settings->Update Center everything worked fine. As I said this was a greenhorn mistake.

Compiling PrimeFaces 1.1

I am trying to modify the PrimeFaces 1.1 sources to fit my application needs. However I ran into trouble compiling the sources.
I am using the sources from:
http://repository.prime.com.tr/org/primefaces/primefaces/1.1/
Downloaded and extracted:
primefaces-1.1-sources.jar
However when i try to run the primefaces-1.1.pom it fails because its referencing to some XML files which contains the tag info, but I couldn't find those in the sources. I assume this build file is for PrimeFaces 2.x?
Or am i missing something? Would be great if you could help me!
Using Maven "Install"
"c:\program files (x86)\jetbrains\intellij idea 10.0\jre\jre\bin\java" -Dclassworlds.conf=D:\Werk\Binaries\Maven\bin\m2.conf -Dmaven.home=D:\Werk\Binaries\Maven -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 10.0\bin" -Dfile.encoding=windows-1252 -classpath "D:\Werk\Binaries\Maven\boot\plexus-classworlds-2.4.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 10.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher --no-plugin-registry --fail-fast --no-plugin-updates --strict-checksums --update-snapshots -f C:\Users\Mark\Downloads\primefaces-1.1-sources\pom.xml install
[WARNING] Command line option -npu is deprecated and will be removed in future Maven versions.
[WARNING] Command line option -npr is deprecated and will be removed in future Maven versions.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.primefaces:primefaces:jar:1.1
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 156, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building primefaces 1.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- xslt-maven-plugin:1.0:transform (generate-ui-metadata) # primefaces ---
[ERROR] XSL file does not exist: C:\Users\Mark\Downloads\primefaces-1.1-sources\src\main\resources-maven-jsf\misc\resolve_entities.xsl
[INFO]
[INFO] --- xslt-maven-plugin:1.0:transform (generate-touch-metadata) # primefaces ---
[ERROR] XSL file does not exist: C:\Users\Mark\Downloads\primefaces-1.1-sources\src\main\resources-maven-jsf\misc\resolve_entities.xsl
[INFO]
[INFO] --- maven-jsf-plugin:1.1.3:generate-tld (generate-ui) # primefaces ---
[INFO] Generating TLD
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.711s
[INFO] Finished at: Thu Dec 30 11:29:43 CET 2010
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.primefaces:maven-jsf-plugin:1.1.3:generate-tld (generate-ui) on project primefaces: Execution generate-ui of goal org.primefaces:maven-jsf-plugin:1.1.3:generate-tld failed. NullPointerException -> [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/PluginExecutionException
Process finished with exit code 1
If you just need to modify a single class (or a few), it may be easiest to take that class's source code alone, modify and compile it with the rest of Primefaces as JAR in the classpath, then replace that single class file in the JAR.

Categories