Comments (15)
Do you have a small demo project? I can clone and test?
from gradle-sonar-packaging-plugin.
Sorry, I don't... Anyway, I have just found that one element of the packaging differs and that's in the Plugin-Dependencies
entries.
While the maven plugin generates "artifact-version.jar", this plugin generates "artifact:version.jar"... Maybe that explains it, I don't know; I have just modified the source and will try again.
I'll keep you informed.
from gradle-sonar-packaging-plugin.
Yeah when i write to the manifest i generate the entries here:
https://github.com/iwarapter/gradle-sonar-packaging-plugin/blob/master/src/main/groovy/com/iadams/gradle/plugins/tasks/PackagePluginTask.groovy#L136
If the manifest is wrong thats where it will be from!
from gradle-sonar-packaging-plugin.
Also noticed this difference:
META-INF/lib/grappa-2.0.0-beta.4-all.jar
META-INF/lib/grappa-2.0.0-beta.4.jar
from gradle-sonar-packaging-plugin.
Spot on! I think it's the problem...
In module sonar-objectscript-squid:
dependencies {
compile(group: "com.github.fge", name: "grappa",
version: "2.0.0-beta.4", classifier: "all") {
exclude(group: "com.google.guava", module: "guava");
};
compile(group: "org.codehaus.sonar", name: "sonar-plugin-api",
version: "5.0.1");
compile(group: "org.codehaus.sonar.sslr-squid-bridge",
name: "sslr-squid-bridge", version: "2.6");
testCompile(group: "com.fasterxml.jackson.core",
name: "jackson-databind", version: "2.5.1");
}
Note the classifier
...
from gradle-sonar-packaging-plugin.
OK, so, anyway, this quick patch solves the problem of :
vs -
:
diff --git a/src/main/groovy/com/iadams/gradle/plugins/tasks/PackagePluginTask.groovy b/src/main/groovy/com/iadams/gradle/plugins/tasks/PackagePluginTask.groovy
index 0c9642e..d19dc56 100644
--- a/src/main/groovy/com/iadams/gradle/plugins/tasks/PackagePluginTask.groovy
+++ b/src/main/groovy/com/iadams/gradle/plugins/tasks/PackagePluginTask.groovy
@@ -133,7 +133,7 @@ class PackagePluginTask extends Jar {
if(!getSkipDependenciesPackaging()) {
List<ResolvedDependency> dependencies = new DependencyQuery(project).getNotProvidedDependencies()
- manifest.attributes.put(PluginManifest.DEPENDENCIES, dependencies.collect{ "META-INF/lib/${it.moduleName}:${it.moduleVersion}.jar" }.join(' '))
+ manifest.attributes.put(PluginManifest.DEPENDENCIES, dependencies.collect{ "META-INF/lib/${it.moduleName}-${it.moduleVersion}.jar" }.join(' '))
if(dependencies.size()>0){
logger.info "Following dependencies are packaged in the plugin:\n"
This and the classifier stuff should solve it all, I believe
from gradle-sonar-packaging-plugin.
OK, now I don't know how the problem should be solved; the maven plugin, somehow, picked the correct dependency but renamed it! While the gradle plugin picked it as is but only accounted for the name and version and not a potential qualifier...
I suck at groovy, which doesn't help matters; but there are potentially two solutions:
- do it like the maven plugin, and rename the dependency; or
- massage the dependency list so that the qualifier be added to the dependency name, if any.
I'll try and do the second solution since it will be easier for me and keep you informed...
from gradle-sonar-packaging-plugin.
OK, I've just submitted a PR.
As you will see, it's far from being "groovy"... I only know Java. And I know it's not perfect... I think the collection of such information should be done earlier on.
Well, it Works For Me(tm)...
from gradle-sonar-packaging-plugin.
OK well, as far as I'm concerned this issue can be closed.
When do you think a first version will be published? I'd like to code an example plugin using your plugin and sonar-sslr-grappa
from gradle-sonar-packaging-plugin.
There are a few other small bits that need doing, no blockers to publishing an initial version. I'll try and get this published in the next day or two.
from gradle-sonar-packaging-plugin.
An initial version has been released https://plugins.gradle.org/plugin/com.iadams.sonar-packaging
from gradle-sonar-packaging-plugin.
@fge Have you had a chance to use the initial version?
from gradle-sonar-packaging-plugin.
Yes, I have been using it for several weeks straight for my language plugin without a hitch :)
I mentioned in on dev@sonar, didn't you notice?
from gradle-sonar-packaging-plugin.
Didn't see anything after i posted on the release, i just wanted to add a little bit to the readme of examples of it being used.
from gradle-sonar-packaging-plugin.
Argh...
Well, I use it in a project which is commercial :(
What I'll do is convert https://github.com/litesolutions/sonar-dummylanguage to use your plugin and tell you when it's done.
Sorry for that :/
from gradle-sonar-packaging-plugin.
Related Issues (20)
- The plugin fails with Gradle 2.11 HOT 1
- Refactor out internal api calls HOT 1
- localDeploy does not work
- 0.1.4: the plugin fails to account for gradle 2.12's new (and longly awaited) compileOnly HOT 12
- LoggingManager.setLevel(LogLevel) has been deprecated HOT 1
- Build failed if using sonar-plugin-api ver-5.5 and above HOT 3
- `pluginPackaging` failed in gradle multiproject HOT 5
- Support `sonarQubeMinVersion` property HOT 2
- Deprecation warning with gradle 3.5 / support for gradle 4.0 HOT 11
- org.sonarsource.sonarqube:sonar-plugin-api should be declared in dependencies problem HOT 8
- Package dependencies better
- Plugin class not found after just updating kotlin dependencies HOT 4
- Plugin not compatible with Gradle 5.0 HOT 5
- `implementation` dependencies not resolved
- Could not get unknown property 'compile' HOT 3
- Change packaging finalizedBy dependency
- Build goes into endless loop and craches HOT 10
- org.codehaus.sonar:sonar-plugin-api or org.sonarsource.sonarqube:sonar-plugin-api should be declared in dependencies HOT 1
- xstream not added to the output plugin jar HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-sonar-packaging-plugin.