[JBoss Tools] - JBoss Tools and Developer Studio Beta 3 - Use the Source!
by Max Rydahl Andersen
Max Rydahl Andersen [https://community.jboss.org/people/maxandersen] modified the blog post:
"JBoss Tools and Developer Studio Beta 3 - Use the Source!"
To view the blog post, visit: https://community.jboss.org/community/tools/blog/2012/05/21/jboss-tools-a...
--------------------------------------------------------------
Beta3 of JBoss Tools and Developer Studio is now available with a good set of bugfixes but also a good set of new improvements and features in the area of OpenShift, Maven, BrowerSim, GWT, Annotation Processing and it even now come with easy installable source features for easy debugging and hacking.
https://community.jboss.org/servlet/JiveServlet/showImage/38-4854-18193/j... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4854-181...
h4. Beta3
Developer Studio: [ http://devstudio.jboss.com/earlyaccess Download] | Tools: [ http://www.jboss.org/tools/download/dev Download] [ http://download.jboss.org/jbosstools/updates/development/indigo/ Update Site] | [ http://docs.jboss.org/tools/whatsnew What's New] [ http://www.jboss.com/index.html?module=bb&op=viewforum&f=201 Forums] [ http://jira.jboss.com/jira/browse/JBIDE JIRA] [ http://twitter.com/jbosstools Twitter]
JBoss Tools is a set of plugins for Eclipse that complements, enhances and goes beyond the support that exist for JBoss and related technologies in the default Eclipse distribution.
JBoss Developer Studio is a fully bundled Eclipse distribution which not only includes majority of JBoss Tools but also all its needed dependencies and 3rd party plugins allowing for an easy one-click and no-fuzz installation.
If you are into doing your own bleeding edge eclipse plugin assembly, JBoss tools is for you, if you are more into having something that "Just Works" then JBoss Developer Studio is the way to go.
h2. Installation
+JBoss Developer Studio+ comes with everything pre-bundled in its installer. Simply http://devstudio.jboss.com/earlyaccess download it and run it like this:
java -jar jbdevstudio-<installername>.jar
Note, if you are on Mac OSX 64-bit we recommend you ensure to select the 32-bit option in the multi-platform installer to get Visual Page editor working and use much less memory.
Similar if you are on Windows 64-bit then use a 32-bit JDK to get 32-bit version running.
+JBoss Tools+ requires a bit more:
This release requires at least Eclipse 3.7.1 but we recommend using the http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/... Eclipse 3.7.2 JEE Bundle since then you get most of the dependencies preinstalled.
Once you have installed Eclipse, you either find us on http://marketplace.eclipse.org/content/jboss-tools-indigo Eclipse Marketplace under "JBoss Tools (Indigo)" or use our update site directly.
The update site URL to use from Help > Install New Software... is:
http://download.jboss.org/jbosstools/updates/development/indigo/ http://download.jboss.org/jbosstools/updates/development/indigo/
Note: SOA tooling such as Drools, jbpm, ESB, Teeid etc. are not included in the JBoss Tools core releases at this time - they will be available separately.
h2. OpenShift
The OpenShift platform is moving and improving all the time and this also shows in the OpenShift tooling included in JBoss Tools.
The most prominent and waited for feature in this release is we now support starting port forwarding from the IDE instead of using the command line.
And we've done it so it is even better and more powerful than the command line in a couple of situations:
* it works on all platforms out of the box
* it allows you to choose between using 127.0.0.1 or the remote addresses (especially good for Mac and Windows which needs configuration using 127.0.0.x)
* it will find free ports if necessary avoiding you to have to stop your local running servers to connect to OpenShift
http://docs.jboss.org/tools/whatsnew/openshift/images/port-forwarding.png http://docs.jboss.org/tools/whatsnew/openshift/images/port-forwarding.png
To start/stop this you use the context menu of your OpenShift application in OpenShift Explorer (previously named OpenShift Console).
OpenShift Tools further more now allows you to put any existing application onto OpenShift where it previously only allowed Eclipse WTP projects. These projects can now even be multi-module Maven projects if you want to. This feature should be used with care since it overwrites your OpenShift application and your project content might not be working out of the box on OpenShift - thus use with care and if it fails
remember that OpenShift uses Git for it storage so you can roll it back in case of a failure.
And finally OpenShift tools also allows you to create scalable applications in the UI now.
http://docs.jboss.org/tools/whatsnew/openshift/images/create-scalable-app... http://docs.jboss.org/tools/whatsnew/openshift/images/create-scalable-app...
h2. Annotation Processing w/Maven
Java EE 6 really started pushing more and more annotation processors and Eclipse APT provides a nice incremental integreation with this in Eclipse that makes it fast and non-invasive.
Unfortunately in context of Maven this have not always been easy to get configured since there exists multiple ways to invoke the Annotation Processor and in some cases Eclipse APT single-folder-output gives problems
With this release of JBoss Tools we are also releasing a configurator for m2e which combines all the best plugins concerning Annotation Processing and made something better and more integrated.
Fred Bricon have written a full blog about the feature set and how it works - if you use Annotation processing and maven I recommend you https://community.jboss.org/community/tools/blog/2012/05/20/annotation-pr... read it.
h2. Google Web Toolkit (GWT) w/Maven
In our previous releases we have struggled with getting GWT examples to load into Eclipse without users having to tweak and manually run certain actions in specific sequence. The reason for this all came down to that there did not exist a m2e Configurator which takes the maven compiler plugin settings and apply them to Google's Eclipse plugin properly. With JBoss Tools Beta 3 that now exists and it just works.
Without this loaded you would have to manually add the GWT module xml to Eclipse and then perform a build based on that which would generate to possibly different output directories than your Maven project is configured to. With JBoss Tools for Maven loaded this a problem of the past.
h2. Mobile Browser Simulator Skins
BrowserSim now has support for View Source, roatation of the screen by clicking in the corners and two new skins:
http://docs.jboss.org/tools/whatsnew/vpe/images/3.3.0.Beta3/browsersim-ip... http://docs.jboss.org/tools/whatsnew/vpe/images/3.3.0.Beta3/browsersim-ip... http://docs.jboss.org/tools/whatsnew/vpe/images/3.3.0.Beta3/browsersim-an... http://docs.jboss.org/tools/whatsnew/vpe/images/3.3.0.Beta3/browsersim-an...
...and finally as a team enjoying the wonders of Open Source we've added two things that could not exist without the source(s) being open:
h2. JBoss Source Lookup
We've included the JBoss Source Lookup container which Snjezana have been working on that will scan a directory of jar's and use their Maven metadata and if necessary their MD5 checksum to locate the source code for any Launch configuration not just your Maven projects and Maven classpath provider.
This is useful when you have a server like JBoss, Tomcat, Glassfish or any other server or framework which jar's are mostly available in Maven repositories together with their source artifacts.
This allow you to fully debug your runtimes without having to pollute your classpath or Eclipse project configuration with runtime details, machine specific locations and manual download of the sources.
http://docs.jboss.org/tools/whatsnew/images/sourcelookuppreferences.png http://docs.jboss.org/tools/whatsnew/images/sourcelookuppreferences.png
The feature must be explicitly enabled, thus be sure to read https://community.jboss.org/community/tools/blog/2012/01/24/jboss-source-... Snjezana's wiki article outlining how to use this.
h2. Eclipse Source Features
If you are into Eclipse plugin development and want to tinker with the source of JBoss Tools our updatesite now include a matching source feature for majority of our plugins under the Source category on the updatesite. This allows debugging and editing of JBoss Tools plugin without having to checkout our full SVN source tree. Contributions very welcome :)
h2. ...and more
As usual screenshots and more explanation of what is new is available from the http://docs.jboss.org/tools/whatsnew What's New site!
Let us know what you think - and do know that we are codefreezing for CR1/GA any day now, so do let us know if you find big issues or simply just love it - both things is what keeps us going :)
Have fun,
Max
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/community/tools/blog/2012/05/21/jboss-tools-a...]
12 years, 7 months
[JBoss Tools] - JBoss Source Lookup
by Max Rydahl Andersen
Max Rydahl Andersen [https://community.jboss.org/people/maxandersen] modified the blog post:
"JBoss Source Lookup"
To view the blog post, visit: https://community.jboss.org/community/tools/blog/2012/01/24/jboss-source-...
--------------------------------------------------------------
The JBoss Tools Source Lookup plugin automatically adds a source attachment when debugging JBoss AS servers.
The plugin has been tested with JBoss AS 7.x and JBoss AS 6.1.
h4. Installing the JBoss Source Lookup plugin
* install JBoss Tools 3.3 as described in https://community.jboss.org/community/tools/blog/2011/12/18/learn-java-ee... Learn Java EE 6 quickly using JBoss Central
> *Note*: Since JBoss Tools 3.3 Beta3 JBoss Source Lookup is available and part of JBoss Tools Maven integration.
> No need to install JBoss Source Lookup from the temporary updatesite anymore.
* call Help>Install New Software..., click the Add button and enter the following update site:
https://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/org.jboss.too... https://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/org.jboss.too...
https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17822/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
Install the JBoss Tools Source Lookup category and restart Eclipse.
h4. Using the JBoss Source Lookup plugin
* set up the central JBoss Maven repository as explained in: https://community.jboss.org/docs/DOC-15169 Maven Getting Started - Users
* create the jboss-as-helloworld project by following the instructions in https://community.jboss.org/community/tools/blog/2011/12/18/learn-java-ee... Learn Java EE 6 quickly using JBoss Central
* wait for Maven to refresh indexes
The use and debugging of this plugin is demonstrated in the following screencast: http://screencast.com/t/i6k9hzkjViOs Debugging JBoss AS server.
The JBoss Source Lookup plugin enhances source attachment in the following way:
* archive file doesn't have to be in the maven classpath
* archive file doesn't have to be included in the classpath (jbossweb-*.jar, for instance). The JBoss Source Lookup plugin will find a class within a JBoss AS distribution and, if it is a Maven artifact, the plugin will attach the corresponding source.
* archive file doesn't have to be in the m2e index (jbossjts-4.16.0.Final.jar, for instance)
You don't have to add any JBoss AS Runtime to the classpath. I have added it in order to ensure the classes within the runtime are included in the Java Search and in order to be easier to add a breakpoint.
h4. Debugging Apache Tomcat and Glassfish servers
The JBoss Source plugin can serve to debug other servers.
If a server includes mavenized archives, the JBoss Source container will find, download, and show source files.
I have tested the Apache Tomcat 7.0.25 and Glassfish 3.1.1.
If you want to debug Apache Tomcat and/or Glassfish, you have to do the following:
* create some Apache Tomcat/Glassfish server https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17852/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
* open the server editor https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17854/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
* click *Open launch configuration* and select the *Source* tab https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17855/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
* click the *Add* button and select the *JBoss AS Source Container* https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17857/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
* JBoss AS servers will be automatically recognized and you can choose them by clicking a server
As to other servers, you need to click the *Choose Home* button, select all the directories in which the server's archives are placed.
If you debug Tomcat, you can choose $TOMCAT_HOME/lib. When debugging Glassfish, you can choose $GLASSFISH_HOME/lib and $GLASSFISH_HOME/modules.
You can add as many JBoss AS Source containers as you want.
https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17858/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
* move a JBoss Source container(s) to the end (optional) https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17859/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
* you can add a Server Runtime container to the project's classpath (optional) https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17860/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
* start the server in the debug mode https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17861/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
*StandardWrapper.java* is placed in the glassfish's *web-core.jar*.
The Source Lookup plugin finds this archive's source and shows it in the editor.
In a similar way you can debug Apache Tomcat server.
https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17862/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
The *ApplicationFilterChain.java* is placed in the Tomcat's *catalina.jar* archive.
The Source Lookup plugin finds source for a mavenized archive as follows:
* using the m2e API
* using the archive's metadata (META-INF/maven)
* using nexus repositories that can be defined using the Source Lookup preferences page https://community.jboss.org/servlet/JiveServlet/showImage/38-4482-17863/l... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4482-178...
The Source Lookup preferences page enables you to add/remove, enable/disable and/or change ordering of Nexus repositories.
You can see that the *helloworld* project I have used in this blog, *is not a maven project* (it doesn't contain the maven icon).
JBoss Source Lookup plugin can be used to debug any Java project.
The plugin doesn't have to be used for debugging only.
It will find, download and open a source file for a mavenized archive included in the classpath when double-clicking a class file in the *Package Explorer* view, opening it using *Navigate>Open Type* or some other way.
The JBoss Source Lookup plugin can be used for any Java project and any launch configuration.
*Note*: When starting debugging the first time, it could take some time until m2e updates indexes and the JBoss Source lookup plugin scans the container's directory.
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/community/tools/blog/2012/01/24/jboss-source-...]
12 years, 7 months
[JBoss Tools] - Annotation Processing support in m2e
by Fred Bricon
Fred Bricon [https://community.jboss.org/people/fbricon] modified the blog post:
"Annotation Processing support in m2e"
To view the blog post, visit: https://community.jboss.org/community/tools/blog/2012/05/20/annotation-pr...
--------------------------------------------------------------
Maven Integration for Eclipse JDT Annotation Processor Toolkit a.k.a *m2e-apt* is now available in its version 1.0. m2e-apt aims at providing automatic Annotation Processing configuration in Eclipse based on your project's pom.xml and its classpath dependencies (Requires Java >= 1.6).
m2e-apt supports both annotation processing set on the http://maven.apache.org/plugins/maven-compiler-plugin/index.html maven-compiler-plugin or the http://code.google.com/p/maven-annotation-plugin/ maven-processor-plugin (the latter takes precedence over the former).
For example, to enable the JPA modelgen annotation processor, you can either set :
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>1.2.0.Final</version>
</dependency>
</dependencies>
</plugin>
or
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.0.5</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>1.2.0.Final</version>
</dependency>
</dependencies>
</plugin>
The generated source folders (target/generated-sources/annotation for maven-compiler-plugin; target/generated-sources/apt for maven-processor-plugin) are automatically added to the project classpath.
https://community.jboss.org/servlet/JiveServlet/showImage/38-4947-18598/m... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4947-185...
By default, Annotation Processing is managed by Eclipse JDT APT, so a change in your source classes triggers incremental processing automatically. The downside of using JDT APT is, there's no separation between main and test classes (the way maven-processor-plugin handles them).
To mitigate that limitation, you can change the workspace or project preferences to delegate annotation processing to maven, instead of JDT APT. This will result in slower incremental builds (all classes will be processed) but will provide identical results to maven command line builds. Note this only works when using maven-processor-plugin. When annotation processing is driven by maven-compiler-plugin, JDT APT is always used in eclipse.
Automatic annotation processing configuration from the maven pom.xml can also be disabled altogether. In this case, your manual settings for Eclipse JDT APT will remain untouched.
Go to Window > Preferences > Maven > Annotation processing or right-click on your project > Properties > Maven > Annotation processing to select the Annotation Processing strategy of your choice.
https://community.jboss.org/servlet/JiveServlet/showImage/38-4947-18599/m... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4947-185...
m2e-apt is heavily based on the work from two community members :
* a https://bugs.eclipse.org/bugs/show_bug.cgi?id=335036 patch for m2e by Karl M. Davis, from Knowledge Computing Corp, implementing Eclipse JDT APT configuration based on the maven-compiler-plugin's configuration.
* https://github.com/excilys/m2e-extras/tree/master/com.excilys.ebi.m2e.apt com.excilys.ebi.m2e.apt by Stéphane Landelle, from eBusiness Information, Excilys Group, implementing direct maven-processor-plugin invocation from m2e.
m2e-apt is available :
* via a stable update site http://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-apt http://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-apt
* for JBoss Tools 3.0.0.Beta3 users, via the Software/Update tab in JBoss Central
* bundled with https://devstudio.jboss.com/earlyaccess/ JBoss Developer Studio 5.0.0.Beta3
Source code is available at https://github.com/jbosstools/m2e-apt github. If you find any bug, please raise a ticket on m2e-apt's https://github.com/jbosstools/m2e-apt/issues?state=open issue tracker.
Happy hacking,
Fred
https://twitter.com/#!/fbricon https://twitter.com/#!/fbricon
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/community/tools/blog/2012/05/20/annotation-pr...]
12 years, 7 months
[Beginner's Corner] - Singleton Timerbean cannot be installed
by Ulrich Kriegel
Ulrich Kriegel [https://community.jboss.org/people/ukriegel] created the discussion
"Singleton Timerbean cannot be installed"
To view the discussion, visit: https://community.jboss.org/message/736664#736664
--------------------------------------------------------------
Hi there,
I'm new here and hope thats the correct forum to ask. If not, please, give me a a link to the correct one.
I'm trying to install a simple timer bean in JBoss6.1.Final, which sould publish every 10 sec a Testmessage with content "foo" on a given Topic
package foo.baz;
import javax.annotation.Resource;
import javax.ejb.LocalBean;
import javax.ejb.Schedule;
import javax.ejb.Singleton;
import javax.ejb.Stateless;
import javax.ejb.Timeout;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;
import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.jms.Topic;
import org.apache.log4j.Logger;
/**
* Session Bean implementation class LifeEventTimer
*/
//@Singleton
@Stateless
@LocalBean
public class LifeEventTimer{
private static Logger logger = Logger.getLogger(LifeEventTimer.class);
@Resource(mappedName="/ConnectionFactory")
private ConnectionFactory connectionFactory;
@Resource(mappedName="topic/Output")
private Topic topic;
private static String INTERNAL_LIFE_MESSAGE = "foo";
private String USER_NAME="foo";
private String PASSWD = "baz";
/**
* Default constructor.
*/
public LifeEventTimer() {
}
public void send(final String messageText, String userName, String passwd) {
try {
Connection connection = connectionFactory.createConnection(userName, passwd);
logger.trace("connection: "+connection);
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
logger.trace("session: "+session);
MessageProducer publisher = session.createProducer(topic);
logger.trace("publisher: "+publisher);
final TextMessage message = session.createTextMessage(messageText);
logger.debug("textMessage: " + message.getText());
publisher.send(message);
connection.close();
} catch (JMSException e) {
logger.error("JMSException: ", e);
}
}
@Timeout
@Schedule(second = "*/10", minute = "*", hour = "*", persistent = false)
public void timeout() {
send(INTERNAL_LIFE_MESSAGE,USER_NAME, PASSWD);
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/736664#736664]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[jBPM] - Sending a calendar invite through jBPM5
by Qihan Zhang
Qihan Zhang [https://community.jboss.org/people/highway89] created the discussion
"Sending a calendar invite through jBPM5"
To view the discussion, visit: https://community.jboss.org/message/736070#736070
--------------------------------------------------------------
Hi,
I was taking a look at SendIcal.java class and was wondering how to ultimately use it to send a calendar invite through Microsoft Exchange using smtp.
I was confused as to why the SendIcal class was placed within the jbpm-human-task-core.. let's say you simply wanted to fire off a calendar invite through a workflow using a custom CalendarWorkItemhandler, how would you go about implementing this? Is this even necessary?
Do you have to create a custom workitem definition, ex. CalendarTask, or can you use the existing Email service task to do this, since theoretically a calendar invite is just an attachment on the email and Microsoft exchange simply parses the attachment as a calendar event?
If you simply wanted to send a calendar event without caring about handling the responses using jBPM5, how would you go about doing this?
Thanks,
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/736070#736070]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months