Re: writing a notifier

2007-10-10 Thread Michael Masters


On Oct 10, 2007, at 1:02 AM, Emmanuel Venisse wrote:




Michael Masters a écrit :

I have a whole new set of questions now :)
I am using continuum Version 1.1-beta-3. I have jar'ed up my code  
and added the jar to apps/continuum/webapp/WEB-INF/lib/. I have  
used the web interface to continuum to set up the IRC notifier and  
that is working. I don't see how to configure the project to call  
my notifier.


If you added a irc notifier to your project group or your project,  
it will be used by continuum for each build. You don't need more  
configuration.




The IRC notifier runs without problems, but MY notifier does not run.  
Do I have to create a UI for my notifier to run. If not, then how do  
I configure it in application.xml or can I not do this in  
application.xml. I included the relevant files in my previous post.








Also, can you provide some insight on what I need to do to get a  
gui set up for my notifier. I assume this also requires some  
additional configuration to persist values.


To add a notifier in the UI, you can follow this steps:

- modify WEB-INF/jsp/notifier/notifierSelectType.jsp to add your  
notifier in the select field, the key is the role_hint of your  
component(rally-continuum)
- In WEB-INF/classes/xwork.xml, add a new result in  
addProjectNotifier and in addProjectGroupNotifier actions (result  
name=rally-continuum_input/WEB-INF/jsp/notifier/ 
notifierRally.jsp/result)

- Create the jsp WEB-INF/jsp/notifier/notifierRally.jsp
- Create IrcProjectNotifierEditAction and  
IrcGroupNotifierEditAction classes with edit and save methods

- Declare edit and save actions for the group in xwork.xml:
action name=rallyProjectGroupNotifierEdit  
class=rallyGroupNotifierEdit method=edit
  result name=success/WEB-INF/jsp/notifier/ 
notifierRally.jsp/result

/action

action name=rallyProjectGroupNotifierSave  
class=rallyGroupNotifierEdit method=save
  result name=input/WEB-INF/jsp/notifier/notifierRally.jsp/ 
result
  result name=success type=chainprojectGroupNotifier/ 
result

/action
- Add result name=rally-component_input  
type=chainrallyProjectGroupNotifierEdit/result in  
editProjectGroupNotifier action in xwork.xml

- Declare edit and save actions for the project in xwork.xml:
action name=rallyProjectNotifierEdit  
class=rallyNotifierEdit method=edit
  result name=success/WEB-INF/jsp/notifier/ 
notifierRally.jsp/result

/action

action name=rallyProjectNotifierSave  
class=rallyNotifierEdit method=save

  result name=success type=chainprojectView/result
  result name=to_group_page  
type=chainprojectGroupNotifier/result

/action
- Add result name=rally-component_input  
type=chainrallyProjectNotifierEdit/result in  
editProjectNotifier action in xwork.xml


- Restart Continuum

Emmanuel


Thanks in advance,
Mike Masters
##
# I have created the following test class:
##
package com.rallydev.integration.build.continuum;
import  
org.apache.maven.continuum.notification.AbstractContinuumNotifier;

import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
public class RallyContinuumNotifier
extends AbstractContinuumNotifier
{
public void sendNotification( String source, Set recipients,  
Map configuration, Map context ) {
getLogger().info(THIS IS MY TEST from sendNotification 4  
arg);

}
public void sendNotification( String arg0, Set arg1,  
Properties arg2 ) {
getLogger().info(THIS IS MY TEST from sendNotification 3  
arg);

}
}
##
# I have the following in apps/continuum/conf/application.xml
##
application
  services
service
  idjetty/id
  configuration
webapps
  webapp
file${plexus.home}/lib/continuum-webapp-1.1- 
beta-3.war/file

context/continuum/context
extraction-path${plexus.home}/webapp/extraction-path
standardWebappClassloadertrue/ 
standardWebappClassloader

listeners
  http-listener
port${jetty.port}/port
  /http-listener
  !--
  proxy-http-listener
port8090/port
proxy-hostlocalhost/proxy-host
proxy-port80/proxy-port
  /proxy-http-listener
  --
/listeners
  /webapp
/webapps
  /configuration
/service
  /services
  components
!--
| The rally notifier
|--
component
  roleorg.codehaus.plexus.notification.notifier.Notifier/role
  role-hintrally-continuum/role-hint
   
implementationcom.rallydev.integration.build.continuum.RallyContinu 
umNotifier/implementation

Re: writing a notifier

2007-10-09 Thread Michael Masters

I have a whole new set of questions now :)


I am using continuum Version 1.1-beta-3. I have jar'ed up my code and  
added the jar to apps/continuum/webapp/WEB-INF/lib/. I have used the  
web interface to continuum to set up the IRC notifier and that is  
working. I don't see how to configure the project to call my notifier.


Also, can you provide some insight on what I need to do to get a gui  
set up for my notifier. I assume this also requires some additional  
configuration to persist values.


Thanks in advance,
Mike Masters

##
# I have created the following test class:
##


package com.rallydev.integration.build.continuum;


import  
org.apache.maven.continuum.notification.AbstractContinuumNotifier;


import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

public class RallyContinuumNotifier
extends AbstractContinuumNotifier
{

public void sendNotification( String source, Set recipients, Map  
configuration, Map context ) {
getLogger().info(THIS IS MY TEST from sendNotification 4  
arg);

}

public void sendNotification( String arg0, Set arg1, Properties  
arg2 ) {
getLogger().info(THIS IS MY TEST from sendNotification 3  
arg);

}
}

##
# I have the following in apps/continuum/conf/application.xml
##
application
  services
service
  idjetty/id
  configuration
webapps
  webapp
file${plexus.home}/lib/continuum-webapp-1.1- 
beta-3.war/file

context/continuum/context
extraction-path${plexus.home}/webapp/extraction-path
standardWebappClassloadertrue/standardWebappClassloader
listeners
  http-listener
port${jetty.port}/port
  /http-listener
  !--
  proxy-http-listener
port8090/port
proxy-hostlocalhost/proxy-host
proxy-port80/proxy-port
  /proxy-http-listener
  --
/listeners
  /webapp
/webapps
  /configuration
/service
  /services

  components
!--
| The rally notifier
|--
component
  roleorg.codehaus.plexus.notification.notifier.Notifier/role
  role-hintrally-continuum/role-hint
   
implementationcom.rallydev.integration.build.continuum.RallyContinuumN 
otifier/implementation

  requirements
requirement
/requirement
  /requirements
  configuration
alwaysSendtrue/alwaysSend
  /configuration
/component

  /components
/application



On Oct 5, 2007, at 1:15 AM, Emmanuel Venisse wrote:




Michael Masters a écrit :
I've looked at JabberContinuumNotifier and I have some questions  
on how I create my own notifier.
1. Once I write my notifier by extending  
AbstractContinuumNotifier, how do I install it. In other words,  
where do I put it the class file? Can I jar up all my classes and  
place them somewhere?


To build your notifier, run 'mvn clean install' on your notifier  
project to create the jar then put it under apps/continuum/webapp/ 
WEB-INF/lib/


2. Can someone explain how I am suppose to configure my notifier  
in apps/continuum/conf/application.xml?


component
  roleorg.codehaus.plexus.notification.notifier.Notifier/role
  role-hintyour_notifier_id/role-hint
  implementationpackage.notifier_class/implementation
/component
* It looks like the requirement tag is suppose to define some  
classes that my notifier is dependent on. Is this true?


If you have some requirement in your class like 'ConfiguredService'  
declared like that in jabber notifier class:

/**
 * @plexus.requirement
 */
private ConfigurationService configurationService;
you must add it in the requirement tag in application.xml, so  
plexus will set and initialize configurationService automatically.
* What's allowed in the configuration tag? For example, I need  
things like login ID, password, and URL to configure the notifier.  
I assume I add tags for this in  configuration. Is this true? If  
so, then how do I get to this information from my notifier?


The configuration part is to initialize your notifier when it is  
created by plexus. If in your configuration, you add  
passwordmyPassword/password, plexus will initialize the private  
password field in your class automatically.


Plexus site: http://plexus.codehaus.org

If you want to use your notifier from the UI, you'll need to add  
some new JSPs in the webapp and modify some other to add your  
notifier.


Emmanuel





writing a notifier

2007-10-04 Thread Michael Masters
I've looked at JabberContinuumNotifier and I have some questions on  
how I create my own notifier.


1. Once I write my notifier by extending AbstractContinuumNotifier,  
how do I install it. In other words, where do I put it the class  
file? Can I jar up all my classes and place them somewhere?


2. Can someone explain how I am suppose to configure my notifier in  
apps/continuum/conf/application.xml?


* It looks like the requirement tag is suppose to define some  
classes that my notifier is dependent on. Is this true?


* What's allowed in the configuration tag? For example, I need  
things like login ID, password, and URL to configure the notifier. I  
assume I add tags for this in  configuration. Is this true? If so,  
then how do I get to this information from my notifier?



Thanks in advance,
Michael Masters



M2 [surefire-report-plugin] output frames

2006-05-24 Thread Michael Masters

Is there  a way to have surefire output reports using frames? I was hoping
for framed output like the junit ant task.


thanks,
Mike


[M2 : site] Newbie question on how to generate site with test errors

2006-02-22 Thread Michael Masters
How can I get the site to generate when there are unit test failures? When
there are failures it doesn't generate the site and stops after running the
test.

thanks,
Mike


[m2] webapp archetype resources directory seems out of place

2006-02-04 Thread Michael Masters
when I create a project with:
mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp
-DarchetypeArtifactId=maven-archetype-webapp

the directory structure is:

my-webapp/
|-- pom.xml
`-- src
`-- main
|-- resources
`-- webapp
|-- WEB-INF
|   `-- web.xml
`-- index.jsp

It seems to me that resources is on the outside of webapp b/c the webapp
directory is the exploded format for the war. This makes sense, but I'm
wondering if the resources directory can also be accessed if I create a
my-webapp/src/main/java directory. This seems to be out of place from the
standard location, which would be my-webapp/src/main/java/resources.


The main reason I ask this is because I would like to have one resources
directory that both test and webapp could use. I'm using spring and I would
like to have only one set of xml config files for the test and webapp, but I
don't really want to break the standard. Also, if I have to break the
standard, then what would be the best way of doing it?


thanks in advance,
Mike


Directory stucture and archetypes

2006-02-02 Thread Michael Masters
Hello everyone,

I was wondering if someone could something up for me. Is there a way to run
two archetypes for the same project? For example, could you run the
maven-archetype-quickstart and maven-archetype-webapp for the same
directory? I've tried to do this but it forces me to use a different
artifactId...which creates to directory structures. I was wondering if I
could have a merge of the two directories.

Also, would this break the standard for the directory structures?

thanks in advance,
Mike


reports

2006-01-27 Thread Michael Masters
I was wondering if its possible to have maven create reports that are
generated by the ant junit task and have maven create a link to those
reports on the generate maven site? I've allways liked the ant junit reports
in the frames, but I also like the maven site that it generates. So I'm
wondering what might be the best way of getting the best of both worlds. I'd
be interested in helping develop this type of feature if it's not available
or help if it's upcoming.


thanks,
Mike