Sonar default, meet "container state was: CONSTRUCTED" - maven-2

Environment: hudson/sonar/maven2 in ubuntu locally with default parameters
And I got the log from hudson below, I can't figure out where is the problem.
[INFO] Sonar host: http://localhost:9000
[INFO] Sonar version: 2.0.1
[INFO] [sonar-core:internal {execution: default-internal}]
[INFO] Database dialect class org.sonar.api.database.dialect.Derby
[INFO] ------------- Analyzing Game of Life business logic module
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar
Embedded error: Can not analyze the project
Cannot stop. Current container state was: CONSTRUCTED
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
And I notice it also has problem when run it command line without hudson
mvn sonar:sonar

I got this problem with .Net plugins for Sonar.
They needed all projects to be analyzed with JDK 6 (even non-.Net projects).
This error was raised when I tried to analyze projects with JDK 5.
Here is the URL of the .Net plugins : http://docs.codehaus.org/display/SONAR/.Net+plugin
The solution I got was to fork the compiler to use a JDK5 compiler on my projects which needed to be analyzed in JDK5 and not JDK6.
See on the .Net plugins page :
Maven and Sonar dotnet plugins need Java6 (at compile time and runtime)
What the sentence does not say is that all projects in your Sonar instance must use Java6.
A JIRA has been created : http://jira.codehaus.org/browse/SONARPLUGINS-1086 .

Got the hints from http://old.nabble.com/Another-%22Current-container-state-was%3A-CONSTRUCTED%22-problem-td28172925.html#a28194257
It seems the problem is inconsistency in maven plugins in my nexus repository, when I change to mirrors.ibiblio.org and clean the .m2 directory, everything goes fine.
BUT I don't know which plugins causes this problem and the log information is so wired, will be nice if some people points which plugin cause this problem and explain the reason for this error information

Related

Apache Isis build failure migrating from v1.12.2. Unknown repositories ApplicationUser,

I am migrating an Apache Isis application from version 1.12.2 and currently using the legacy addons Security, Audit, and SessionLogger. I plan on updating to the latest Isis version and using the latest Incode addons here.
When changing the Isis version to 1.13.0 it fails the build. I did not see anything in the migration notes that will fix this. The build error is unkown repository for ApplicationRole, ApplicationTenancy, ApplicationUser. The bootstrap class lists the addon modules and there are no errors using Isis 1.12.2.
(update)
I thought it possible that Isis and the Incode addons should upgrade together at some point and someone would mention it, but I wasn't sure. Then looking more into this, I noticed the Apache Isis isis-app-todoapp uses an Isis version one major release higher, as well as the Incode addons, which are also one major release higher than what I have. Any idea about this? I would like to get to the latest Isis and Incode versions.
[ERROR]
[ERROR] #DomainObject annotation on org.isisaddons.module.security.dom.role.ApplicationRole specifies unknown repository 'org.isisaddons.module.security.dom.role.ApplicationRoleRepository'
[ERROR] #DomainObject annotation on org.isisaddons.module.security.dom.tenancy.ApplicationTenancy specifies unknown repository 'org.isisaddons.module.security.dom.tenancy.ApplicationTenancyRepository'
[ERROR] #DomainObject annotation on org.isisaddons.module.security.dom.user.ApplicationUser specifies unknown repository 'org.isisaddons.module.security.dom.user.ApplicationUserRepository'
[ERROR]
[ERROR]
[INFO] calling #PreDestroy on all domain services
[INFO] shutting down
org.apache.isis.core.metamodel.specloader.SpecificationLoader#1e2fe282
[INFO] ---------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] App ................................. SUCCESS [ 0.652s]
[INFO] App DOM ............................. FAILURE [ 37.945s]
[INFO] App Fixtures ........................ SKIPPED
[INFO] App App ............................. SKIPPED
[INFO] App Webapp .......................... SKIPPED
[INFO] ---------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 40.974 s
[INFO] Finished at: 2018-05-25T09:47:05-04:00
[INFO] Final Memory: 84M/692M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.isis.tool:isis-maven-plugin:1.13.2:validate (default) on project App-dom: 3 meta-model problems found. -> [Help 1]
[ERROR]
Solved by removing a maven build-profile slash validation step, after reading similar SO question, and updating the Incode addon modules with each major Isis release. I successfully went through Apache Isis release 1.13.0, 1.14.0, 1.15.0, 1.16.2.

Not able to execute scripts from Jenkins although working fine locally & via command line

I am Not able to run scripts from Jenkins. How ever working fine from Command line & Local. I am within office network. Getting Below Error. I don't understand why Jenkins is trying to download Maven plugin? I am new to Jenkins. Any suggestion will be appretiated.
[INFO] ------------------------< Test:Junit-Demo >-------------------------
[INFO] Building Junit-Demo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.695 s
[INFO] Finished at: 2018-04-11T14:29:52-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.68.215] failed: Connection timed out: connect -> [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
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding="UTF-8"
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
Maven, triggered by Jenkins, downloads the maven-clean-plugin as part of its normal execution. This happened on your location machine in the first run and was then cached in ~/.m2/.
Your Jenkins build agent, however, cannot connect to the server from which maven downloads artifacts:
Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.68.215] failed: Connection timed out: connect
Make sure that there is no firewall involved blocking these connections or configure Jenkins to use a local artifact repository (like Nexus or Artifactory).
Missing some info to fully know what's wrong.
To use maven in Jenkins you have to install the jenkins maven plugin and call the binary in your Jenkins file.
Did you have to do any maven configuration for your local set up?
ie inside ~/.m2 is usually where you would set up your account for nexus credentials inside settings.xml.
You would have to do this same config on your jenkins machine, either in the Jenkins user account's ~/.m2 or inside the maven plugin folder.

Multi-tenant in Broadleaf

I am new to Broadleaf. And i am trying to do multitenant in it.
I can't find any documentation in Broadleaf official site. I found one project in github about multitenancy in broadleaf.That's the link
https://github.com/BroadleafCommerce/DemoSite-MultiTenant-SingleSchema
As i build that project in maven through "mvn install", its getting build failure, below error comes as i build that project.
[INFO] Reactor Summary:
[INFO]
[INFO] ecommerce ......................................... SUCCESS [0.619s]
[INFO] core .............................................. SUCCESS [1:35.628s]
[INFO] admin ............................................. FAILURE [27.273s]
[INFO] site .............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:03.894s
[INFO] Finished at: Mon Jun 03 10:08:01 IST 2013
[INFO] Final Memory: 12M/60M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project admin: Could not resolve dependencies for project com.mycompany:admin:war:1.0: Could not find artifact com.broadleafcommerce:broadleaf-multitenant-singleschema:jar:1.0.0-SNAPSHOT in snapshots (http://192.168.1.10:8080/artifactory/libs-snapshot) -> [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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :admin
Maybe it states that it can't find the broadleaf-multitenant-singleschema jar that define in pom.xml.
<dependency>
<groupId>com.broadleafcommerce</groupId>
<artifactId>broadleaf-multitenant-singleschema</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
I tried to find that jar manually , but I can't found that jar.
I can't figure out what's the problem is.
Is it possible to do multitenant in broadleaf ?
Is that demo is about multitenant in broadleaf ?
Thanks in advance.
Ankit
glad to hear that you are trying out Broadleaf!
As you mentioned in your comment, the Broadleaf Multitenant Singleschema module is a commercial module, not a community module. Another point: Broadleaf itself (as in the core Broadleaf framework) is all open source. There is no separate commercial version of the core Broadleaf code base. However, some of the modules that we offer are commercial. Multitenant is one of them, along with things like change sets and other 3rd-party integrations (like Braintree or Sagepay).
If you would like some additional information about the multitenant module, feel free to shoot us an email at info AT broadleafcommerce.com.
Source: being a Broadleaf employee :)

Scala: SBT Eclipse plugin fails to build Breeze from scalanlp.org

I am new to Breeze (http://www.scalanlp.org/) and Scala in general. Please help to generate
Eclipse project for Breeze with sbt. I have Eclipse plugin for sbt installed.
When I try sbt eclipse it fails with the following errors. What is
wrong?
Thanks!
> ~/Distrib/Scala/breeze-master>sbt
[info] Loading global plugins from /home/an/.sbt/plugins
[info] Loading project definition from /home/an/Distrib/Scala/breeze-
master/project
[info] Set current project to breeze (in build file:/home/an/Distrib/
Scala/breeze-master/)
> eclipse
[info] About to create Eclipse project files for your project(s).
[error] java.util.NoSuchElementException: None.get
[error] Use 'last' for the full log.
> last
...
...
[debug] Project dependencies for configuration 'compile':
Success(List(breeze-math))
[debug] Project dependencies for configuration 'test': Success(List())
java.util.NoSuchElementException: None.get
at scala.None$.get(Option.scala:274)
at scala.None$.get(Option.scala:272)
at com.typesafe.sbteclipse.core.Eclipse$.relativize(Eclipse.scala:
498)
at com.typesafe.sbteclipse.core.Eclipse$$anonfun$srcEntry
$1.apply(Eclipse.scala:252)
at com.typesafe.sbteclipse.core.Eclipse$$anonfun$srcEntry
$1.apply(Eclipse.scala:249)
at scalaz.effects.IO$$anon$3$$anonfun$pure$1$$anonfun$apply
$23.apply(IO.scala:118)
at scalaz.effects.IO$$anon$3$$anonfun$pure$1$$anonfun$apply
$23.apply(IO.scala:118)
at scalaz.FreeFunctions$$anonfun$return_$1.apply(Free.scala:181)
at scalaz.FreeFunctions$$anonfun$return_$1.apply(Free.scala:181)
at scalaz.Pure$$anon$19$$anon$2.apply(Pure.scala:76)
at scalaz.Functor$$anon$15$$anon$45.apply(Functor.scala:84)
at scalaz.Free$class.go$1(Free.scala:73)
at scalaz.Free$class.run(Free.scala:76)
at scalaz.Free$Gosub.run(Free.scala:18)
at scalaz.effects.IO$class.unsafePerformIO(IO.scala:13)
at scalaz.effects.IO$$anon$2.unsafePerformIO(IO.scala:113)
at com.typesafe.sbteclipse.core.Eclipse$.onSuccess(Eclipse.scala:149)
at com.typesafe.sbteclipse.core.Eclipse$$anonfun$action
$4.apply(Eclipse.scala:105)
at com.typesafe.sbteclipse.core.Eclipse$$anonfun$action
$4.apply(Eclipse.scala:105)
at scalaz.Validation$class.fold(Validation.scala:7)
at scalaz.Success.fold(Validation.scala:82)
at com.typesafe.sbteclipse.core.Eclipse$.action(Eclipse.scala:105)
at com.typesafe.sbteclipse.core.Eclipse$$anonfun$eclipseCommand
$2.apply(Eclipse.scala:81)
at com.typesafe.sbteclipse.core.Eclipse$$anonfun$eclipseCommand
$2.apply(Eclipse.scala:81)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply
$2.apply(Command.scala:60)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply
$2.apply(Command.scala:60)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply
$3.apply(Command.scala:62)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply
$3.apply(Command.scala:62)
at sbt.Command$.process(Command.scala:90)
at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:
71)
at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:
71)
at sbt.State$$anon$2.process(State.scala:170)
at sbt.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
at sbt.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.MainLoop$.next(MainLoop.scala:71)
at sbt.MainLoop$.run(MainLoop.scala:64)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:53)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:50)
at sbt.Using.apply(Using.scala:25)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:50)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:33)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:17)
at sbt.MainLoop$.runLogged(MainLoop.scala:13)
at sbt.xMain.run(Main.scala:26)
at xsbt.boot.Launch$.run(Launch.scala:55)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
at xsbt.boot.Launch$.launch(Launch.scala:69)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Boot$.runImpl(Boot.scala:31)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
[error] java.util.NoSuchElementException: None.get
[error] Use 'last' for the full log.
>
This is a known bug in sbteclipse: https://github.com/typesafehub/sbteclipse/issues/128
You can try commenting out the "doc" project in the Project.scala definition and see if that helps. Otherwise, I think this is a bug in sbteclipse that has to get resolved first.

Error While Test The Project On Maven

i am using maven i don't have more knowledge about maven when i am install my project then it will successfully build but when i am test my project with maven it will give me an error like
Unable to copy an artifact to the working directory
i gave all permission to my project directory detail error as below so how can i resolve my
problem and how to run my project
so please help me
E
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 24 seconds
[INFO] Finished at: Thu Jan 27 17:44:59 IST 2011
[INFO] Final Memory: 35M/84M
[INFO] ------------------------------------------------------------------------
[INFO] Unable to copy an artifact to
the working directory Embedded error:
/home/nayan/workspace/ONiT/mediaPlayer/target/classes
(Is a directory) [INFO]
This looks like some of the previous tests are still running at this point and blocking maven from writing in the target directory.
As this seems to be an reactor build, do the modules themself build correctly ? I.e. can you run mvn test in each module directory seperately ?