getting error Reason: Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin trying to build slideshow-plugin - jenkins-plugins

When i try to build (mvn) the slide-show plugin, i get error:
(see detaied stdout below)
mvn -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING] POM for 'org.kohsuke.stapler:maven-stapler-plugin:pom:1.15:runtime' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.kohsuke.stapler:maven-stapler-plugin
POM Location: /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
Reason: Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.kohsuke.stapler:maven-stapler-plugin': Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.loadPluginFully(DefaultLifecycleExecutor.java:1599)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findArtifactTypeHandlersInPlugins(DefaultLifecycleExecutor.java:1468)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findExtensions(DefaultLifecycleExecutor.java:222)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:178)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.InvalidPluginException: Unable to build project for plugin 'org.kohsuke.stapler:maven-stapler-plugin': Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:293)
at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:205)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:184)
at org.apache.maven.plugin.DefaultPluginManager.loadPluginFully(DefaultPluginManager.java:1626)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.loadPluginFully(DefaultLifecycleExecutor.java:1582)
... 15 more
Caused by: org.apache.maven.project.InvalidProjectModelException: Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1599)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1571)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:562)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)
at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:277)
... 19 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Apr 16 00:32:26 EDT 2012
[INFO] Final Memory: 15M/182M
[INFO] ------------------------------------------------------------------------

I am getting this too (although its for the akuma artifact) and can explain why, but have not yet found a good solution. Both define a parent POM and a new repo:
<parent>
<groupId>org.kohsuke</groupId>
<artifactId>pom</artifactId>
<version>2</version>
</parent>
<repositories>
<repository>
<id>m.g.o-public</id>
<url>http://maven.glassfish.org/content/groups/public/</url>
</repository>
</repositories>
The URL for this glassfish maven repo gives a 301 to https://maven.glass... and for some reason, maven decides to download the body of that response as the POM. If you look in your ~/.m2/repository/org/kohsuke/pom/2/pom-2.pom, you should see something like:
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/0.6.39</center>
</body>
</html>
Manually looking at the glassfish repo, I do not even see the desired parent POM (at this time).
I hope this helps. If you are able to figure it out, please post back as this is as far as I have gotten so far!

I had this problem also, with a different POM from another project, and I was attempting to build with Maven 3.X. The simple solution was to install the most recent 2.X version of Maven. After that, it built fine. Being a Maven novice, It appears the URI format for REPOS differs between the 2 versions.
Simply install Maven 2.X (I used 2.2.1), and put it's "bin" directory first in your PATH env variable, and you should be good to go.

Related

Issue with setting up MSSQL with Jhipster

Im trying to use jhipster for my backend project, one of the requirement is to use mssql. Based on my previous question :
https://github.com/jhipster/generator-jhipster/issues/4612#issuecomment-265076842
#ruddel did advise me to use this
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:sqlserver://localhost:1433;database=msqltest
username: SA
password: yourStrong(!)Password
hikari:
.........
jpa:
database-platform: org.hibernate.dialect.SQLServer2012Dialect
database: SQL_SERVER
.........
after setting this i need to run maven command so Jhipster initial entities can be generated for gateway project and Microservice by liquibase with this command as per guide by jhipster
liquibase:diff
and encountered this error:
[INFO] Settings
----------------------------
[INFO] driver: com.zaxxer.hikari.HikariConfig
[INFO] url: jdbc:sqlserver://localhost:1433;database=IASDB
[INFO] username: devuser
[INFO] password: *****
[INFO] use empty password: false
[INFO] properties file: null
[INFO] properties file will override? false
[INFO] prompt on non-local database? true
[INFO] clear checksums? false
[INFO] changeLogFile: src/main/resources/config/liquibase/master.xml
[INFO] context(s): null
[INFO] label(s): null
[INFO] referenceDriver: null
[INFO] referenceUrl: hibernate:spring:com.mbb.ias.domain?dialect=org.hibernate.dialect.SQLServer2012Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.Spate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
[INFO] referenceUsername: null
[INFO] referencePassword: null
[INFO] referenceDefaultSchema: null
[INFO] diffChangeLogFile: src/main/resources/config/liquibase/changelog/20161208102850_changelog.xml
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.109 s
[INFO] Finished at: 2016-12-08T18:28:54+08:00
[INFO] Final Memory: 37M/342M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.5.3:diff (default-cli) on project ias-gateway: Error setting up or running Liquibase: liquibase.exception.DatabaseExceptionnot find database driver: com.zaxxer.hikari.HikariConfig cannot be cast to java.sql.Driver -> [Help 1]
so i refer back to jhipster they did mention to change the setting inside pom.xml also which i did as per :
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>${liquibase.version}</version>
<configuration>
<changeLogFile>src/main/resources/config/liquibase/master.xml</changeLogFile>
<diffChangeLogFile>src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
<driver>com.zaxxer.hikari.HikariConfig</driver>
<url>jdbc:sqlserver://localhost:1433;database=IASDB</url>
<defaultSchemaName>IASDB</defaultSchemaName>
<username>devuser</username>
<password>CIATopSecret</password>
<referenceUrl>hibernate:spring:com.mbb.ias.domain?dialect=org.hibernate.dialect.SQLServer2012Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy</referenceUrl>
<verbose>true</verbose>
<logging>debug</logging>
</configuration>
it will hrow the error as per above msg or this :
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.5.3:diff (default-cli) on project ias-gateway: Error setting up or running Liquibase: liquibase.exception.DatabaseExceptionnot find database driver: com.zaxxer.hikari.HikariConfig cannot be cast to java.sql.Driver -> [Help 1]
i did try to change my pom to use com.microsoft.SQLServerDriver, it throw me
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.5.3:diff (default-cli) on project ias-gateway: Error setting up or running Liquibase: liquibase.exception.DatabaseExceptionnot find database driver: com.microsoft.SQLServerDriver -> [Help 1]
Anyone to advise how to change my pom? if i want to use sub generator, i need to generate the entities one by one? sorry for the noob question. here is my Jhipster info:
##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
```yaml
{
"generator-jhipster": {
"jhipsterVersion": "3.12.0",
"baseName": "IASGateway",
"packageName": "com.mbb.ias",
"packageFolder": "com/mbb/ias",
"serverPort": "8080",
"authenticationType": "jwt",
"hibernateCache": "ehcache",
"clusteredHttpSession": false,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "mysql",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": "kafka",
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSocialSignIn": false,
"jwtSecretKey": "3f2b1ccd09c528361c2b0f321f96fb62728e9830",
"useSass": false,
"applicationType": "gateway",
"testFrameworks": [
"gatling"
],
"jhiPrefix": "jhi",
"enableTranslation": false
}
}
```
##### **Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**
ls: no such file or directory: .jhipster/*.json
##### **Browsers and Operating System**
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
git version 2.10.2.windows.1
node: v7.2.1
npm: 3.10.10
bower: 1.8.0
gulp:
[18:56:33] CLI version 1.2.2
[18:56:33] Local version 3.9.1
yeoman: 1.8.5
For full MSSQL support, you should use v3.12.1 - your project was generated with v3.12.0, before we supported that database. You also shouldn't run liquibase:diff initially (it will fail until the app runs liquibase for the first time).
The following code is the pom configuration for MSSQL liquibase from a freshly generated project, the main difference I see is the driver tag:
<configuration>
<changeLogFile>src/main/resources/config/liquibase/master.xml</changeLogFile>
<diffChangeLogFile>src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
<driver></driver>
<url>jdbc:sqlserver://localhost:1433;database=databaseName</url>
<defaultSchemaName></defaultSchemaName>
<username>SA</username>
<password>yourStrong(!)Password</password>
<referenceUrl>hibernate:spring:com.mycompany.myapp.domain?dialect=org.hibernate.dialect.SQLServerDialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy</referenceUrl>
<verbose>true</verbose>
<logging>debug</logging>
</configuration>

No plugin found for prefix 'gcloud' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo]

I'm trying to deploy and run Google-pubsub sample code in Google app engine by this read me file. While running the deploy command I encounter below build error.
E:\java\cloud-pubsub-samples-java-master>mvn gcloud:deploy -Dgcloud.version=1 -DskipTests=true
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] pubsub-pull-sample
[INFO] Example for the Google Cloud Pub/Sub on Google App Engine.
[INFO] Cloud Dataflow Examples
[INFO] cloud-pubsub-samples-java
Downloading: https://repo.maven.apache.org/maven2/org/eclipse/m2e/lifecycle-mapping/1.0.0/lifecycle-mapping-1.0.0.pom
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
Downloading: https://repo.maven.apache.org/maven2/org/eclipse/m2e/lifecycle-mapping/1.0.0/lifecycle-mapping-1.0.0.jar
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Could not find artifact org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 in central (https://repo.maven.apache.org/maven2)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 9.8 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 KB at 8.9 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] pubsub-pull-sample ................................. SKIPPED
[INFO] Example for the Google Cloud Pub/Sub on Google App Engine. SKIPPED
[INFO] Cloud Dataflow Examples ............................ SKIPPED
[INFO] cloud-pubsub-samples-java .......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.167 s
[INFO] Finished at: 2016-08-21T22:20:45+05:30
[INFO] Final Memory: 13M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'gcloud' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\JAISON.G\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [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/NoPluginFoundForPrefixException
This means that you haven't included the gcloud maven plugin in pom.xml. But you should no longer use gcloud, rather using appengine. See the documentation here.

gcloud-java authentication datastore (upgrade to v1beta3 in 0.1.7/0.2.0)

I had a java GAE application running using gcloud-java 0.1.4 for some time and wanted to upgrade to gcloud-java 0.1.7/0.2.0, as we are experiences several 404s etc. (another problem). We are using gcloud as we connect to a datastore instance in another GAE application.
But after upgrading the package, our authentication fails. From what I read in release notes, we had to re-enable the datastore-api on the "host" application, so we did but without any results. When "downgrading" again, the application works as intended but still with some stability issues.
Are there other undocumented fixes/methods to get it to work?
My connection code/function looks like (stripped):
fis = new FileInputStream(Constants.PATH_TO_JSON_KEY);
sac = AuthCredentials.createForJson(fis);
DatastoreOptions.Builder builder = DatastoreOptions.builder();
builder.projectId(Constants.DATASTORE_PROJECT_ID);
builder.authCredentials(sac);
DatastoreOptions options = builder.build();
return options.service();
EDIT:
Here are the some of the stack traces that I get.
[INFO] apr 17, 2016 6:19:33 PM com.google.datastore.v1beta3.client.DatastoreFactory makeClient
[INFO] com.google.cloud.datastore.DatastoreException: Not authorized.
[INFO] at com.google.cloud.datastore.spi.DefaultDatastoreRpc.translate(DefaultDatastoreRpc.java:102)
[INFO] at com.google.cloud.datastore.spi.DefaultDatastoreRpc.runQuery(DefaultDatastoreRpc.java:157)
[INFO] at com.google.cloud.datastore.DatastoreImpl$1.call(DatastoreImpl.java:92)
[INFO] at com.google.cloud.datastore.DatastoreImpl$1.call(DatastoreImpl.java:89)
[INFO] at com.google.cloud.RetryHelper.doRetry(RetryHelper.java:181)
[INFO] at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:247)
[INFO] at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:237)
[INFO] at com.google.cloud.datastore.DatastoreImpl.runQuery(DatastoreImpl.java:88)
[INFO] at com.google.cloud.datastore.QueryResultsImpl.sendRequest(QueryResultsImpl.java:73)
[INFO] at com.google.cloud.datastore.QueryResultsImpl.<init>(QueryResultsImpl.java:57)
[INFO] at com.google.cloud.datastore.DatastoreImpl.run(DatastoreImpl.java:82)
[INFO] at com.google.cloud.datastore.DatastoreImpl.run(DatastoreImpl.java:73)
.....
[INFO] Caused by: com.google.datastore.v1beta3.client.DatastoreException: Not authorized., code=PERMISSION_DENIED
[INFO] at com.google.datastore.v1beta3.client.RemoteRpc.makeException(RemoteRpc.java:126)
[INFO] at com.google.datastore.v1beta3.client.RemoteRpc.makeException(RemoteRpc.java:169)
[INFO] at com.google.datastore.v1beta3.client.RemoteRpc.call(RemoteRpc.java:89)
[INFO] at com.google.datastore.v1beta3.client.Datastore.runQuery(Datastore.java:108)
[INFO] at com.google.cloud.datastore.spi.DefaultDatastoreRpc.runQuery(DefaultDatastoreRpc.java:155)
[INFO] ... 56 more
Thanks for reporting this issue. I have a couple of follow up questions so that we can get to the bottom of this:
Does the project ID you set (Constants.DATASTORE_PROJECT_ID) contain any prefixes with a tilde, perhaps "s~" or "e~"? Datastore v1beta3 no longer accepts those prefixes; instead you should provide everything after the tilde as your project ID. For example, if your project ID is s~my-project-id-123, you should use just my-project-id-123. This might be the issue if you see an error message similar to:
com.google.datastore.v1beta3.client.DatastoreFactory makeClient: Not using any credentials
com.google.cloud.datastore.DatastoreException: The project s~my-project-id-123 does not exist.
If that isn't the issue, do you mind providing a stack trace and a copy of the exception text (removing confidential information as necessary). Thanks!
The service account we were using wasnt set setup with the appropriate permissions in the destination application. So we had (from advice from google) re-add the service account as a viewer here: https://console.cloud.google.com/permissions/projectpermissions
I hope this can help others in the future!

Problems using org.apache.lucene on Appengine

Hi on my last project I used the lucene-analyzer for generating keywords on appengine. Now i want to use it again with my new project but it seems that it is restricted by GAE. I tried to set the version back to the version I used at my last Project but it doesn´t work anymore. I get the following error:
java.lang.NoClassDefFoundError: java.lang.management.ManagementFactory is a restricted class. Please see the Google App Engine developer's guide for more details.
[INFO] at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
[INFO] at org.apache.lucene.util.RamUsageEstimator.<clinit>(RamUsageEstimator.java:223)
[INFO] at org.apache.lucene.util.ArrayUtil.<clinit>(ArrayUtil.java:32)
[INFO] at java.lang.Class.forName0(Native Method)
[INFO] at java.lang.Class.forName(Class.java:190)
[INFO] at com.google.appengine.tools.development.agent.runtime.RuntimeHelper.checkRestricted(RuntimeHelper.java:70)
[INFO] at com.google.appengine.tools.development.agent.runtime.Runtime.checkRestricted(Runtime.java:64)
[INFO] at org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl.<init>(CharTermAttributeImpl.java:33)
[INFO] at org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl.<init>(PackedTokenAttributeImpl.java:40)
[INFO] at org.apache.lucene.util.AttributeFactory$1.createInstance(AttributeFactory.java:140)
[INFO] at org.apache.lucene.util.AttributeFactory$StaticImplementationAttributeFactory.createAttributeInstance(AttributeFactory.java:103)
[INFO] at org.apache.lucene.util.AttributeSource.addAttribute(AttributeSource.java:222)
[INFO] at org.apache.lucene.analysis.standard.StandardTokenizer.<init>(StandardTokenizer.java:182)
[INFO] at org.apache.lucene.analysis.de.GermanAnalyzer.createComponents(GermanAnalyzer.java:194)
[INFO] at org.apache.lucene.analysis.Analyzer.tokenStream(Analyzer.java:144)
does anybody know why i get this error?
You get this error because Lucene's RamUsageEstimator tries to access the ManagementFactory class to determine the VM's object alignment. java.lang.management.ManagementFactory is restricted on GAE (probably for security reasons), and a NoClassDefFoundError is thrown.
If you look at LuceneAppEngine and LuGAEne (projects providing a directory implementation that lets you use Lucene on Google App Engine), you can see that they provide an alternative RamUsageEstimator, where they catch that exception:
https://github.com/UltimaPhoenix/luceneappengine/blob/416f86f1ab303d37d183af9e7e220b22437d71b9/src/main/java/org/apache/lucene/util/RamUsageEstimator.java#L179
https://github.com/svenjacobs/lugaene/blob/a3ced4f2a112d3810c4c5a0d84d4efcf4bf1e709/src/main/java/org/apache/lucene/util/RamUsageEstimator.java#L250
I think you should consider using one of these "lucene-GAE" projects if you want to use the lucene-analyzer on GAE.
I don't know why it worked for you in your previous project. Maybe you used one of these lucene-GAE projects and forgot to include it in the new project?

Can not execute Sonar: Fail to decorate

I installed a sonar server on my own pc (Windows XP), and I deployed sonar on Tomcat with a MySQL database.
I successfully analysed an old project. But with my current project, I get this exception when trying to execute mvn sonar:sonar:
EDIT:
[INFO] [14:39:37.254] Sensor CoberturaSensor done: 218 ms
[INFO] [14:39:37.254] Sensor Maven dependencies...
[INFO] [14:39:41.426] Sensor Maven dependencies done: 4172 ms
[INFO] [14:39:41.848] Execute decorators...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:53.354s
[INFO] Finished at: Tue May 15 14:39:43 CEST 2012
[INFO] Final Memory: 21M/138M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (d
efault-cli) on project XXX: Can not execute Sonar: Fail to decorate 'com.myPackage
.myClass': 793 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project XXX: Can
not execute Sonar
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)
at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
... 19 more
Caused by: org.sonar.api.utils.SonarException: Fail to decorate 'com.myPackage.myClass
'
at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(Decorators
Executor.java:84)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(Decorators
Executor.java:70)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(Decorators
Executor.java:63)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(Decorators
Executor.java:63)
at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.
java:55)
at org.sonar.batch.phases.Phases.execute(Phases.java:94)
at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:14
3)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)
at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.jav
a:109)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)
at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)
... 23 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 793
at org.sonar.plugins.core.timemachine.tracking.HashedSequenceComparator.
equals(HashedSequenceComparator.java:34)
at org.sonar.plugins.core.timemachine.ViolationTrackingBlocksRecognizer.
computeLengthOfMaximalBlock(ViolationTrackingBlocksRecognizer.java:48)
at org.sonar.plugins.core.timemachine.ViolationTrackingDecorator.mapViol
ations(ViolationTrackingDecorator.java:130)
at org.sonar.plugins.core.timemachine.ViolationTrackingDecorator.decorat
e(ViolationTrackingDecorator.java:70)
at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(Decorators
Executor.java:79)
... 39 more
I don't understand where the problem comes from. Please anyone have an answer? Can it come from my POM configuration?
PS: the command lines mvn clean install and mvn site work correctly...
You're facing a bug of Sonar 3.0 (=> http://jira.codehaus.org/browse/SONAR-3442). We have release Sonar 3.0.1 (see http://www.sonarsource.org/downloads/) that fixes this issue.

Resources