-
1. Re: Problem by building the project "skeleton-plugin"
thomas2004 Apr 2, 2014 6:17 AM (in response to thomas2004)I can now build the project without any error. Please don't reply to my post.
-
2. Re: Problem by building the project "skeleton-plugin"
pilhuhn Apr 2, 2014 10:59 AM (in response to thomas2004)
I can now build the project without any error. Please don't reply to my post.Not so easy, young man :-)
If you had issues building this, then I/we obviously need to improve the documentation and perhaps also update the sample code to use a more recent version of RHQ.
Can you tell me/us, what you did to get going?
Thanks
Heiko
-
3. Re: Problem by building the project "skeleton-plugin"
thomas2004 Apr 3, 2014 6:13 AM (in response to pilhuhn)Hi Heiko,
I just change the repositories in the pom.xml. The repository in the original file is not available anymore. And the both java files are duplicate and I delete the duplicated one. Otherwise I got exception by building.
Here is the pom.xml:
[code]
...
<repositories>
<repository>
<id>jboss-public-repo-group</id>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
<!-- Explicitly disable snapshots, so Maven won't try to
check for updates for snapshot internal (rhq-*) deps.
-->
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- jboss-deprecated-repo above is only available inside Red Hat, so we need this as fallback:
-->
<repository>
<id>jboss-deprecated-items-group</id>
<name>JBoss Public Repository Group</name>
<url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>redhat-maven-repository</id>
<name>Red Hat maven repository</name>
<url>http://maven.repository.redhat.com/earlyaccess/all</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- this is needed for swagger-annotations_2.9.1 in modules/enterprise/server/jar
-->
<repository>
<id>sonatype-snapshots</id>
<name>Sonatype Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repo-group</id>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
</pluginRepository>
<pluginRepository>
<id>jboss-central-mirror-repo-group</id>
<name>JBoss Public Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/developer/</url>
</pluginRepository>
</pluginRepositories>
...
[/code]
I have further questions:
1.
I can deploy the built plugin to JON 3.1.2 but fails by JON 3.2.0. I got error like these:
...
07:34:48,575 ERROR [org.rhq.enterprise.server.core.plugin.PluginDeploymentScanner] (pool-7-thread-1) Scan failed. Cause: java.lang.Exception:File [/opt/jboss/jon/jon-server-3.2.0.GA/modules/org/rhq/server-startup/main/deployments/rhq.ear/rhq-downloads/rhq-plugins/skeleton-plugin-1.0.jar] is not a valid jarfile - it is either corrupted or file has not been fully written yet.
...
Maybe the source code is not for new version of JON 3.2.0? I've heard the older JON run on Jboss 4 but the new one runs on Jboss 7, right?
2.
Though I can deploy the plugin to the JON 3.1.2 successfully. And I can find it under "Administration -> Agent-Plugin". But I don't know how to use it. The screenshots in your article seems from the very old version of JON?
It's very nice if you can update your article. :-)
-
4. Re: Problem by building the project "skeleton-plugin"
pilhuhn Apr 3, 2014 6:25 AM (in response to thomas2004)Thomas,
thanks for your reply - I will definitively update that.
Were you looking at http://www.redhat.com/f/pdf/Write_A_Plugin_WP_web.pdf (which is indeed pretty old now) or the already updated version from https://github.com/pilhuhn/misc_writing/tree/master/HowToWriteAnRhqPlugin (which also needs an update).
Thanks again
Heiko
-
5. Re: Problem by building the project "skeleton-plugin"
pilhuhn Apr 3, 2014 6:33 AM (in response to thomas2004)Thomas,
1.
I can deploy the built plugin to JON 3.1.2 but fails by JON 3.2.0. I got error like these:
...
07:34:48,575 ERROR (pool-7-thread-1) Scan failed. Cause: java.lang.Exception:File /opt/jboss/jon/jon-server-3.2.0.GA/modules/org/rhq/server-startup/main/deployments/rhq.ear/rhq-downloads/rhq-plugins/skeleton-plugin-1.0.jar is not a valid jarfile - it is either corrupted or file has not been fully written yet.
...
Does unzip -l /opt/jboss/jon/jon-server-3.2.0.GA/modules/org/rhq/server-startup/main/deployments/rhq.ear/rhq-downloads/rhq-plugins/skeleton-plugin-1.0.jar work and contain some good looking content?
It may be that if you e.g. ftp the file over, the plugin scanner kicks in before it was completely written.
Maybe the source code is not for new version of JON 3.2.0? I've heard the older JON run on Jboss 4 but the new one runs on Jboss 7, right?
It is supposed to work with newer versions. The app server version that the JON-server runs on has indeed been upgraded but that should not affect plugins at all (famous last words
2.
Though I can deploy the plugin to the JON 3.1.2 successfully. And I can find it under "Administration -> Agent-Plugin". But I don't know how to use it. The screenshots in your article seems from the very old version of JON?
So when a plugin is deployed on the server it also needs to be put into the agent, which can be achieved by running plugins update on the agent (e.g. via the JON ui as operation) or by restarting the agent. It should then go out and discover resources or - if they are marked as manual-add only, you need to e.g. go to the inventory tab or the platform with the agent on and select the resource on the manual add button.
Hope that helps you further
Heiko
-
6. Re: Problem by building the project "skeleton-plugin"
thomas2004 Apr 3, 2014 9:57 AM (in response to pilhuhn)Ok, it works now.