trying to create a maven plugin for running FolderRunner

2011-11-19 Thread Marco Mistroni
hi all
  i have successfully ran the FolderRunner from my maven project with this
configuration

plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
version1.1.1/version
dependencies
/dependencies
executions
execution
phaseintegration-test/phase
goals
goaljava/goal
/goals
/execution
/executions
configuration
classpathScopetest/classpathScope
mainClassfitlibrary.runner.FolderRunner/mainClass
arguments
argumentsrc/main/resources/fit/argument
argumenttarget/fit/argument
/arguments
/configuration
/plugin

Now, i have tried to create my own Maven plugin:

public class EchoMojo extends AbstractMojo
{
/**
 * Any Object to print out.
 * @parameter expression=${message} default-value=Hello World...
 */
private Object message;

/**
 * Any Object to print out.
 * @parameter expression=${fitDirectory}
default-value=FitDirectory...
 */
private String fitDirectory;
/**
 * Any Object to print out.
 * @parameter expression=${reportDirectory}
default-value=OutputDirectory..
 */
private String reportDirectory;


public void execute()
throws MojoExecutionException, MojoFailureException
{

try {
getLog().info( FitDirectory: + fitDirectory );
getLog().info( OutputDirectory: + reportDirectory);

FolderRunner folderRunner = new FolderRunner();
Report report = folderRunner.run(fitDirectory, reportDirectory);

getLog().info(report.getCounts());


} catch(Exception e) {
getLog().error(Exception in running plugin, e);
}

}
}

and trying to run it this way:
plugin
groupIdcom.worldcorpservices.plugins/groupId
artifactIdmaven-fit-plugin/artifactId
version1.0-SNAPSHOT/version
executions
execution
phaseintegration-test/phase
goals
goalrun-fit/goal
/goals
/execution
/executions
configuration
messageThis is message from configuring pluginmy
simple msg/message
fitDirectorysrc/main/resources/fit/fitDirectory
reportDirectorytarget/fit/reportDirectory
/configuration
/plugin

The FolderRunner runs , however i am getting this exceptions:

Missing class or Missing method. Possibly:

   - public Type getComDotOmDotExampleDotDvrDotFixturesDotCreatePrograms()
   { }
   - public Type comDotOmDotExampleDotDvrDotFixturesDotCreatePrograms() { }

so it appears it cannot find the classes in the current project... i am
guessing it has to do with forking  and was wondering if anyone here has
find similar problems...

w/kindest regards
 marco


running fitnesse /fitlibrary from maven

2011-10-30 Thread Marco Mistroni
hi all
 i was wondering if anyone could help me out with fitnesse /fitlibrary.
I know i should post it to the FitLibrary mailinglist on sourceforge (i
did, no replies) but i was hoping that someone on this mailing list has
already done something like this before.
I have downloaded the latest fitnesse.jar (version 20111026) and i am
running it like this in my maven project

plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
version1.1.1/version
dependencies
/dependencies
executions
execution
phaseintegration-test/phase
goals
goaljava/goal
/goals
/execution
/executions
configuration
classpathScopetest/classpathScope
mainClassfitlibrary.runner.FolderRunner/mainClass
arguments
argumentsrc/main/resources/fit/argument
argumenttarget/fit/argument
/arguments
/configuration
/plugin

I have created spreadsheet tests in the folder src/main/resources/fit

the plugin ran fine, but in the fit report output i keep on getting this
error

com.om.example.dvr.fixtures.CreatePrograms *SetUpDataWithName*
--
Missing class or Missing method. Possibly:

   - public Type setUpDataWithName(Type1 arg1) { }

Test*testDataWithName*
--
Missing class or Missing method. Possibly:

   - public Type testDataWithName(Type1 arg1) { }



I am suspecting fit/fitnesse cannot see my fixture class (which extends
DoFixture and it is located in src/main/java)

could anyone assist and help me out pls?

w/kindest regards
 marco


Re: Maven consultant

2008-12-06 Thread Marco Mistroni
Hi,
 could you post your problem here:
- structure of your app
- pom.xml

and i m sure on the list  there r lot of maven pro that can sort out your
problems

rgds
 marco

On Fri, Dec 5, 2008 at 5:28 PM, [EMAIL PROTECTED] wrote:

 We are having a problem getting our applications to build. we have
 exhausted our in house resources and are considering bringing in a Maven
 Consultant. can somebody point me to a resource for finding Maven
 Consultants?



 Brett Albertson
 Team Manager, Zoot Engineering
 406-556-8819 /  [EMAIL PROTECTED]

 This email, including any attachments, is confidential and may not be
 redistributed without permission. If you are not an intended recipient,
 you have received this message in error. Please notify us immediately by
 replying to this message, and then deleting it from your computer. Thank
 you.



Re: 5min maven tutorial problem

2008-06-14 Thread Marco Mistroni
Hi,
 are you behind a firewall?
if so, u need to configure proxy in settings.xml

hth
 marco

On Sat, Jun 14, 2008 at 3:17 AM, Brett Porter [EMAIL PROTECTED]
wrote:

 You can see an answer on this page:
 http://docs.codehaus.org/display/MAVENUSER/FAQs-1

 2008/6/14 Michiko Luther [EMAIL PROTECTED]:
  Hi,
 
  I am going through Maven tutorial right now.  I installed Maven in
  D:\Development\Java\lib
  When I create a new project, do I have to go to this directory?
 
  Anyway, I am in dir D:\Development\Java\lib\appache-maven-2.0.9, and
 typed
  in this command
   mvn archetype:create \
   -DarchetypeGroupId=org.apache.maven.archetypes \
   -DgroupId=com.mycompany.app \
   -DartifactId=my-app
 
  Then I see an error message saying that
  
  [ERROR] BUILD ERROR
  [INFO]
  
  [INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does
 not
  exi
  st or no valid version could be found
  
  What is wrong with it?  How can I fix this problem?
 
  Thanks
 
 Michiko-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Brett Porter
 Blog: http://blogs.exist.com/bporter/

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Maven @ Silicon Valley Web Developer Java User Group

2008-06-10 Thread Marco Mistroni
Hi,
 would love to do that too as i m interested but im in UK..
please keep me posted on this issue
rgds
 marco


On Tue, Jun 10, 2008 at 3:49 PM, Sean Hennessy [EMAIL PROTECTED]
wrote:

 Wish I could..however I'm willing to chip in ten dollars to help cover the
 cost of putting it on video that we might have access after the fact.

 -Original Message-
 From: Jason van Zyl [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 09, 2008 4:53 PM
 To: Maven Users List
 Subject: Maven @ Silicon Valley Web Developer Java User Group


 Hi,

 For any Maven users who are interested in Eclipse IDE integration and Maven
 repository managers I will be speaking at the Silicon Valley Web Developer
 Java User Group on June 17th at Google in Mountain View. I will be speaking
 extensively on Nexus and m2eclipse and doing demos of both. The details are
 here:

 http://sv-web-jug-6.eventbrite.com/

 Hope to see you there!

 Thanks,

 Jason

 --
 Jason van Zyl
 Founder,  Apache Maven
 jason at sonatype dot com
 --

 A man enjoys his work when he understands the whole and when he is
 responsible for the quality of the whole

 -- Christopher Alexander, A Pattern Language




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Maven WebSphere 6.1

2008-06-10 Thread Marco Mistroni
Jo,
  my 2 cents here,
it *could* be, but i think except for ws specific jars, you shouuld be able
to fetch ther est
from maven repo.

hth
 marco

On Tue, Jun 10, 2008 at 11:55 AM, Jo Support [EMAIL PROTECTED] wrote:

 Hello folks,

 I'm following the instructions from

 http://www.jroller.com/peter_pilgrim/entry/battling_with_maven_2_integratingin
 order to deploy EJBs for WebSphere 6.1. According to Pilgrim, I should have
 the following jars under was6home/lib :

 - wsanttasks.jar
 - webservices.jar
 - wsprofile.jar
 - ffdc.jar
 - wsdl4j.jar
 - commons-logging-api.jar
 - commons-discovery.jar
 - ras.jar
 - wsexception.jar
 - emf.jar
 - classloader.jar

 But they're missing. I have

 IBM WebSphere 6.1 AS Network Deployment

 - Am I using a wrong version of WAS?
 - Am I following an out-of-date how-to guide?

 Thanks in advance,
 Jo



Re: Creating integration tests for a complex project...

2008-06-07 Thread Marco Mistroni
Kent,
 my 2 cents here... i m doing integ tests in my current app (it's not an
ear, but is a war made of two projects..)
Maven can help you out in 1,2,3.4, ... i believe maven has plugins to deploy
your .ear and startup an app server

integ tests, you mean interaction between different subprojects in your big
project (e.g. EAR1 and EAR2)?

i have seen some maven examples that create a separate project for
integration testsmy assumption is that
EAR1 is in project EAR1 and EAR2 is in project EAR2...

you could create a  test project that includes both EAR1 and EAR2 that
contains your integ tests... and you won't need
to include this project in any of your EAR files
same idea  appplies if you want to write integ tests for every subproject of
EAR1 and EAR2

i got this idea from the book 'Better builds with Maven', have a look
i haven't really implemented this idea in my projects - as they r not that
big.i went as far as writng UA tests which are 'sort of' integration
tests between 2 projects,  and i have placed them in the src/test directory

this is my 2cents...  i'll appreciate any comments on this as in the near
future i'd need to do same things

regards
 marco





On Fri, Jun 6, 2008 at 11:23 PM, Kent Närling [EMAIL PROTECTED]
wrote:

 I already wrote to ask about feedback how to organize a project (thanks for
 the responses so far), now another question:

 Let's assume we have a project like this:

  myproject -
EAR-module1
EAR-module2
plugins
plugin-module1
plugin-module2
doc
tools
 etc

 And let's say the main project generates RPM:s which actually include a
 full
 bundled J2EE server (JBoss)

 Now, what if I would like to have integration tests that do:
   1 - Install RPM:s
   2 - Start J2EE server (and hence the application)
   3 - Configure the application using a reference configuration (part of
 the integration test files)
   4 - Run reference tests (already exists a test tool for this with
 beanshell test scripts)
   5 - After all finished, stop system and un-install RPM:s

 How would we do this?

 Would the integration test simply be JUnit tests under
 myproject/src/test/java etc ?
 In that case I guess there would have to be one test (THEtest) executing
 an external script/tool?

 //Kent



Problem with surefire, spring and AspecJ LTW

2008-06-07 Thread Marco Mistroni
hello all,
 i wrote a small application to test spring + aspectJ LTW... my post in the
spring forums is here

http://forum.springframework.org/showthread.php?t=55168

i posted in the spring forums coz my test (ran using maven surefire plugin)
resulted in the code not being intercepted
by the aspect...

However, when i ran my application from the commandline, the aspect gets
intercepted properly

here's my pom.xml

project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdTestAspectJ/groupId
  artifactIdTestAspectJ/artifactId
  packagingjar/packaging
  version1.0-SNAPSHOT/version
  nameTestAspectJ/name
  urlhttp://maven.apache.org/url
  dependencies
dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version3.8.1/version
  scopetest/scope
/dependency
dependency
groupIdcommons-logging/groupId
artifactIdcommons-logging/artifactId
version1.1.1/version
/dependency

dependency
groupIdorg.springframework/groupId
artifactIdspring/artifactId
version2.5.4/version
/dependency
dependency
groupIdorg.springframework/groupId
artifactIdspring-mock/artifactId
version2.0.6/version
!--
exclusions
   exclusion
groupIdehcache/groupId
  artifactIdehcache/artifactId
/exclusion
/exclusions --
/dependency
dependency
groupIdlog4j/groupId
artifactIdlog4j/artifactId
version1.2.13/version
/dependency
dependency
groupIdorg.aspectj/groupId
artifactIdaspectjrt/artifactId
versionspring/version
scopesystem/scope

systemPath/home/marco/TestAspectJ/aspectj/aspectjrt-spring.jar/systemPath
/dependency
dependency
groupIdorg.aspectj/groupId
artifactIdaspectjweaver/artifactId
versionspring/version
scopesystem/scope

systemPath/home/marco/TestAspectJ/aspectj/aspectjweaver-spring.jar/systemPath
/dependency



  /dependencies
  build
  plugins
  plugin
  groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
configuration
  source1.5/source
  target1.5/target
/configuration
   /plugin
  plugin
artifactIdmaven-surefire-plugin/artifactId
configuration
forkModepertest/forkMode
argLine-javaagent:spring-agent.jar/argLine
!-- system class loader required to pass javaagent to all
tests--
useSystemClassLoadertrue/useSystemClassLoader
/configuration
/plugin
/plugins
   /build
/project


when i ran my app from commandline

java -javaagent:spring-agent.jar  -cp
log4j-1.2.15.jar:aspectjweaver-spring.jar:commons-logging-api-1.0.4.jar:commons-logging-1.11.jar:target/TestAspectJ-1.0-SNAPSHOT.jar:spring-2.5.4.jar:.
TestAspectJ.App

the bean method gets intercepted successfully so this make me think that
mayb my surefire configuration is not right?
here's code i have in my Main class

ClassPathXmlApplicationContext context =
new
ClassPathXmlApplicationContext(classpath*:beanContext.xml);
SimpleBean bean =  (SimpleBean)context.getBean(simpleBean);
String result = bean.method1(foo);
System.err.println(call mehtod1 resulted in: + result);

i have tried to put exactly the same code in my test, to validate the
behaviour...

when i ran application i got following

07-Jun-2008 18:27:52
org.springframework.context.support.AbstractApplicationContext
prepareRefresh
INFO: Refreshing
[EMAIL PROTECTED]:
display name
[EMAIL PROTECTED];
startup date [Sat Jun 07 18:27:52 BST 2008]; root of context hierarchy
07-Jun-2008 18:27:52
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
INFO: Loading XML bean definitions from URL
[jar:file:/home/marco/TestAspectJ/target/TestAspectJ-1.0-SNAPSHOT.jar!/beanContext.xml]
07-Jun-2008 18:27:53
org.springframework.context.support.AbstractApplicationContext
obtainFreshBeanFactory
INFO: Bean factory for application context
[EMAIL PROTECTED]:
[EMAIL PROTECTED]
07-Jun-2008 18:27:53
org.springframework.context.weaving.DefaultContextLoadTimeWeaver
setBeanClassLoader
INFO: Found Spring's JVM agent for instrumentation
07-Jun-2008 18:27:53
org.springframework.aop.aspectj.AspectJWeaverMessageHandler handleMessage
INFO: [AspectJ] AspectJ Weaver Version 1.5.4 built on Thursday Dec 20, 2007
at 13:44:10 GMT
07-Jun-2008 18:27:53
org.springframework.aop.aspectj.AspectJWeaverMessageHandler handleMessage
INFO: [AspectJ] register classloader
[EMAIL PROTECTED]
07-Jun-2008 18:27:53

Mvn2/Selenium/CArgo/JUnit problem

2008-04-26 Thread Marco Mistroni
hi all,
 i am running my UAT tests in mvn2 using Cargo and selenium .
Due to problems using cargo plugin (when it started it was not able to find
some jars for my webapp), i have written a base test
which starts cargo and selenium.
Problem i have now is that cargo starts/stops at every setUP and tearDown.
Even though tests are ran automatically, i am  trying to use a mechanism
so tha cargo is started only once and it is stopped only once during hwole
lifecycle of my tests.

Wiuth JUnit3, i am unable to find  a method that gets called only once (sort
of SetUpFixture) for the whole junit session...

anyone could give help hee?

here' smy AbstractSeleniumTest  for reference

public abstract class AbstractSeleniumTest extends SeleneseTestCase {
protected DefaultSelenium selenium;
private  Logger log = Logger.getLogger(this.getClass());
private InstalledLocalContainer container;

public void setUp() throws Exception {
System.err.println(--SettingUp Fixture);
startCargo();
selenium = createSeleniumClient(http://localhost:8080/;);
selenium.start();
}



public void tearDown() throws Exception {
stopCargo();
selenium.stop();

}

protected DefaultSelenium createSeleniumClient(String url) throws
Exception {
return new DefaultSelenium(localhost, , *firefox, url);
}

private void startCargo() throws Exception {
// (1) Optional step to install the container from a URL pointing to
its distribution
System.err.println(--- Starting cargo.. ..);
Installer installer = new ZipURLInstaller(
new URL(
http://www.apache.org/dist/tomcat/tomcat-5/v5.5.25/bin/apache-tomcat-5.5.25.zip
));
installer.install();

// (2) Create the Cargo Container instance wrapping our physical
container
LocalConfiguration configuration =
(LocalConfiguration) new
DefaultConfigurationFactory().createConfiguration(
tomcat5x, ContainerType.INSTALLED,
ConfigurationType.STANDALONE);
container =
(InstalledLocalContainer) new
DefaultContainerFactory().createContainer(
tomcat5x, ContainerType.INSTALLED, configuration);
container.setHome(installer.getHome());

// (3) Statically deploy some WAR (optional)
configuration.addDeployable(new WAR(target/BudgetWeb.war));

// (4) Start the container
container.start();
}

private void stopCargo() throws Exception {
container.stop();
}

thanks and regards
  Marco


Re: Mvn2/Selenium/CArgo/JUnit problem

2008-04-26 Thread Marco Mistroni
Kalle,
 i have started up cargo in my own test coz when i deployed my .war using
jetty,
it was always complaining on missing jar files (all related to my war
application)

i did a research and found that there was a bug in jetty 'embedded
container' as it
was not able to load certain classes from classpath
this happened when i started to use selenium tests about 5 months ago

i'll appreciate if you can share ur pom.xml, as my original idea was to use
jetty too

thanks and regards
 marco

On Sat, Apr 26, 2008 at 8:43 PM, Kalle Korhonen [EMAIL PROTECTED]
wrote:

 An interesting approach. In my container-based integration testing, I've
 either configured all in the pom and used the maven cargo plugin to start
 up
 the container in pre-integration-test phase, then stop it in
 post-integration-test, or when I've wanted to do everything in-process and
 in-code, I've created a JUnit base test class and held a Jetty instance in
 a
 static property (so it survives through repeated setUp/tearDowns). I don't
 see what using Cargo buys you if you are setting up everything in code.

 Kalle


 On Sat, Apr 26, 2008 at 10:22 AM, Marco Mistroni [EMAIL PROTECTED]
 wrote:

  hi all,
   i am running my UAT tests in mvn2 using Cargo and selenium .
  Due to problems using cargo plugin (when it started it was not able to
  find
  some jars for my webapp), i have written a base test
  which starts cargo and selenium.
  Problem i have now is that cargo starts/stops at every setUP and
 tearDown.
  Even though tests are ran automatically, i am  trying to use a mechanism
  so tha cargo is started only once and it is stopped only once during
 hwole
  lifecycle of my tests.
 
  Wiuth JUnit3, i am unable to find  a method that gets called only once
  (sort
  of SetUpFixture) for the whole junit session...
 
  anyone could give help hee?
 
  here' smy AbstractSeleniumTest  for reference
 
  public abstract class AbstractSeleniumTest extends SeleneseTestCase {
 protected DefaultSelenium selenium;
 private  Logger log = Logger.getLogger(this.getClass());
 private InstalledLocalContainer container;
 
 public void setUp() throws Exception {
 System.err.println(--SettingUp Fixture);
 startCargo();
 selenium = createSeleniumClient(http://localhost:8080/;);
 selenium.start();
 }
 
 
 
 public void tearDown() throws Exception {
 stopCargo();
 selenium.stop();
 
 }
 
 protected DefaultSelenium createSeleniumClient(String url) throws
  Exception {
 return new DefaultSelenium(localhost, , *firefox, url);
 }
 
 private void startCargo() throws Exception {
 // (1) Optional step to install the container from a URL pointing
  to
  its distribution
 System.err.println(--- Starting cargo.. ..);
 Installer installer = new ZipURLInstaller(
 new URL(
 
 
 http://www.apache.org/dist/tomcat/tomcat-5/v5.5.25/bin/apache-tomcat-5.5.25.zip
  ));
 installer.install();
 
 // (2) Create the Cargo Container instance wrapping our physical
  container
 LocalConfiguration configuration =
 (LocalConfiguration) new
  DefaultConfigurationFactory().createConfiguration(
 tomcat5x, ContainerType.INSTALLED,
  ConfigurationType.STANDALONE);
 container =
 (InstalledLocalContainer) new
  DefaultContainerFactory().createContainer(
 tomcat5x, ContainerType.INSTALLED, configuration);
 container.setHome(installer.getHome());
 
 // (3) Statically deploy some WAR (optional)
 configuration.addDeployable(new WAR(target/BudgetWeb.war));
 
 // (4) Start the container
 container.start();
 }
 
 private void stopCargo() throws Exception {
 container.stop();
 }
 
  thanks and regards
Marco
 



Re: Selenium - Maven - Smoketest

2008-04-13 Thread Marco Mistroni
Hi,
 not sure if it helps. i m currently using Maven + Selenium
i m not clear (sorry for my ignorance) on what 'smoke tests' mean, but
i am running my selenium tests in the
phaseintegration-tests/phase
hth
marco

On Sun, Apr 13, 2008 at 1:10 AM, dbug [EMAIL PROTECTED] wrote:


 Hi,
 In the life cycle of Maven, where can I perform the automated smoke test
 (i
 believe it is after strongdeploy step/strong, can somebody confirm or
 guide)?

 Thanks,
 Dhyanesh Bagadia
 --
 View this message in context:
 http://www.nabble.com/Selenium---Maven---Smoketest-tp16656681s177p16656681.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to use Maven for System Testing?

2008-03-27 Thread Marco Mistroni
hi,
If u mean acceptance testing,
google Maven + Selenium u'll find a plugin to be integrated for doing
user-acceptance testing


hth
 marco

On Thu, Mar 27, 2008 at 11:24 AM, Wayne Fay [EMAIL PROTECTED] wrote:

 When you say System Testing, I assume you are actually talking about
 Functional Testing? In my experience, this usually means end to end
 integration testing, so if you're already doing that, I don't know
 what else you're looking to do.

 Realistically, I would suggest that you talk to the testing experts
 in the Agile-Testing or perhaps TDD Yahoogroups and figure out what
 exactly you feel is missing from your current testing approach. Then
 you can worry about how Maven can possibly help you achieve results.

 I just don't think sending this email to the Maven Users list is going
 to produce the kind of feedback you are hoping to get. I generally
 suspect that the ratio of people on this list using unit testing is
 around 50%, then integration testing is around 5-10%, and additional
 testing is in the 1-2% range.

 Wayne

 On 3/27/08, Paul Benedict [EMAIL PROTECTED] wrote:
  My company uses JUnit to perform unit and integration testing. Those two
  things are very valuable to our testing process, but I'd like to see how
 we
  can also incorporate the so-called system testing too. But what would
  those look like? Aren't they just end-to-end integration tests? Just
 curious
  to see what other people have done. What would be the difference in
  technology or testing methodology?
 
  Paul
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




wsgen issue

2008-03-16 Thread Marco Mistroni
hello all,
 i m currently doing a servicemix project inw hich i had to generate
skeletons for couple of webservices i am using
url of the tutorial is here

http://servicemix.apache.org/orchestration-with-jsr181.html

i have following pom (only relevant part)

plugin
groupIdorg.apache.servicemix.tooling/groupId
artifactIdxfire-maven-plugin/artifactId
version${servicemix-version}/version
executions
  execution
phasegenerate-sources/phase
goals
  goalwsgen/goal
/goals
configuration
  generateServerStubsfalse/generateServerStubs
  wsdls
 wsdlsrc/main/resources/service.wsdl/wsdl
 wsdlsrc/main/resources/uszip.wsdl/wsdl
wsdlsrc/main/resources/LocalTime.wsdl/wsdl
  /wsdls

  outputDirectorytarget/generated-sources/outputDirectory
  profileorg.codehaus.xfire.jaxws.gen.JAXWSProfile/profile
/configuration
  /execution
/executions
  /plugin


and i want to avoid the generation of skeleton stubs.that's why i have
set the property
generateServerStubsfalse/generateServerStubs

but it seems not to work.

anyone could help me out?
thanks and regarfds
 marco


Maven / Repository / SVN

2008-03-10 Thread Marco Mistroni
hi all,
 was wondering if someone has any ideas or had to deal with similar cases.

my colleague and i are trying to promote maven at our working place
using an internal repository

the problem is that people here want to store artifact / external libraries
in svn rather than in an internal repository

only thing i could think was to store the maven repository in svn and check
it out every time, pointing maven to
look at the localRepository in my custom directory

i was not able to find any maven proxy (either Proximity or Artifactory)
that are linked to svn..

anyone has any suggestions/comments?

thanks in advance and regards
 marco


Re: war directory exploded / how to do thi sin maven

2008-02-26 Thread Marco Mistroni
Stephen,
  thanks a lot! it was exactly what i was after
any chances u can share your pom.xml?

thanks in advance and regards
  marco

On Tue, Feb 26, 2008 at 8:26 AM, Stephen Connolly 
[EMAIL PROTECTED] wrote:

 We have developed a lot of web apps with Maven and IDEA.

 The war plugin builds an exploded war file in target/${
 project.build.finalName}

 There is a configuration option for the war plugin that controls whether
 it
 packages up the classes in the war module as a jar file and puts that in
 WEB-INF/lib or leaves them as classes in WEB-INF/classes

 As to the other dependencies, if they don't end up in WEB-INF/lib, how
 will
 you know that your webapp works?

 -Stephen

 On Mon, Feb 25, 2008 at 10:12 PM, Marco Mistroni [EMAIL PROTECTED]
 wrote:

  hello all
   @work, we are developing a web application using IntelliJ IDEA.
  we are not using maven, so structure of directory is as follows
 
  jsp  (contains jsps and WEB-INF)
  src
|__ java
|__ test
 
  plus, we are launching tomcat from intelliJ, making tomcat point to the
  exploded directory   jsp (in fact, the target-classes directory is
  jsp\web-inf\classes)
 
  we are using ant to build the app, which put all the classes in
  jsp\web-inf\classes. we have tomcat pointing to that directory so that
  every
  change in the jsp
  is immediately reflected on the browser.
 
  i wanted to move to maven, but i feel the directory structure imposed by
  maven will prevent me from doing what i am doing now.
  as example
 
  maven build a  WAR in the target\yourartifact   directory... .. so
  unless i 'hack' maven by
  specifying as  target-classes directory   the jsp\web-inf\classes, i'll
  have
  problems...
  also because in building war maven automatically add all the
 dependencies
  to
  web-inf\lib directory.
 
  i feel i cannot do that with maven unless i do some  hacks
 
 
  has anyone ever end up in a similar situation?
 
 
  regards
marco
 



Re: war directory exploded / how to do thi sin maven

2008-02-26 Thread Marco Mistroni
Stephen,
 thanks a lot! i owe u a beer... let me know when u r around LOndon :)
really, it saved me lot of time!

thanks again and regards
  marco

On Tue, Feb 26, 2008 at 8:33 PM, Stephen Connolly 
[EMAIL PROTECTED] wrote:

 project
 ...
 packagingwar/packaging
 build
  plugins
artifactIdmaven-war-plugin/artifactId
configuration
  *archiveClassesfalse/archiveClasses***
/configuration
  /plugins
 /build
 /project

 On Tue, Feb 26, 2008 at 8:13 PM, Marco Mistroni [EMAIL PROTECTED]
 wrote:

  Stephen,
   thanks a lot! it was exactly what i was after
  any chances u can share your pom.xml?
 
  thanks in advance and regards
marco
 
  On Tue, Feb 26, 2008 at 8:26 AM, Stephen Connolly 
  [EMAIL PROTECTED] wrote:
 
   We have developed a lot of web apps with Maven and IDEA.
  
   The war plugin builds an exploded war file in target/${
   project.build.finalName}
  
   There is a configuration option for the war plugin that controls
 whether
   it
   packages up the classes in the war module as a jar file and puts that
 in
   WEB-INF/lib or leaves them as classes in WEB-INF/classes
  
   As to the other dependencies, if they don't end up in WEB-INF/lib, how
   will
   you know that your webapp works?
  
   -Stephen
  
   On Mon, Feb 25, 2008 at 10:12 PM, Marco Mistroni [EMAIL PROTECTED]
   wrote:
  
hello all
 @work, we are developing a web application using IntelliJ IDEA.
we are not using maven, so structure of directory is as follows
   
jsp  (contains jsps and WEB-INF)
src
  |__ java
  |__ test
   
plus, we are launching tomcat from intelliJ, making tomcat point to
  the
exploded directory   jsp (in fact, the target-classes directory is
jsp\web-inf\classes)
   
we are using ant to build the app, which put all the classes in
jsp\web-inf\classes. we have tomcat pointing to that directory so
 that
every
change in the jsp
is immediately reflected on the browser.
   
i wanted to move to maven, but i feel the directory structure
 imposed
  by
maven will prevent me from doing what i am doing now.
as example
   
maven build a  WAR in the target\yourartifact   directory...
 ..
  so
unless i 'hack' maven by
specifying as  target-classes directory   the jsp\web-inf\classes,
  i'll
have
problems...
also because in building war maven automatically add all the
   dependencies
to
web-inf\lib directory.
   
i feel i cannot do that with maven unless i do some  hacks
   
   
has anyone ever end up in a similar situation?
   
   
regards
  marco
   
  
 



war directory exploded / how to do thi sin maven

2008-02-25 Thread Marco Mistroni
hello all
  @work, we are developing a web application using IntelliJ IDEA.
we are not using maven, so structure of directory is as follows

jsp  (contains jsps and WEB-INF)
src
   |__ java
   |__ test

plus, we are launching tomcat from intelliJ, making tomcat point to the
exploded directory   jsp (in fact, the target-classes directory is
jsp\web-inf\classes)

we are using ant to build the app, which put all the classes in
jsp\web-inf\classes. we have tomcat pointing to that directory so that every
change in the jsp
is immediately reflected on the browser.

i wanted to move to maven, but i feel the directory structure imposed by
maven will prevent me from doing what i am doing now.
as example

maven build a  WAR in the target\yourartifact   directory... .. so
unless i 'hack' maven by
specifying as  target-classes directory   the jsp\web-inf\classes, i'll have
problems...
also because in building war maven automatically add all the dependencies to
web-inf\lib directory.

i feel i cannot do that with maven unless i do some  hacks


has anyone ever end up in a similar situation?


regards
  marco


Re: Maven2 Unit testing

2008-02-17 Thread Marco Mistroni
Hello,
  i guess you are meaning then 'integration test', as unit tests should not
access
the database
for that... well 2 solutions...

@work, we are using jndi via tomcat, but for unit tests we define our own
dataSource that uses Spring's DriverManagerDatasource (or something like
that) that connects
to a dev db

@home, i m doing similar, but for tests instead of connecting to a dev db, i
create my own in memory
database via hsql (tables get created via hibernate.ddl.auto=create)

hth
 marco

On Feb 17, 2008 5:08 PM, Wendy Smoak [EMAIL PROTECTED] wrote:

 On Feb 17, 2008 9:00 AM, Filipe David Manana [EMAIL PROTECTED] wrote:

  I am using Maven 2 as the build tool for my project.
  My application uses a DataSource provided by Tomcat. Is it possible to
 write
  unit tests that use this datasource?
  By the way, Tomcat runs on a remote machine, available in a computing
 center
  and without X11.
 
  I accept suggestions.

 What are you really trying to test?  If you're interested in unit
 testing the code you're writing, then you might want to mock the data
 source and not worry about connecting to the real one.  I always go
 back to JUnit in Action for this kind of thing. :)

 Or are you more interested in running in-container tests that use a
 real database?

 --
 Wendy

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




maven and surefire

2007-12-31 Thread Marco Mistroni
hi all,
  i am experiencing problems with maven2 and surefire
i have an existing app that uses ant, and in running junit tests all pass

when i run same tests via maven2, i got some of them failing
by looking closely at them, i suspect surefire does not run in the same way
asjunit fork=true ) runs...
as, for example, i am doing some tests on  a Locale in my Junit test, and
then some other tests fails because
in my test i don't reset the locale at the end of my junit (i know, that's
my poor coding)..

i was curious to know how to configure surefire plugin so that it runs like
fork=true for junit task

thanks and regards
 marco


Re: maven and surefire

2007-12-31 Thread Marco Mistroni
hi,
 thanx for replying... on new years eve :)
yes i'll try and post here (code is @work, so won't be back until thursday

thanx again and regards
 marco

On Dec 31, 2007 3:20 PM, Nick Stolwijk [EMAIL PROTECTED] wrote:

 Have you tried running Surefire in fork mode? [1]

 Hth,

 Nick Stolwijk

 [1]

 http://maven.apache.org/plugins/maven-surefire-plugin/examples/forking.html

 Marco Mistroni wrote:
  hi all,
i hiam experiencing problems with maven2 and surefire
  i have an existing app that uses ant, and in running junit tests all
 pass
 
  when i run same tests via maven2, i got some of them failing
  by looking closely at them, i suspect surefire does not run in the same
 way
  asjunit fork=true ) runs...
  as, for example, i am doing some tests on  a Locale in my Junit test,
 and
  then some other tests fails because
  in my test i don't reset the locale at the end of my junit (i know,
 that's
  my poor coding)..
 
  i was curious to know how to configure surefire plugin so that it runs
 like
  fork=true for junit task
 
  thanks and regards
   marco
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




dependencies / is there a smart way to declare it?

2007-12-05 Thread Marco Mistroni
hi all,
  just a quick question to see best practices with maven projects.
i have a pom which contains lot of dependencies... so my pom end up being
huge..
i was wondering if there is a  smart way to declare them so that i don' t
end up with a  300 lines pom..

again, it's not a real problem, i was wondering how peoples on the list were
dealing with it..

regards
 marco


Re: Maven2 and unit tests with hibernate and jpa connection problems

2007-12-01 Thread Marco Mistroni
Hi,
 have u ever tried to use HSQL , in memory db?

regards
 marco

On Dec 1, 2007 1:30 AM, Ryan Moquin [EMAIL PROTECTED] wrote:

 I'm having some trouble with my Maven2 build (using hibernate, jpa and
 spring) recently where all of a sudden I'm starting to get this error
 sporadically:

 ...
 Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP
 connection to the host  has failed. java.net.BindE
 xception: Address already in use: connect

 ...

 This happens when running my unit tests against SQL Server.  Up until a
 few
 days ago, I wasn't getting this error and I thought my configuration for
 hibernate was perfectly fine.  I've added a lot more code and database
 tests
 recently so I'm assuming that my configuration is somehow not fine and I'm
 not running out of connections. I've tried using connection pooling for my
 unit tests, but then my test database will stay in use between subproject
 builds causing other problems.  I have a heck of a time finding a way to
 get
 my Maven2 build to run all the way through due to problems with
 connections
 not being closed.

 So basically, my question is this:

 Is anyone using any fairly intensive unit tests against a database from a
 multiproject maven2 build using hibernate, spring and jpa?   If so, do you
 run into resource problems with connections?  If not, are you using any
 specific configuration to make sure connections are disposed of properly
 after the unit tests are run?  Am I making a mistake by running my unit
 tests again SQL Server and instead I should run against something like
 HSQL
 (in other words, is impossible to not run out of connections when running
 a
 lot of database unit tests)?

 I don't want to be vague, but I could probably triple this email with
 configuration settings which is not my goal.  I'm not even sure what
 really
 is the problem (maven, hibernate, spring, or my configuration), I'm just
 hoping maybe I can get some general advice about unit testing, maven2 and
 hibernate from someone doing something similar.

 Thanks!



Re: Maven install

2007-12-01 Thread Marco Mistroni
Hi ,
 let's start from what you want to achieve:
1. Filter only A.properties

First off, how many files need filtering?
If you need only A.properties (in whole application), the
A.propertiesshould be the only one which contains ${
your.property) tags.
If you have also B.properties that contains ${} and you don't want to filter
it, then when it will be copied in the \target\classes directory that file
will end up with still ${} tags.

2. Do not filter any files under store
you can still specify that under the resources xml tag. you will
have(Pseudocode) resourcedirfilteringtrue/filtering/dirresource
as well as resource dir2 filteringfalse/filtering
3. Copy store to classes
if store is under src/main/resources, it will be copied automatically to
\classes
4. Do not copy store to war
well, store will end up in the \classes directory of your war file... i see
nothing wrong with that. if your \classes is part of building war...
5. Copy filtered properties to both war and classes
?
why you are mentioning \war  and \classes

is your project building a  \war? if so, then when the war will be
assembled, \classes directory will be part of it..

could you elaborate more if your project is a .war or .jar or so mething
else?
i have plenty of projects i m doing that are building wars, using resources
and filtering...
please provide answer to this question and i could help more

1 - is your project  a .war project
2 - if you have resources taht need filtering and some others that don't,
why don't you use ${} in resources taht must be filtered and leave plain
text in resources that don't need to be filtered ?
3 - what do you mean by .war and .classes? are we talking about same
project?


regards
 marco

On Nov 30, 2007 11:11 PM, LinaTomy [EMAIL PROTECTED] wrote:


 Its in my settings.xml. The ones there are the defaults.

 I have a profile in profiles.xml which is not active by default. I only
 use
 that with the -P switch when i do an install for generating a war fro my
 deployment.


 mmistroni wrote:
 
  Hi,
 where are your properties(i mean the 'replacement' properties)
  'stored'?
  in your profile?
 
  On Nov 30, 2007 7:48 PM, LinaTomy [EMAIL PROTECTED] wrote:
 
 
  Hi
  I have the following structure
 
  src
   |
   ---main
 |
  resources
 |
 ---
 A.properties
 store
 |
  
1.pdf
2.pdf
data
  |
  ---
 1.xml
 2.xml
 
  When i do a maven install I need the following to happen
 
  1. Filter only A.properties
  2. Do not filter any files under store
  3. Copy store to classes
  4. Do not copy store to war
  5. Copy filtered properties to both war and classes
 
  Also when I do a mvn install the properties files which is copied to
 war
  is
  not able to get the value for ${project.build.outputDirectory}.
 
  Could someone please help me with this.
 
  Below is my pom's snippet
 
  build
 
  plugins
 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-war-plugin/artifactId
 version2.0.2/version
 configuration
 webResources
 resource
 
  directorysrc/main/resources/directory
 targetPathWEB-INF/classes/targetPath
 !-- Filter the properties file to
 replace
  varibles with appropriate
  values --
 filteringtrue/filtering
 includes
 include*.properties/include
 /includes
 /resource
 /webResources
 /configuration
 /plugin
  /plugins
 
  !-- turn filtering on for the project's resources directory --
  resources
 resource
 directorysrc/main/resources/directory
 !-- Filter the properties file to replace varibles with
  appropriate
  values --
 filteringtrue/filtering
 includes
   include*.properties/include
 /includes
 excludes
   exclude*.pdf/exclude
   exclude*.xml/exclude
  /excludes
 /resource
  /resources
 
  /build
  --
  View this message in context:
  http://www.nabble.com/Maven-install-tf4923928s177.html#a14091357
  Sent from the Maven - Users mailing list 

Re: Maven2 and unit tests with hibernate and jpa connection problems

2007-12-01 Thread Marco Mistroni
Hi,
 if u use hibernate.hbm.ddl=true to generate your tables, hibernate will
take care
of building tables for proper database you'll specify
if you then use dbunit to populate tables, dbunit will take care too of
handling
database issues...

hth
 marco

On Dec 1, 2007 3:53 PM, Ryan Moquin [EMAIL PROTECTED] wrote:

 I think my main concern with this (hence why I'm asking general advice) is
 that sometimes a unit test might work against HSQL and fail against
 another
 database such as MSSQL?  Or am I worrying about something I shouldn't?

 I did make some progress finally though, I kept connection pooling on in
 my
 unit tests since I don't think it's possible for me to run my build
 without
 it, and then I stopped using the maven-sql-plugin and went back to the
 hibernate ddl create-drop method of recreating my schema (which I ran into
 problems with, which caused me to go to maven-sql-plugin previously).
  That
 alleviates the database in use when the plugin tries to drop and recreate
 it.

 Of course, this doesn't answer whether or not I should be using an inmem
 database like HSQL ... I think depending on people's experiences on the
 pros
 and cons will be what will cause me to switch.  I'm just worried that I
 might lose some accuracy in my unit tests going to that approach?

 On Dec 1, 2007 9:39 AM, Paul MERLIN [EMAIL PROTECTED] wrote:

  Le Saturday 01 December 2007 14:14:37 Marco Mistroni, vous avez écrit:
   Hi,
have u ever tried to use HSQL , in memory db?
 
  Maybe this will help you get started with unit testing entities in
 memory
  with
  maven :
 
 
 http://eskatos.wordpress.com/2007/10/15/unit-test-jpa-entities-with-in-memory-database/
 
  Paul
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



cargo plugin problems

2007-12-01 Thread Marco Mistroni
hi all,
 i am trying to run selenium tests using maven2/ cargo / jetty / selenium
plugin
i am following instructions here (
http://wiki.foochal.org/index.php/Maven_Selenium)

however, when cargo starts, i am getting this exceptions

2007-12-01 16:52:53.582::WARN:  Failed startup of context
[EMAIL PROTECTED]/BudgetWeb-1.0-SNAPSHOT
,jar:file:/home/marco/BudgetAppV2/BudgetWeb/target/BudgetWeb-
1.0-SNAPSHOT.war!/}
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@8c02cc for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@8c02cc for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(
LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.springframework.web.context.ContextLoader.init(
ContextLoader.java:139)
at
org.springframework.web.context.ContextLoaderListener.createContextLoader(
ContextLoaderListener.java:57)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(
ContextLoaderListener.java:48)
at org.mortbay.jetty.handler.ContextHandler.startContext(
ContextHandler.java:511)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
at org.mortbay.jetty.webapp.WebAppContext.startContext(
WebAppContext.java:1191)
at org.mortbay.jetty.handler.ContextHandler.doStart(
ContextHandler.java:481)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java
:434)
at org.mortbay.component.AbstractLifeCycle.start(
AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(
HandlerCollection.java:147)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(
ContextHandlerCollection.java:120)
at org.mortbay.component.AbstractLifeCycle.start(
AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(
HandlerCollection.java:147)
at org.mortbay.component.AbstractLifeCycle.start(
AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(
HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:210)
at org.mortbay.component.AbstractLifeCycle.start(
AbstractLifeCycle.java:40)
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:585)
at
org.codehaus.cargo.container.jetty.internal.JettyExecutorThread.run(
JettyExecutorThread.java:68)
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable
Log constructor [Ljava.lang.Class;@8c02cc for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
LogFactoryImpl.java:413)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(
LogFactoryImpl.java:529)
... 25 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.getConstructor(Class.java:1629)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
LogFactoryImpl.java:410)
... 26 more
2007-12-01 16:52:53.588::INFO:  Extract
jar:file:/home/marco/BudgetAppV2/BudgetWeb/target/jetty6x/cargocpc.war!/ to
/tmp/Jetty_0_0_0_0_8080_cargocpc.war__cargocpc__xflgf3/webapp
2007-12-01 16:52:54.210::INFO:  Started SelectChannelConnector @
0.0.0.0:8080
[INFO] [beddedLocalContainer] Jetty 6.x Embedded started on port [8080]
[INFO] [cargo:deploy {execution: start-container}]
[INFO] [mbeddedLocalDeployer] Deploying
[/home/marco/BudgetAppV2/BudgetWeb/target/BudgetWeb-1.0-SNAPSHOT.war]
2007-12-01 16:52:58.114::INFO:  Extract
jar:file:/home/marco/BudgetAppV2/BudgetWeb/target/BudgetWeb-
1.0-SNAPSHOT.war!/ to /tmp/Jetty_0_0_0_0_8080_BudgetWeb-
1.0-SNAPSHOT.war__BudgetWeb-1_0-SNAPSHOT__8a04wa/webapp
2007-12-01 16:52:59.925::WARN:  failed
[EMAIL PROTECTED]/BudgetWeb-1.0-SNAPSHOT
,jar:file:/home/marco/BudgetAppV2/BudgetWeb/target/BudgetWeb-

Re: Maven install

2007-11-30 Thread Marco Mistroni
Hi,
   where are your properties(i mean the 'replacement' properties)  'stored'?
in your profile?

On Nov 30, 2007 7:48 PM, LinaTomy [EMAIL PROTECTED] wrote:


 Hi
 I have the following structure

 src
  |
  ---main
|
 resources
|
---
A.properties
store
|
 
   1.pdf
   2.pdf
   data
 |
 ---
1.xml
2.xml

 When i do a maven install I need the following to happen

 1. Filter only A.properties
 2. Do not filter any files under store
 3. Copy store to classes
 4. Do not copy store to war
 5. Copy filtered properties to both war and classes

 Also when I do a mvn install the properties files which is copied to war
 is
 not able to get the value for ${project.build.outputDirectory}.

 Could someone please help me with this.

 Below is my pom's snippet

 build

 plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
version2.0.2/version
configuration
webResources
resource
directorysrc/main/resources/directory
targetPathWEB-INF/classes/targetPath
!-- Filter the properties file to replace
 varibles with appropriate
 values --
filteringtrue/filtering
includes
include*.properties/include
/includes
/resource
/webResources
/configuration
/plugin
 /plugins

 !-- turn filtering on for the project's resources directory --
 resources
resource
directorysrc/main/resources/directory
!-- Filter the properties file to replace varibles with
 appropriate
 values --
filteringtrue/filtering
includes
  include*.properties/include
/includes
excludes
  exclude*.pdf/exclude
  exclude*.xml/exclude
 /excludes
/resource
 /resources

 /build
 --
 View this message in context:
 http://www.nabble.com/Maven-install-tf4923928s177.html#a14091357
 Sent from the Maven - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: errors for hibernate test cases

2007-11-30 Thread Marco Mistroni
Giovanni,
 could you please post stacktrace of exception? i had also problems with
hibernate and got everything
sorted out..
your hbm.xml files  should end up in src/main/resources in order to be
present in the classpath during
testing(they'll end up in target\classes)

regards
 marco

On Nov 30, 2007 10:17 PM, Giovanni Azua [EMAIL PROTECTED] wrote:

 hi,

 I have a set of test cases that pass fine under Eclipse .. but from Maven
 I
 get java.lang.NoClassDefFoundError when running
 TestHibernateGenericReadOnlyDao and TestHibernateGenericDao (see below).

 My gut-feeling is that the auxiliary Fixture class Person (not a TestCase
 and not Test* pattern) is being filtered out by Maven during testing?

 Also can not tell from the logs that Person.hbm.xml is being picked up
 properly ... does it belong under /src/test/java/my packages.../ ? or
 under /src/test/resources/my packages.../ ?

 If interested the sources are available for checkout from:
 http://perfectjpattern.svn.sourceforge.net/svnroot/perfectjpattern/trunk/

 TIA,
 regards,
 Giovanni

 I have implemented a Generic Dao based on Hibernate and then included
 under
 my test package:

 trunk/
 - perfectjpattern-j2ee
 -- pom.xml
 -- src/
 --- test/
  java/
 - perfectjpattern/
 -- j2ee/
 --- database/
  dao/
 - hibernate/
 -- Person.java
 -- Person.hbm.xml
 -- TestHibernateGenericReadOnlyDao.java
 -- TestHibernateGenericDao.java
  resources/
 - hibernate.cfg.xml
 - hsql.properties
 - hsql.script
 - log4j.xml



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Maven2 and Selenium problem / anyone could help?

2007-11-26 Thread Marco Mistroni
hi all,
 i am trying out Maven2 with selenium plugin, but i am getting alwasy
same error and i was wondering if anyone else here came across
same situation...

here's my test
  ( i had my own url but as i kept on getting
exceptions i tried with a well known one 
public class LoginTest extends SeleneseTestCase {
public void testLogin() throws Exception {
selenium.open(http://www.google.com;);
verifyTrue(selenium.isTextPresent(Google));//Hello and 
Welcome to
BudgetWeb V2 Application));
}
}


*** here's my pom (only relevant part) ***
plugin
groupIdorg.mortbay.jetty/groupId
artifactIdmaven-jetty-plugin/artifactId
version6.0.1/version
   /plugin
   plugin
groupIdorg.codehaus.mojo/groupId
artifactIdselenium-maven-plugin/artifactId
executions
execution
idstart/id
phasepre-integration-test/phase
goals
goalstart-server/goal
/goals
configuration
backgroundtrue/background
logOutputtrue/logOutput
multiWindowtrue/multiWindow
/configuration
/execution
execution
idstop/id
phasepost-integration-test/phase
goals
goalstop-server/goal
/goals
/execution
/executions
   /plugin
   plugin
groupIdorg.codehaus.cargo/groupId
artifactIdcargo-maven2-plugin/artifactId
version0.3-SNAPSHOT/version
configuration
waitfalse/wait
container
containerIdjetty6x/containerId
typeembedded/type
/container
/configuration
executions
execution
idstart-container/id
phasepre-integration-test/phase
goals
goalstart/goal
goaldeploy/goal
/goals
/execution

execution
idstop-container/id
phasepost-integration-test/phase
goals
goalstop/goal
/goals
/execution
/executions
   /plugin
   plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-surefire-plugin/artifactId
configuration
excludes
 
exclude**/uattests/*Test.java/exclude
/excludes
systemProperties
property

namenet.sourceforge.cobertura.datafile/name

valuetarget/cobertura/cobertura.ser/value
/property
/systemProperties
/configuration
executions
execution
idintegration-tests/id
phaseintegration-test/phase
goals
goaltest/goal
/goals
configuration
skipfalse/skip
excludes

excludenone/exclude
/excludes

Re: Maven/Hibernate error / anyone has find similar?

2007-11-15 Thread Marco Mistroni
Hello,
 mm  not really :)
found out that i had a clash between followign dependencies
- hibernate 3.2.x
- asm-all
-cglib
- spring ?

i am trying to move my project from ant to maven, and we are using
hibernate spring, cglib and asm libraries

when i downloaded them from web, i got error,
when instead i pointed to version installed on my local machine (teh
one i m using with ant) everythign worked fine
i'll need toinvestigate more as this may cause us problems if we
update any versions of spring or hibernate

i'll report back here my findings once i proceed with my investigation

regards
marco



On Nov 14, 2007 9:04 PM, Wayne Fay [EMAIL PROTECTED] wrote:
 Take a look at your applicationContext.xml file, apparently you have
 an issue with how you've defined your sessionFactory bean (??).

 org.springframework.beans.factory.BeanCreationException: Error
 creating bean with name 'sessionFactory' defined in class path
 resource [applicationContext.xml]: Invocation of init method failed;
 nested exception is java.lang.NoClassDefFoundError
 Caused by: java.lang.NoClassDefFoundError
at 
 org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:107)

 Wayne

 On 11/14/07, Marco Mistroni [EMAIL PROTECTED] wrote:
  hi all,
   i am trying to port an app from ant to maven , but it looks like i am
  having troubles iwth dependencies.
  has anyone ever found the error below?
  i attach my dependencies at the end of message, hope someone can sort me 
  out
 
 
 
  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.39
  sec  FAILURE!
  testGetBSDRBondIdsReturnsBondIds(com.bnpparibas.risk.collateralrisk.dao.IssueDaoIntegrationTest)
   Time elapsed: 0.359 sec   ERROR!
  org.springframework.beans.factory.BeanCreationException: Error
  creating bean with name 'sessionFactory' defined in class path
  resource [applicationContext.xml]: Invocation of init method failed;
  nested exception is java.lang.NoClassDefFoundError
  Caused by: java.lang.NoClassDefFoundError
 at 
  org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:107)
 at 
  org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Maven/Hibernate error / anyone has find similar?

2007-11-14 Thread Marco Mistroni
hi all,
 i am trying to port an app from ant to maven , but it looks like i am
having troubles iwth dependencies.
has anyone ever found the error below?
i attach my dependencies at the end of message, hope someone can sort me out



Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.39
sec  FAILURE!
testGetBSDRBondIdsReturnsBondIds(com.bnpparibas.risk.collateralrisk.dao.IssueDaoIntegrationTest)
 Time elapsed: 0.359 sec   ERROR!
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory' defined in class path
resource [applicationContext.xml]: Invocation of init method failed;
nested exception is java.lang.NoClassDefFoundError
Caused by: java.lang.NoClassDefFoundError
at 
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:107)
at 
org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
at 
org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
at 
org.hibernate.tuple.entity.AbstractEntityTuplizer.init(AbstractEntityTuplizer.java:135)
at 
org.hibernate.tuple.entity.PojoEntityTuplizer.init(PojoEntityTuplizer.java:55)
at 
org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.init(EntityEntityModeToTuplizerMapping.java:56)
at 
org.hibernate.tuple.entity.EntityMetamodel.init(EntityMetamodel.java:269)
at 
org.hibernate.persister.entity.AbstractEntityPersister.init(AbstractEntityPersister.java:425)
at 
org.hibernate.persister.entity.SingleTableEntityPersister.init(SingleTableEntityPersister.java:109)
at 
org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at 
org.hibernate.impl.SessionFactoryImpl.init(SessionFactoryImpl.java:226)
at 
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
at 
org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:807)
at 
org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:740)
at 
org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:131)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
at 
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:92)
at 
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:77)
at 
org.springframework.test.AbstractSpringContextTests.loadContextLocations(AbstractSpringContextTests.java:121)
at 
org.springframework.test.AbstractDependencyInjectionSpringContextTests.loadContextLocations(AbstractDependencyInjectionSpringContextTests.java:210)
at 
org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:101)
at 
org.springframework.test.AbstractDependencyInjectionSpringContextTests.setUp(AbstractDependencyInjectionSpringContextTests.java:178)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)

Mvn2

2007-11-13 Thread Marco Mistroni
hi all,
 anyone could tell me why suddenly i am getting this exception?
my settings.xml is at the bottom of hte msg...

[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Failed to resolve artifact.

Couldn't find a version in [1.0-alpha-7, 1.0-alpha-8, 1.0-alpha-9] to
match rang
e [1.0-alpha-10-SNAPSHOT,1.0-alpha-10-SNAPSHOT]
  org.codehaus.plexus:plexus-archiver:jar:null

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  codehaus-plugins (http://dist.codehaus.org/),
  codehausSnapshots (http://snapshots.maven.codehaus.org/maven2),
  codehaus.snapshots (http://snapshots.repository.codehaus.org),
  Codehaus (http://repository.codehaus.org/),
  apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository/)


[INFO] 
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Couldn't find a version
in [1.0-alpha-7, 1.0-alpha-8, 1.0-alpha-9] to match range
[1.0-alpha-10-SNAPSHOT
,1.0-alpha-10-SNAPSHOT]
  org.codehaus.plexus:plexus-archiver:jar:null

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  codehaus-plugins (http://dist.codehaus.org/),
  codehausSnapshots (http://snapshots.maven.codehaus.org/maven2),
  codehaus.snapshots (http://snapshots.repository.codehaus.org),
  Codehaus (http://repository.codehaus.org/),
  apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository/)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.artifact.versioning.OverConstrainedVersionException:
 Couldn't find a version in [1.0-alpha-7, 1.0-alpha-8, 1.0-alpha-9] to
match ran
ge [1.0-alpha-10-SNAPSHOT,1.0-alpha-10-SNAPSHOT]
  org.codehaus.plexus:plexus-archiver:jar:null

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  codehaus-plugins (http://dist.codehaus.org/),
  codehausSnapshots (http://snapshots.maven.codehaus.org/maven2),
  codehaus.snapshots (http://snapshots.repository.codehaus.org),
  Codehaus (http://repository.codehaus.org/),
  apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository/)

at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(D
efaultArtifactCollector.java:291)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(D
efaultArtifactCollector.java:367)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(D
efaultArtifactCollector.java:74)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:284)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:272)
at org.apache.maven.plugin.DefaultPluginManager.ensurePluginContainerIsC
omplete(DefaultPluginManager.java:654)
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul
tPluginManager.java:557)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:421)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
... 16 more
[INFO] 
[INFO] Total time: 3 seconds
[INFO] Finished at: Tue Nov 13 16:09:03 GMT 2007

maven / artifactory error

2007-11-13 Thread Marco Mistroni
hi all,
 i have installed artifactory 1.2.5, and i am using maven2.0.7
i have setup an internal repository (artifactory),  but after
replacing my settings.xml to point to artifactory, i keep
on getting exceptions like 'maven resource plugin not found', maven
compiler plugin not found  etc.. even though i have uploaded them
in my internal repository.
i found a thread here
http://www.mail-archive.com/users@maven.apache.org/msg62851.html
mentioning that it could be a
Maven problem...


thing is, when i point my settings.xml to external repositories, it
downloads fine
when i point to internal repository ONLY it looks it does not look at it

when i point to internal AND external repository, everything works fine...

anyone could help me out?
i am afraid i do't have settings.xml and artifactory config file with
me.. hope someone else has already found
same problem and possibly the solution or the workaround

thanks in advance and regards
 marco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: promoting maven @work / fail on proxy uname/pwd

2007-11-04 Thread Marco Mistroni
Yes, thanks brett
that's what i m trying to put in my colleagues mind.. they still think
that having  an http proxy username and password
can open the door to even the most protected software in our company..
I'll keep u posted on this... it'll be really silly to drop
maven/artifactory just for that/..
thanks again and regards
 marco

On 11/3/07, Brett Porter [EMAIL PROTECTED] wrote:

 Right - at the very least, even if you still need to use the proxy
 from there, you only have to configure the u/p in one place and it can
 be locked down to system administrators.

 - Brett

 On 04/11/2007, Marco Mistroni [EMAIL PROTECTED] wrote:
  Yep, will certainly do
 
  On 11/3/07, Wayne Fay [EMAIL PROTECTED] wrote:
  
   Yea, we talked it out a bit and he realized that actually only his
   Artifactory instance will be going outside the firewall (through the
   proxy), so he needs to focus his attention on giving that box
   permission to get out to the Internet. I suggested a few approaches
   I've used/seen and he's going to work on it next week...
  
   Marco, do reply back when you solve it, for the benefit of other
   people who have similar configurations.
  
   Wayne
  
   On 11/3/07, Brett Porter [EMAIL PROTECTED] wrote:
Ah, I misunderstood - I thought you were going to configure your
username and password for your repo manager/proxy :)
   
Good luck,
Brett
   
On 03/11/2007, Marco Mistroni [EMAIL PROTECTED] wrote:
 Brett,
   i  talked with Wayne (Fay) on the issue.
 for the way i want to imlpement it (an INternal repository) it is
   NOT  a
 maven problem
 proxy will be configured in Artifactory... so it's there where i
   should
 focus my attention..

 thanks a lot for reply and regards
  marco

 On 11/2/07, Brett Porter [EMAIL PROTECTED] wrote:
 
  On 03/11/2007, Marco Mistroni [EMAIL PROTECTED] wrote:
   - how you developers are tackling the issue right now?
   - does mvn 2.1 really provides that feature?
   - if so, when it will be out?
 
  I started a little work on it quite some time back, but it was
 not
   yet
  integrated into Maven and there were still some open questions.
 
  At this point, it is scheduled for 2.1, but I'd say it's no
   certainty
  to be included, unfortunately.
 
  the issue to watch is MNG-553.
 
  Regards,
  Brett
 
  --
  Brett Porter
  Blog: http://www.devzuz.org/blogs/bporter/
 
 
   -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

   
   
--
Brett Porter
Blog: http://www.devzuz.org/blogs/bporter/
   
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 


 --
 Brett Porter
 Blog: http://www.devzuz.org/blogs/bporter/

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: promoting maven @work / fail on proxy uname/pwd

2007-11-04 Thread Marco Mistroni
Thanx wayne.. i'll do my best :)
worst that can happen, we'll stay to current 450 lines ant xml script and
i'll have a competitive edge
over my colleagues :))

regards
 marco

On 11/4/07, Wayne Fay [EMAIL PROTECTED] wrote:

 The file is protected by NTFS ACL/security. If they don't trust that,
 what do they trust?? And its not like having the proxy name/pass is
 going to do a hacker a lot of good, unless it is a common name/pass
 that is shared across a lot of your equipment which is definitely not
 a best practice!

 A lot of people yell security! when they have no other reason to
 complain about something, but they just don't like it (change is
 hard/scary and Maven is new). Its a lot like the boy who cried wolf.
 If you can really drill down into their issue/problem, many times you
 can convince them that they are simply wrong...

 Wayne

 On 11/4/07, Marco Mistroni [EMAIL PROTECTED] wrote:
  Yes, thanks brett
  that's what i m trying to put in my colleagues mind.. they still
 think
  that having  an http proxy username and password
  can open the door to even the most protected software in our company..
  I'll keep u posted on this... it'll be really silly to drop
  maven/artifactory just for that/..
  thanks again and regards
   marco
 
  On 11/3/07, Brett Porter [EMAIL PROTECTED] wrote:
  
   Right - at the very least, even if you still need to use the proxy
   from there, you only have to configure the u/p in one place and it can
   be locked down to system administrators.
  
   - Brett
  
   On 04/11/2007, Marco Mistroni [EMAIL PROTECTED] wrote:
Yep, will certainly do
   
On 11/3/07, Wayne Fay [EMAIL PROTECTED] wrote:

 Yea, we talked it out a bit and he realized that actually only his
 Artifactory instance will be going outside the firewall (through
 the
 proxy), so he needs to focus his attention on giving that box
 permission to get out to the Internet. I suggested a few
 approaches
 I've used/seen and he's going to work on it next week...

 Marco, do reply back when you solve it, for the benefit of other
 people who have similar configurations.

 Wayne

 On 11/3/07, Brett Porter [EMAIL PROTECTED] wrote:
  Ah, I misunderstood - I thought you were going to configure your
  username and password for your repo manager/proxy :)
 
  Good luck,
  Brett
 
  On 03/11/2007, Marco Mistroni [EMAIL PROTECTED] wrote:
   Brett,
 i  talked with Wayne (Fay) on the issue.
   for the way i want to imlpement it (an INternal repository) it
 is
 NOT  a
   maven problem
   proxy will be configured in Artifactory... so it's there where
 i
 should
   focus my attention..
  
   thanks a lot for reply and regards
marco
  
   On 11/2/07, Brett Porter [EMAIL PROTECTED] wrote:
   
On 03/11/2007, Marco Mistroni [EMAIL PROTECTED] wrote:
 - how you developers are tackling the issue right now?
 - does mvn 2.1 really provides that feature?
 - if so, when it will be out?
   
I started a little work on it quite some time back, but it
 was
   not
 yet
integrated into Maven and there were still some open
 questions.
   
At this point, it is scheduled for 2.1, but I'd say it's no
 certainty
to be included, unfortunately.
   
the issue to watch is MNG-553.
   
Regards,
Brett
   
--
Brett Porter
Blog: http://www.devzuz.org/blogs/bporter/
   
   

 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
 
 
  --
  Brett Porter
  Blog: http://www.devzuz.org/blogs/bporter/
 
 
   -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


   
  
  
   --
   Brett Porter
   Blog: http://www.devzuz.org/blogs/bporter/
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: promoting maven @work / fail on proxy uname/pwd

2007-11-03 Thread Marco Mistroni
Brett,
  i  talked with Wayne (Fay) on the issue.
for the way i want to imlpement it (an INternal repository) it is NOT  a
maven problem
proxy will be configured in Artifactory... so it's there where i should
focus my attention..

thanks a lot for reply and regards
 marco

On 11/2/07, Brett Porter [EMAIL PROTECTED] wrote:

 On 03/11/2007, Marco Mistroni [EMAIL PROTECTED] wrote:
  - how you developers are tackling the issue right now?
  - does mvn 2.1 really provides that feature?
  - if so, when it will be out?

 I started a little work on it quite some time back, but it was not yet
 integrated into Maven and there were still some open questions.

 At this point, it is scheduled for 2.1, but I'd say it's no certainty
 to be included, unfortunately.

 the issue to watch is MNG-553.

 Regards,
 Brett

 --
 Brett Porter
 Blog: http://www.devzuz.org/blogs/bporter/

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: promoting maven @work / fail on proxy uname/pwd

2007-11-03 Thread Marco Mistroni
Yep, will certainly do

On 11/3/07, Wayne Fay [EMAIL PROTECTED] wrote:

 Yea, we talked it out a bit and he realized that actually only his
 Artifactory instance will be going outside the firewall (through the
 proxy), so he needs to focus his attention on giving that box
 permission to get out to the Internet. I suggested a few approaches
 I've used/seen and he's going to work on it next week...

 Marco, do reply back when you solve it, for the benefit of other
 people who have similar configurations.

 Wayne

 On 11/3/07, Brett Porter [EMAIL PROTECTED] wrote:
  Ah, I misunderstood - I thought you were going to configure your
  username and password for your repo manager/proxy :)
 
  Good luck,
  Brett
 
  On 03/11/2007, Marco Mistroni [EMAIL PROTECTED] wrote:
   Brett,
 i  talked with Wayne (Fay) on the issue.
   for the way i want to imlpement it (an INternal repository) it is
 NOT  a
   maven problem
   proxy will be configured in Artifactory... so it's there where i
 should
   focus my attention..
  
   thanks a lot for reply and regards
marco
  
   On 11/2/07, Brett Porter [EMAIL PROTECTED] wrote:
   
On 03/11/2007, Marco Mistroni [EMAIL PROTECTED] wrote:
 - how you developers are tackling the issue right now?
 - does mvn 2.1 really provides that feature?
 - if so, when it will be out?
   
I started a little work on it quite some time back, but it was not
 yet
integrated into Maven and there were still some open questions.
   
At this point, it is scheduled for 2.1, but I'd say it's no
 certainty
to be included, unfortunately.
   
the issue to watch is MNG-553.
   
Regards,
Brett
   
--
Brett Porter
Blog: http://www.devzuz.org/blogs/bporter/
   
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
 
 
  --
  Brett Porter
  Blog: http://www.devzuz.org/blogs/bporter/
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




promoting maven @work / fail on proxy uname/pwd

2007-11-02 Thread Marco Mistroni
hi all,
 i am very close to promote Maven @work, where we are currently using
a 400 lines long ant build script... (don't need to list the miracles we are
doing in it
to get some  jobs done...)

i thought  i would have had no problems in showing what Mvn can bring us (in
4 yrs using it, i found out almost all the features and all the
benfits that mvn can give)... until i got some comments that having plain
username
and password for maven proxy (we r behind a firewall) is a potential
security threat

my idea was to setup an internal repository on one machine, so that machine
would be a dedicated one
with a dedicated user account..
I thougth, that other than setting up some read permission on the file would
have sufficed to win

seems it might not be enough...
i read somewhere that in release 2.1 ther will be an option to encrypt
uname/pwd on proxy..
well i have then few questions for the list:

- how you developers are tackling the issue right now?
- does mvn 2.1 really provides that feature?
- if so, when it will be out?

i know myself that wth an http username and password you won't be able to
asssault a bank (i work in one..)
but i needs facts.


anyone could help?

thanks an dregars
  marco


Re: How to use different databases for tests and the actual application?

2007-10-29 Thread Marco Mistroni
hi,
Not sure about that..

maven creates only 1 war, and tha ti ste result of you building app

i m using spring, using 2 different datasources for test and deploy
if u r not using spring, i'd go for 2 separate config files, but not knowing
your app
i won't comment further

hth
 marco

On 10/29/07, jimpo janne

[EMAIL PROTECTED] wrote:


 Hi,

 yes, this is something I have actually started to use as a basic
 principle.

 In src/main/resources and src/test/resources there is a config file
 jdbc.properties which defines the connection details. It has properties
 such
 as

 jdbc.username=${jdbc.username}
 jdbc.password=${jdbc.password}

 Now, instead of trying to make Maven put different values to
 ${jdbc.username} based on the build phase, I created additional properties
 such as ${jdbc.test.username} and used them in the src/test/*. I'm still
 in
 the middle of configuring the whole thing, but it seems like a valid
 approach.

 To get things clear, maven creates one .war during the test phase (with
 files based on src/test/resources/) and then creates another .war (using
 files from src/main/resources) when it creates the final installation
 packet? When I run

  mvn install

 and Maven first goes through the test phase and then installs war in the
 repository, two different wars are created? Correct?




 Victor Cardona wrote:
 
  jimpo wrote:
  Using application server -specified datasources is out of the question
  right
  now unfortunately. Database connection details are configured inside
 the
  web
  application.
 
  It surprises me if Maven would not make it easy to use a different
  database
  configuration for the tests and a different one for the created
  application.
  This would basically make the dbUnit plugin pretty pointless, wouldn't
  it?
  If you are creating a release of your application, you want the release
  to
  point to a production db, but you still want the unit tests to be done
  against a unit test db populated with dbUnit.
 
  (not getting into whether such unit tests are really true unit
  tests...I
  need them regardless of the term)
 
 
  Arnaud Bailly wrote:
  jimpo [EMAIL PROTECTED] writes:
 
  I am using Maven2 to build my war packet. Base maven configuration is
  created
  with Appfuse http://appfuse.org/display/APF/Home.
 
  When I do a mvn install (or mvn cargo:deploy), first a test phase
  executes,
  and then the final war is built and installed in the repository (or
  deployed
  to my app server).
 
  I want to run the tests against a different db than which the final
  package
  uses. So far I have not figured out how to do this. Test phase uses
 the
  same
  database as the final application.
 
  I figured out how to use profiles to switch between different
  databases.
  I
  can switch to test profile with, say, mvn test -Ptestdatabase. I
 could
  of
  course use mvn test -Ptestdatabase to test and then separate command
  mvn
  install -Dmaven.test.skip -Prealdatabase for creating the packet (and
  skipping tests), but that's not very nice. I want to be able to issue
  one
  command which does both phases, tests and packaging.
 
  I am guessing maybe the solution would be something like activating
  profile
  X for the tests phase, and then activating a different profile Y for
  the
  actual build. How could I accomplish this?
 
  Hello,
  I do not think possible right now to activate different profiles for
  different phases in the same run.  And I do not think this is
  desirable. Maybe, if you are in a J2EE Container, you could use
  different data sources parameters in test and production ? AFAIK, data
  source configuration is independent of the applicaiont and configured
  in the container, so you could use a test configuration, say with
  hsqldb or derby in test, and another configuration in productoin. In
  your webapp, data source reference will stay the same.
 
  HTH
  --
  OQube  software engineering \ génie logiciel 
  Arnaud Bailly, Dr.
  \web http://www.oqube.com
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
  I'm not familiar with Appfuse, so excuse my uninformed question.  How
  are you configuring your datasource in your webapp?  I'm guessing that
  you have the connection properties in a file somewhere similar to
  tomcat's context.xml.  If so, can't you just add a similar file to your
  testing resources directory that would then configure the application
  with the test database information?
 
  Victor
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/How-to-use-different-databases-for-tests-and-the-actual-application--tf4696771s177.html#a13469803
 Sent from the Maven - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to use different databases for tests and the actual application?

2007-10-27 Thread Marco Mistroni
Hi,
  didnt follow whole thread i m afraid
my understanding is that you want to use 2 diffeerent datasources for your
app
r u using Spring at all?
coul dyou not configure a datasource for production and a datasource for
test?

hth
 marco

On 10/27/07, Victor Cardona [EMAIL PROTECTED] wrote:

 jimpo wrote:
  Using application server -specified datasources is out of the question
 right
  now unfortunately. Database connection details are configured inside the
 web
  application.
 
  It surprises me if Maven would not make it easy to use a different
 database
  configuration for the tests and a different one for the created
 application.
  This would basically make the dbUnit plugin pretty pointless, wouldn't
 it?
  If you are creating a release of your application, you want the release
 to
  point to a production db, but you still want the unit tests to be done
  against a unit test db populated with dbUnit.
 
  (not getting into whether such unit tests are really true unit
 tests...I
  need them regardless of the term)
 
 
  Arnaud Bailly wrote:
  jimpo [EMAIL PROTECTED] writes:
 
  I am using Maven2 to build my war packet. Base maven configuration is
  created
  with Appfuse http://appfuse.org/display/APF/Home.
 
  When I do a mvn install (or mvn cargo:deploy), first a test phase
  executes,
  and then the final war is built and installed in the repository (or
  deployed
  to my app server).
 
  I want to run the tests against a different db than which the final
  package
  uses. So far I have not figured out how to do this. Test phase uses
 the
  same
  database as the final application.
 
  I figured out how to use profiles to switch between different
 databases.
  I
  can switch to test profile with, say, mvn test -Ptestdatabase. I could
 of
  course use mvn test -Ptestdatabase to test and then separate command
 mvn
  install -Dmaven.test.skip -Prealdatabase for creating the packet (and
  skipping tests), but that's not very nice. I want to be able to issue
 one
  command which does both phases, tests and packaging.
 
  I am guessing maybe the solution would be something like activating
  profile
  X for the tests phase, and then activating a different profile Y for
 the
  actual build. How could I accomplish this?
 
  Hello,
  I do not think possible right now to activate different profiles for
  different phases in the same run.  And I do not think this is
  desirable. Maybe, if you are in a J2EE Container, you could use
  different data sources parameters in test and production ? AFAIK, data
  source configuration is independent of the applicaiont and configured
  in the container, so you could use a test configuration, say with
  hsqldb or derby in test, and another configuration in productoin. In
  your webapp, data source reference will stay the same.
 
  HTH
  --
  OQube  software engineering \ génie logiciel 
  Arnaud Bailly, Dr.
  \web http://www.oqube.com
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 I'm not familiar with Appfuse, so excuse my uninformed question.  How
 are you configuring your datasource in your webapp?  I'm guessing that
 you have the connection properties in a file somewhere similar to
 tomcat's context.xml.  If so, can't you just add a similar file to your
 testing resources directory that would then configure the application
 with the test database information?

 Victor





help / Maven presentations

2007-10-26 Thread Marco Mistroni
hi all,
  i have finally convinced my workplace to move to maven (wasn't that
difficult, the alternative was a 500 line ant script which was very
volatile)

as i have learned maven by just using it and trying new feature all the
time, i'll appreciate if anyone could mail me privately some maven
presentation
that he /she has already used..
if anyone could help, that will be appreciated... you could mail me
privately at [EMAIL PROTECTED]

thanks in advancea nd regards


marco


Re: Trying to setup a Maven Shared Repository

2007-10-24 Thread Marco Mistroni
Hello,
   well  yes. you'd need to change your settings.xml in your .m2 directory
to point to your machine
i m sure in artifactory website there's an example, .. i'll send you an
example tomorrow from work of a settings.xml
and an artifactory config file..

regards
   marco

On 10/24/07, charliec [EMAIL PROTECTED] wrote:


 I downloaded 1.2.2-rc0 and I can browse
 http://host:8081/artifactory.  But
 I still receive the same error through Maven.  Is there any other
 configuration that needs to be done through the tool or Maven besides
 modifying the mirror settings in Maven's settings.xml.


 Yoav  Landman wrote:
 
  The URL that should be browsable from the UI with the out-of-the-box
  installation is: http://host:8081/artifactory
  I'd also suggest you use 1.2.5-rc1, instead of rc-0.
  You might want to take this to the artifactory-users list...
 
 
  charliec wrote:
 
  Hello,
  I downloaded artifactory and executed the batch script artifactory.batto
  start it.  I added the following to the settings.xml file:
 mirror
idartifactory/id
mirrorOf*/mirrorOf
urlhttp://machine-name:8081/artifactory/repo/url
nameArtifactory/name
 /mirror
  However, when I execute Maven, I still receive the following error:
  Caused by: java.io.IOException: Server returned HTTP response code: 503
  for URL:
 
 
 http://machine-name:8081/artifactory/repo/org/apache/maven/plugins/maven-resource
  s-plugin/maven-metadata.xml
 
  I noticed the machine that when I try to bring up
  http://machine-name:8081 on the machine that has artifactory
 installed,
  I receive the following message:
 
  No context on this server matched or handled this request.
  Contexts known to this server are:
  /artifactory ---
  [EMAIL PROTECTED]
 /artifactory,jar:file:/D:/artifactory-1.2.5-rc0/webapps/artifactory.war!/}
 
  The documentation for artifactory says to set up maven to use
 artifactory
  proxy, just configure a maven repository with the following URL:
  http://[your server name]:[port]/artifactory/repo
 
  What do I need to accomplish this?  Thanks.
 
 
 
  mmistroni wrote:
 
  Hello,
   i m trying to do same with artifactory.. worked fine so far.. i
  recommend u
  have  a look at that
 
  regards
   marco
 
  On 10/23/07, Wayne Fay [EMAIL PROTECTED] wrote:
 
  Simply putting an HTTP server on top of your personal .m2 directory
  (local repo cache) is not sufficient. The metadata in a real Maven
  repo is different than what is in your private local repo cache.
 
  Please look at Archiva, Proximity, Artifactory, etc for a real
 Maven
  repo solution.
 
  Wayne
 
  On 10/23/07, charliec [EMAIL PROTECTED] wrote:
  
   Hello,
   I'm trying to setup a shared repository that mirrors the central
  repository
   so other team members can download from this repository instead of
  accessing
   the central.  I've created a Virtaul Directory in IIS that points
 to
  my
  .m2
   repository.  I can access this repostory on another machine via the
  browser
   using url such as the following:  http://machine-name/repository.
  On
  the
   other machine, I added the following to my pom.xml file:
   repositories
   repository
   idcentral/id
   urlhttp://machine-name/repository/url
   nameMaven Repository Manager running on
 repo.company.com
  /name
   repository
/repositories
   pluginRepositories
 pluginRepository
  idcentral/id
  nameIMaven Repository Manager running on repo.company.com
 /name
  urlhttp://machine-name/repository/url
  /pluginRepository
   /pluginRepositories
  
   When I run mvn install, I receive the error below.   It doesn't
 even
  try
  to
   access the shared repository.  Please help.  Any assistance would
 be
  greatly
   appreciated.  Thanks.
  
  
   + Error stacktraces are turned on.
   Maven version: 2.0.7
   Java version: 1.5.0_12
   OS name: windows xp version: 5.1 arch: x86
   [DEBUG] Building Maven user-level plugin registry from:
 'C:\Documents
  and
   Settin
   gs\COSS\.m2\plugin-registry.xml'
   [DEBUG] Building Maven global-level plugin registry from:
   'C:\maven-2.0.7\conf\p
   lugin-registry.xml'
   [INFO] Scanning for projects...
   [INFO]
  
 
 -
   ---
   [INFO] Building my-app
   [INFO]task-segment: [install]
   [INFO]
  
 
 -
   ---
   [INFO] artifact
  org.apache.maven.plugins:maven-resources-plugin:checking
   for up
   dates from central
   [WARNING] repository metadata for: 'artifact
   org.apache.maven.plugins:maven-reso
   urces-plugin' could not be retrieved from repository: central due
 to
  an
   error: E
   rror transferring file
   [INFO] Repository 'central' will be blacklisted
   [DEBUG] Exception
   org.apache.maven.wagon.TransferFailedException: Error transferring
  file
   at
  
 

Re: Trying to setup a Maven Shared Repository

2007-10-23 Thread Marco Mistroni
Hello,
 i m trying to do same with artifactory.. worked fine so far.. i recommend u
have  a look at that

regards
 marco

On 10/23/07, Wayne Fay [EMAIL PROTECTED] wrote:

 Simply putting an HTTP server on top of your personal .m2 directory
 (local repo cache) is not sufficient. The metadata in a real Maven
 repo is different than what is in your private local repo cache.

 Please look at Archiva, Proximity, Artifactory, etc for a real Maven
 repo solution.

 Wayne

 On 10/23/07, charliec [EMAIL PROTECTED] wrote:
 
  Hello,
  I'm trying to setup a shared repository that mirrors the central
 repository
  so other team members can download from this repository instead of
 accessing
  the central.  I've created a Virtaul Directory in IIS that points to my
 .m2
  repository.  I can access this repostory on another machine via the
 browser
  using url such as the following:  http://machine-name/repository.  On
 the
  other machine, I added the following to my pom.xml file:
  repositories
  repository
  idcentral/id
  urlhttp://machine-name/repository/url
  nameMaven Repository Manager running on repo.company.com
 /name
  repository
   /repositories
  pluginRepositories
pluginRepository
 idcentral/id
 nameIMaven Repository Manager running on repo.company.com/name
 urlhttp://machine-name/repository/url
 /pluginRepository
  /pluginRepositories
 
  When I run mvn install, I receive the error below.   It doesn't even try
 to
  access the shared repository.  Please help.  Any assistance would be
 greatly
  appreciated.  Thanks.
 
 
  + Error stacktraces are turned on.
  Maven version: 2.0.7
  Java version: 1.5.0_12
  OS name: windows xp version: 5.1 arch: x86
  [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents
 and
  Settin
  gs\COSS\.m2\plugin-registry.xml'
  [DEBUG] Building Maven global-level plugin registry from:
  'C:\maven-2.0.7\conf\p
  lugin-registry.xml'
  [INFO] Scanning for projects...
  [INFO]
 
 -
  ---
  [INFO] Building my-app
  [INFO]task-segment: [install]
  [INFO]
 
 -
  ---
  [INFO] artifact org.apache.maven.plugins:maven-resources-plugin:checking
  for up
  dates from central
  [WARNING] repository metadata for: 'artifact
  org.apache.maven.plugins:maven-reso
  urces-plugin' could not be retrieved from repository: central due to an
  error: E
  rror transferring file
  [INFO] Repository 'central' will be blacklisted
  [DEBUG] Exception
  org.apache.maven.wagon.TransferFailedException: Error transferring file
  at
  org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
  ata(LightweightHttpWagon.java:104)
  at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
  at
  org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(D
  efaultWagonManager.java:462)
  at
  org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMeta
  data(DefaultWagonManager.java:363)
  at
  org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetada
  taManager.resolveAlways(DefaultRepositoryMetadataManager.java:364)
  at
  org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetada
  taManager.resolve(DefaultRepositoryMetadataManager.java:97)
  at
  org.apache.maven.artifact.transform.AbstractVersionTransformation.res
  olveVersion(AbstractVersionTransformation.java:65)
  at
  org.apache.maven.artifact.transform.LatestArtifactTransformation.tran
  sformForResolve(LatestArtifactTransformation.java:41)
  at
  org.apache.maven.artifact.transform.DefaultArtifactTransformationMana
  ger.transformForResolve(DefaultArtifactTransformationManager.java:57)
  at
  org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
  faultArtifactResolver.java:114)
  at
  org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
  faultArtifactResolver.java:73)
  at
  org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
  sitory(DefaultMavenProjectBuilder.java:526)
  at
  org.apache.maven.project.DefaultMavenProjectBuilder.buildFromReposito
  ry(DefaultMavenProjectBuilder.java:234)
  at
  org.apache.maven.project.artifact.MavenMetadataSource.retrieve(MavenM
  etadataSource.java:105)
  at
  org.apache.maven.plugin.version.DefaultPluginVersionManager.resolveMe
  taVersion(DefaultPluginVersionManager.java:672)
  at
  org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePl
  uginVersion(DefaultPluginVersionManager.java:186)
  at
  org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePl
  uginVersion(DefaultPluginVersionManager.java:90)
  at
  org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPlug
  inManager.java:166)
 

cobertura problem / found solution

2007-10-08 Thread Marco Mistroni
hi all,
 i have been bothering this list for the past 2 weeks because i could not
understand why for a certain
project, the cobertura report was failing big time with no indication of
what went wrong..

today, patientluy, i went over all the dependencies of my project and found
out that the reason
cobertura was screwing up big time was because i have set a dependency on
jasperreport.
jr was being downloaded from the net (version 1.3.3, but also 1.3.2 had same
result) and somehow
what was ending up in my repository was screwing up big time
i fixed my problem by having a system scope dependency on a jr jar that i
had on my local machine

i was wondering if anyone came across this . and if someone knows why
cobertura is failing big time..

you can try , in your project, to set a dependency on jasperreports, i'd be
glad to know if someone else does not encounter this problem..


w/kindest regards
 Marco


Re: Fwd: maven cobertura errro

2007-10-06 Thread Marco Mistroni
Hello Stefan,
 thanks fo ryour reply...

well, i'll need to investigate more, as i have a different app running on
same machine in which i can successfully
run cobertura report
i think there *might* be issues with some jars i am including i'll
investigate more and post here..
i  just wish someone on this list had sam eproblem so he can point me to
something..

regards
 marco

On 10/5/07, Stefan Reuter [EMAIL PROTECTED] wrote:

 and this one in the reporting section:

 reporting
 plugins
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdcobertura-maven-plugin/artifactId
 configuration
 formats
 formathtml/format
 formatxml/format
 /formats
 /configuration

 =Stefan

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.6 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

 iD8DBQFHBX13cVCZDfrn+pMRAnyBAJsHNNNxg1tQbEDFkBxbIM0bgSspFQCdH2uV
 5KCbk4RdOh85AO4IxhzHqvM=
 =DozG
 -END PGP SIGNATURE-






Re: Fwd: maven cobertura errro

2007-10-04 Thread Marco Mistroni
Hello Stefan,
 thanks for the link but in same page is showing also the same config that i
had..

i'd like to do instrumentation and check. do you have any sample
configuration to send me?

thanks in advance and regards
 marco

On 10/4/07, Stefan Reuter [EMAIL PROTECTED] wrote:

 Marco Mistroni wrote:
  i found a sample for configuring cobertura on the internet... could
  anyone help?

 Thats for the Maven 1.x plugin.
 For 2.x use:
 http://mojo.codehaus.org/cobertura-maven-plugin/usage.html

 =Stefan

 --
 reuter network consulting
 Neusser Str. 110
 50760 Koeln
 Germany
 Telefon: +49 221 1305699-0
 Telefax: +49 221 1305699-90
 E-Mail:  [EMAIL PROTECTED]
 Jabber:  [EMAIL PROTECTED]

 Steuernummern 215/5140/1791 USt-IdNr. DE220701760





Fwd: maven cobertura errro

2007-10-04 Thread Marco Mistroni
hello all,
  i am getting this exception in my  pom.xml when i add in the report
section an entry for cobertura...


[INFO] Error building POM (may not be this project's POM).


Project ID: unknown
POM Location: C:\TrunkMaven\client-web\pom.xml

Reason: Parse error reading POM. Reason: Unrecognised tag: 'executions'
(positio
n: START_TAG seen .../version\r\n\t\texecutions... @226:15)


[INFO]

[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Parse error reading POM.
Reaso
n: Unrecognised tag: 'executions' (position: START_TAG seen
.../version\r\n\t\
texecutions... @226:15)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:290)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.project.InvalidProjectModelException: Parse
error re
ading POM. Reason: Unrecognised tag: 'executions' (position: START_TAG seen
...
/version\r\n\t\texecutions... @226:15)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel
(Default
MavenProjectBuilder.java:1423)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel
(Default
MavenProjectBuilder.java:1380)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
leInternal(DefaultMavenProjectBuilder.java:477)
at org.apache.maven.project.DefaultMavenProjectBuilder.build
(DefaultMave
nProjectBuilder.java:200)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:537)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java
:467)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:364)
... 11 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException:
Unrecognise
d tag: 'executions' (position: START_TAG seen
.../version\r\n\t\texecutions.
.. @226:15)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseReportPlugin
(Mave
nXpp3Reader.java:3596)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseReporting
(MavenXp
p3Reader.java:3725)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel
(MavenXpp3Re
ader.java:2363)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(
MavenXpp3Reader.j
ava:4438)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel
(Default
MavenProjectBuilder.java:1419)
... 17 more
[INFO]

[INFO] Total time:  1 second
[INFO] Finished at: Thu Oct 04 13:43:24 BST 2007
[INFO] Final Memory: 1M/2M
[INFO]


C:\TrunkMaven\client-webmvn -version
Maven version: 2.0.6


and here's my pom

plugin
groupIdorg.codehaus.mojo/groupId
artifactIdcobertura-maven-plugin/artifactId
version2.1/version
executions
execution
idclean/id
phasepre-site/phase
goals
goalclean/goal
/goals
/execution
execution
idinstrument/id
phasesite/phase
goals
goalinstrument/goal
goalcobertura/goal
goalcheck/goal
/goals
/execution
/executions
/plugin


i found a sample for configuring cobertura on the internet... could anyone
help?

thanks and regards
 marco
?xml version=1.0?
project
modelVersion4.0.0/modelVersion
groupIdclient-web/groupId
artifactIdclient-web/artifactId
namecollrisk/name
version1.0-SNAPSHOT/version
urlhttp://maven.apache.org/url
developers
developer
idCTB/id
nameCTB Team/name
emailCOLL_IT/email
roles
roleContinuum Admin/role
/roles
organizationBNPParibas/organization
timezone0/timezone
/developer
/developers
mailingLists
mailingList
nameCOLL IT/name
subscribe[EMAIL 

convincing Workplace to use Maven

2007-09-30 Thread Marco Mistroni
hello all,
  i am a big fan of maven (i have been using it since approx 3 years..)..
and i'd like to use it @ my work,
where we are still using ant and coding most of the tasks manually..
but i'd need good arguments, as now many IDEs( especially IntelliJ) offer
lot of capabilities such
as code coverage, identifying code smells etc
so, i'd need good arguments for pushing for Maven2 @work

can anyone help me out?

thanks and regards


Fwd: Cobertura fails

2007-09-25 Thread Marco Mistroni
Hello all,
  i have a webapp in which i am using maven2.
My webapp should produce reports... one of which is cobertura..
but unfortunately, whenever  cobertura gets called (either by mvn site, mvn
install, mvn cobertura:check as example)
it fails miserably with a NUllPOInterException and i cannot figure out what
is hte problem..

could anyone help me out?
attached is my pom.xml.

thanks in advance and regards
 marco

-- Forwarded message --
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Sep 25, 2007 4:21 PM
Subject: Cobertura fails
To: [EMAIL PROTECTED]


Cobertura: Saved information on 111 classes.
Instrument time: 703ms

[DEBUG] 
[INFO] Instrumentation was successful.
[DEBUG] Configuring mojo '
org.apache.maven.plugins:maven-resources-plugin:2.3-SN
APSHOT:testResources' --
[DEBUG]   (f) filters = []
[DEBUG]   (f) outputDirectory = C:\KPL\target\test-classes
[DEBUG]   (f) project = [EMAIL PROTECTED]
[DEBUG]   (f) resources = [EMAIL PROTECTED]
[DEBUG] -- end configuration --
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] Copying 4 resources
[DEBUG] KPL:KPL:jar:1.0-SNAPSHOT (selected for null)
[DEBUG]   fit:fitWSPricingClient:jar:1.0:system (selected for system)
[DEBUG]   axis:axis:jar:1.4:compile (selected for compile)
[DEBUG] axis:axis-jaxrpc:jar:1.4:compile (selected for compile)
[DEBUG] axis:axis-saaj:jar:1.4:compile (selected for compile)
[DEBUG] axis:axis-wsdl4j:jar:1.5.1:runtime (selected for runtime)
[DEBUG] commons-logging:commons-logging:jar:1.0.4:runtime (selected for
runt
ime)
[DEBUG] commons-discovery:commons-discovery:jar:0.2:runtime (selected
for ru
ntime)
[DEBUG]   commons-logging:commons-logging:jar:1.0.3:runtime (removed -
neare
r found: 1.0.4)
[DEBUG]   junit:junit:jar:3.8.1:compile (selected for compile)
[DEBUG]   jasperreports:jasperreports:jar:1.3.3:compile (selected for
compile)
[DEBUG] commons-beanutils:commons-beanutils:jar:1.7.0:compile (selected
for
compile)
[DEBUG]   commons-logging:commons-logging:jar:1.0.4:runtime (setting
scope t
o: compile)
[DEBUG]   commons-logging:commons-logging:jar:1.0.4:compile (selected
for co
mpile)
[DEBUG] commons-collections:commons-collections:jar:20040616:compile
(settin
g version to: 20040616 from range: [2.1,))
[DEBUG] commons-collections:commons-collections:jar:20040616:compile
(select
ed for compile)
[DEBUG] commons-digester:commons-digester:jar:1.7:compile (setting
version t
o: 1.7 from range: [1.7,))
[DEBUG] commons-digester:commons-digester:jar:1.7:compile (selected for
comp
ile)
[DEBUG]   commons-beanutils:commons-beanutils:jar:1.6:compile (removed -
nea
rer found: 1.7.0)
[DEBUG]   commons-logging:commons-logging:jar:1.0:compile (removed -
nearer
found: 1.0.4)
[DEBUG]   commons-collections:commons-collections:jar:2.1:compile (range
res
tricted from: 2.1 and: [2.1,) to: 2.1 )
[DEBUG]   xml-apis:xml-apis:jar:1.0.b2:compile (selected for compile)
[DEBUG] commons-logging:commons-logging:jar:1.1:compile (setting version
to:
 1.1 from range: [1.0,))
[DEBUG] commons-logging:commons-logging:jar:1.1:compile (range
restricted fr
om: [1.0,) and: 1.0.4 to: 1.0.4 )
[INFO]

[ERROR] FATAL ERROR
[INFO]

[INFO] null
[INFO]

[DEBUG] Trace
java.lang.NullPointerException
at
org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(D
efaultArtifactCollector.java:164)
at
org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(D
efaultArtifactCollector.java:334)
at
org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(D
efaultArtifactCollector.java:334)
at
org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(D
efaultArtifactCollector.java:75)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:284)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:272)
at
org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDepende
ncies(DefaultPluginManager.java:1238)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPlugi
nManager.java:397)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(Defa
ultLifecycleExecutor.java:539)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:480)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecy
cle(DefaultLifecycleExecutor.java:896)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle
(Def
aultLifecycleExecutor.java:739)
at 

Re: Problemw ith site generation on continuum

2007-09-18 Thread Marco Mistroni
hELLO,
mm now that i think about it, mayb not as i have scheduled an automatic
startup task in Linux..
i will try to startup continuum from command line and launch a build to see
what happens..

i'll try and let youknow

thanks and regards
 Marco

On 9/18/07, Emmanuel Venisse [EMAIL PROTECTED] wrote:

 I don't see why some reports works and not others.
 Continuum launch mvn lilke you do it from the command line.

 Do you use the same user to run continuum and the mvn command line?

 Emmanuel

 Marco Mistroni a écrit :
  hi all,
   i have a simple mvn2 project that i decided to put on continuum
  i have configured continuum to run clean install and site targets
 
  problem is that when the site is generated, and i go to check the
 generated
  reports (By selecting working copy and drilling down to target/site
  directory), i have
  following results:
  - Surefire report works fine
  - CPD report works fine
  -PMD report works fine
 
  but Cobertura, Javadoc , Source Xref and TestSource Xref ends up with
 big
  exception like ClassNOtFoundException
  here's detail of exception
 
  INFO   | jvm 1| 2007/09/17 21:01:20 |
 javax.servlet.UnavailableException:
  java.lang.ClassNotFoundException: allclasses-frame.html
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.jetty.servlet.Invoker.service(Invoker.java:154)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(
  WebApplicationHandler.java:294)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.jetty.servlet.WebApplicationContext.handle(
  WebApplicationContext.java:525)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.http.HttpServer.service(HttpServer.java:879)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.http.SocketListener.handleConnection(SocketListener.java
 :218)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:331)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:520)
  INFO   | jvm 1| 2007/09/17 21:01:20 |
  INFO   | jvm 1| 2007/09/17 21:01:20 | 21:01:20.432 WARN!! Exception
 for
  /continuum/servlet/TestApp/package-summary.html
  INFO   | jvm 1| 2007/09/17 21:01:20 |
 javax.servlet.UnavailableException:
  java.lang.ClassNotFoundException: TestApp
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.jetty.servlet.Invoker.service(Invoker.java:154)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(
  WebApplicationHandler.java:294)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.jetty.servlet.WebApplicationContext.handle(
  WebApplicationContext.java:525)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.http.HttpServer.service(HttpServer.java:879)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
  INFO   | jvm 1| 2007/09/17 21:01:20 | at
  org.mortbay.http.SocketListener.handleConnection(SocketListener.java
 :218)
  INFO   | jvm 1| 2007/09/17 21:01:20

Re: Problemw ith site generation on continuum

2007-09-18 Thread Marco Mistroni
Emmanual,
   got no luck
Well let me explain what i did first, i might be doing something wrong

i started continuum with my username, and laucnhed a build (whic includes
the target site)

continuum generated the directory  site  in following place

opt/continuum-1.0.3
/apps/continuum/working-directory/2/target/site/cobertura/index.html

if i go there ((by browsing directories on linux file system)  and click on
index.html, then everything is working fine, i can see every report etc.

HOWEVER

if i try to look at the same directory via continuum (i can do by clicking
on my appplication, then click on 'Working Copy tab'...
(which will show the directory structure of my application, here's the URL
http://localhost:8080/continuum/servlet/continuum/target/WorkingCopy.vm/view/WorkingCopy/id/2
)

then i will see the same structure i see in th working-directory  dir under
continuum

from here (in the browser), if i drill down to index.html and then choose
for example  cobertura report i will get this URL from
browser

http://localhost:8080/continuum/servlet/browse?file=2/target/site/cobertura/index.html

and this will result in an exception displayed in the page

RequestURI=/continuum/servlet/frame-summary.html

so, yes the site gets generated properly, but i cannot see  it via continuum
console, that's all problem i got. i thought it was possible, probably i am
missing some settings.

could you give me some help?

thanks and regards
 marco







On 9/18/07, Marco Mistroni [EMAIL PROTECTED] wrote:

 hELLO,
 mm now that i think about it, mayb not as i have scheduled an automatic
 startup task in Linux..
 i will try to startup continuum from command line and launch a build to
 see what happens..

 i'll try and let youknow

 thanks and regards
  Marco






On 9/18/07, Emmanuel Venisse [EMAIL PROTECTED] wrote:
 
  I don't see why some reports works and not others.
  Continuum launch mvn lilke you do it from the command line.
 
  Do you use the same user to run continuum and the mvn command line?
 
  Emmanuel
 
  Marco Mistroni a écrit :
   hi all,
i have a simple mvn2 project that i decided to put on continuum
   i have configured continuum to run clean install and site targets
  
   problem is that when the site is generated, and i go to check the
  generated
   reports (By selecting working copy and drilling down to target/site
   directory), i have
   following results:
   - Surefire report works fine
   - CPD report works fine
   -PMD report works fine
  
   but Cobertura, Javadoc , Source Xref and TestSource Xref ends up with
  big
   exception like ClassNOtFoundException
   here's detail of exception
  
   INFO   | jvm 1| 2007/09/17 21:01:20 |
  javax.servlet.UnavailableException:
   java.lang.ClassNotFoundException: allclasses-frame.html
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   org.mortbay.jetty.servlet.Invoker.service(Invoker.java:154)
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   org.mortbay.jetty.servlet.ServletHolder.handle (ServletHolder.java
  :358)
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(
   WebApplicationHandler.java:294)
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java
  :567)
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   org.mortbay.jetty.servlet.WebApplicationContext.handle(
   WebApplicationContext.java:525)
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   org.mortbay.http.HttpContext.handle(HttpContext.java :1757)
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   org.mortbay.http.HttpServer.service(HttpServer.java:879)
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   org.mortbay.http.HttpConnection.service (HttpConnection.java:789)
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   org.mortbay.http.SocketListener.handleConnection(SocketListener.java
  :218)
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:331)
   INFO   | jvm 1| 2007/09/17 21:01:20 | at
   org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:520)
   INFO   | jvm 1| 2007/09/17 21:01:20 |
   INFO   | jvm 1| 2007/09/17 21:01:20 | 21:01:20.432 WARN!!
  Exception for
   /continuum/servlet/TestApp/package-summary.html
   INFO   | jvm 1| 2007/09/17 21:01:20 |
  javax.servlet.UnavailableException :
   java.lang.ClassNotFoundException: TestApp
   INFO   | jvm 1| 2007/09

Problemw ith site generation on continuum

2007-09-17 Thread Marco Mistroni
hi all,
 i have a simple mvn2 project that i decided to put on continuum
i have configured continuum to run clean install and site targets

problem is that when the site is generated, and i go to check the generated
reports (By selecting working copy and drilling down to target/site
directory), i have
following results:
- Surefire report works fine
- CPD report works fine
-PMD report works fine

but Cobertura, Javadoc , Source Xref and TestSource Xref ends up with big
exception like ClassNOtFoundException
here's detail of exception

INFO   | jvm 1| 2007/09/17 21:01:20 | javax.servlet.UnavailableException:
java.lang.ClassNotFoundException: allclasses-frame.html
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.jetty.servlet.Invoker.service(Invoker.java:154)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(
WebApplicationHandler.java:294)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.jetty.servlet.WebApplicationContext.handle(
WebApplicationContext.java:525)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.http.HttpServer.service(HttpServer.java:879)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:331)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:520)
INFO   | jvm 1| 2007/09/17 21:01:20 |
INFO   | jvm 1| 2007/09/17 21:01:20 | 21:01:20.432 WARN!! Exception for
/continuum/servlet/TestApp/package-summary.html
INFO   | jvm 1| 2007/09/17 21:01:20 | javax.servlet.UnavailableException:
java.lang.ClassNotFoundException: TestApp
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.jetty.servlet.Invoker.service(Invoker.java:154)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(
WebApplicationHandler.java:294)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.jetty.servlet.WebApplicationContext.handle(
WebApplicationContext.java:525)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.http.HttpServer.service(HttpServer.java:879)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:331)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:520)
INFO   | jvm 1| 2007/09/17 21:01:20 |
INFO   | jvm 1| 2007/09/17 21:01:20 | 21:01:20.873 WARN!! Exception for
/continuum/servlet/file=2/target/site/apidocs/index.html
INFO   | jvm 1| 2007/09/17 21:01:20 | javax.servlet.UnavailableException:
java.lang.ClassNotFoundException: file=2
INFO   | jvm 1| 2007/09/17 21:01:20 | at
org.mortbay.jetty.servlet.Invoker.service(Invoker.java:154)
INFO   | jvm 1| 2007/09/17 21:01:20 | at
javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
INFO   | jvm 1| 

how to configure continuum to trigger a build after a commit

2007-09-16 Thread Marco Mistroni
hi all,
 i have been running continuum since yesterday.. (i come from CControl
background)

somehow, i cannot trigger continuum todo a build when i do a commit in my
project.
only way to build projects is to force ab uild from the userinterface..

could anyone help me out? am i missing config parameters?

thank sin advance and regards
 marco


Re: how to configure continuum to trigger a build after a commit / ignore

2007-09-16 Thread Marco Mistroni
hello,
 i spoke too soon... continuum did a build hwile i was writing this
email
apologize for bothering

regards
 marco

On 9/16/07, Marco Mistroni [EMAIL PROTECTED] wrote:

 hi all,
  i have been running continuum since yesterday.. (i come from CControl
 background)

 somehow, i cannot trigger continuum todo a build when i do a commit in my
 project.
 only way to build projects is to force ab uild from the userinterface..

 could anyone help me out? am i missing config parameters?

 thank sin advance and regards
  marco



Re: Eclipse/Maven2 integration info

2007-09-15 Thread Marco Mistroni
Hello,


On 9/15/07, Carlos Sanchez [EMAIL PROTECTED] wrote:

 most of your steps can be done in Q4E by going to the New project
 wizard, Ne Maven 2 project, choose the archetype and fill in the
 blanks

 On 9/14/07, Alexander Sack [EMAIL PROTECTED] wrote:
  Hi Everybody:
 
  You know Eclipse/Maven2 integration at this point can be very confusing.
  You have three plugins, two of which are ECLIPSE plugins that integrate
  Maven2 while the other is a Maven2 plugin that happens to auto-generate
  files for Eclipse.  I wrote this below and I figured I would share to
 see if
  it helps anyone else.
 
  The main advantages of Codehaus and Q4E (which I plan to try very soon
 but I
  will assume it does similar things that Codehaus does) is that they
  integrate the POM dependency graph as part of your Eclipse project's
 Build
  Path, i.e. it autoupdates dependencies as you add them to the POM.  The
  maven-eclipse-plugin relies on creating a separate CLASSPATH CONTAINER
  variable referenced in your .classpath file to use your local maven2
  repository (the M2_REPO variable in the directions - btw this is typical
 for
  other plugins like the JBoss tools).  Unfortunately the latter is not as
  dynamic when it comes to adding and deleting dependencies in your
 project.
 
  Codehaus installs on 3.1.x and up (I've used it with 3.1.1 specifically
 and
  with 3.3 though for some reason its buggy under 3.3).
 
  What I do to setup a project is the following:
 
  - Use mvn archetype to setup the basic structure
  - Create a new Java project with Maven2 nature enabled
  - Import archetype directory structure into this project
  - Edit the Build Path within Eclipse
  - Use ant build file to execute mvn from within Eclipse
 
  Here is an example (I'm using Eclipse 3.1.1 w/Codehaus m2eclipse
 plugin):
 
  1) In some temporary directory
  mvn archetype:create -DgroupId=com.example.project-DartifactId=MyProject
  2) Edit pom.xml to packaging is pom, rm -rf the src directory
  3) Within MyProject use archetype plugin to create other modules which
 adds
  them to parent module, e.g.
 
  mvn archetype create -DgroupId=com.example.project -DartifactId=ejb3
  mvn archetype create -DgroupId=com.example.project -DartifactId=war
 
  This will create two sub modules, one for war, one for ejb3.  You can
 change
  the packaging to war and jar (or ejb) respectively.
 
  4) Now go into Eclipse and do a new project MyProject and import the
  MyProject you created above via Filesystem
  5) Enable Maven2 nature, now Maven2 dependencies will show up and
  dynamically change as you edit your POM hierarchy
  6) Edit Build Path in Project's properties and remove
 MyProject.  Instead
  add the ejb3/src/main/java and war/src/main/java source folders.
  7) Check Allow output folders for source folders
  8) Now I use a generic build.xml ANT file to execute Maven2 such as
 this:
 
  project name=MyProject default=all
  property environment=env/
  property file= build.properties/
 
  !-- Feel free to conditional this to execute the bat or shell
 depending
  on OS --
  property name=mvn value=${env.MAVEN_HOME}\bin\mvn.bat/
 
  target name=mvn
  exec dir=${basedir} executable=${mvn}
  arg line=-P${maven.profile.list} -
 Dmaven.test.skip=true${goal}/
  /exec
  /target
 
  target name=clean
  antcall target=mvn
  param name=goal value=clean/
  /antcall
  /target
 
  target name=process-resources
antcall target=mvn
  param name=goal value=process-resources/
 /antcall
  /target
 
  target name=compile
  antcall target=mvn
  param name=goal value=compile/
  /antcall
  /target
 
  target name=site
  antcall target=mvn
  param name=goal value=site/
  /antcall
  /target
 
  target name=all
  antcall target=package/
  /target
 
  target name=package
  antcall target=mvn
  param name=goal value=package/
  /antcall
  /target
 
  target name=install
  antcall target=mvn
  param name=goal value=install/
  /antcall
  /target
  /project
 
  Mine has some more stuff in it but you get the idea.
 
  9)  Now copy build.xml to Ant View and execute targets
  10) Remove the old MyProject you imported as now its part of your
 workspace
  (I guess you could have not imported it originally which is an extra
 step)
 
  I have NO idea if this is what others do but this works great for my
  builds.  I can build from the command line using ant (as well as allow
 ant
  to do some preprocessing that Maven2 might or might not be able to
  accomplish as easy) as well as build from Eclipse.  I have built several
  products this way without any issue (nightly builds use the command
 line,
  developers such as myself use Eclipse).
 
  Try ithope this helps a littleI will play with Q4E with Europa
  

Re: Eclipse/Maven2 integration info

2007-09-15 Thread Marco Mistroni
Hello,
 sorry to hijack this hteread.. but i have a questionr egarding mvn 
eclipse integration

somehow, even after i enable a maven project iva eclipse, the classpath in
eclipse is screwed up big time
i hav dfined a m2_repo variable, but still i am getting errors from all
import i do, like eclipse does not know
where to look for external packages i import (such as spring, log4j etc..)

i ws wondering how i can enable eclipse to have same classpath as maven.

any help would be appreciated

thanks and regards
  marco


On 9/15/07, Carlos Sanchez [EMAIL PROTECTED] wrote:

 most of your steps can be done in Q4E by going to the New project
 wizard, Ne Maven 2 project, choose the archetype and fill in the
 blanks

 On 9/14/07, Alexander Sack [EMAIL PROTECTED] wrote:
  Hi Everybody:
 
  You know Eclipse/Maven2 integration at this point can be very confusing.
  You have three plugins, two of which are ECLIPSE plugins that integrate
  Maven2 while the other is a Maven2 plugin that happens to auto-generate
  files for Eclipse.  I wrote this below and I figured I would share to
 see if
  it helps anyone else.
 
  The main advantages of Codehaus and Q4E (which I plan to try very soon
 but I
  will assume it does similar things that Codehaus does) is that they
  integrate the POM dependency graph as part of your Eclipse project's
 Build
  Path, i.e. it autoupdates dependencies as you add them to the POM.  The
  maven-eclipse-plugin relies on creating a separate CLASSPATH CONTAINER
  variable referenced in your .classpath file to use your local maven2
  repository (the M2_REPO variable in the directions - btw this is typical
 for
  other plugins like the JBoss tools).  Unfortunately the latter is not as
  dynamic when it comes to adding and deleting dependencies in your
 project.
 
  Codehaus installs on 3.1.x and up (I've used it with 3.1.1 specifically
 and
  with 3.3 though for some reason its buggy under 3.3).
 
  What I do to setup a project is the following:
 
  - Use mvn archetype to setup the basic structure
  - Create a new Java project with Maven2 nature enabled
  - Import archetype directory structure into this project
  - Edit the Build Path within Eclipse
  - Use ant build file to execute mvn from within Eclipse
 
  Here is an example (I'm using Eclipse 3.1.1 w/Codehaus m2eclipse
 plugin):
 
  1) In some temporary directory
  mvn archetype:create -DgroupId=com.example.project-DartifactId=MyProject
  2) Edit pom.xml to packaging is pom, rm -rf the src directory
  3) Within MyProject use archetype plugin to create other modules which
 adds
  them to parent module, e.g.
 
  mvn archetype create -DgroupId=com.example.project -DartifactId=ejb3
  mvn archetype create -DgroupId=com.example.project -DartifactId=war
 
  This will create two sub modules, one for war, one for ejb3.  You can
 change
  the packaging to war and jar (or ejb) respectively.
 
  4) Now go into Eclipse and do a new project MyProject and import the
  MyProject you created above via Filesystem
  5) Enable Maven2 nature, now Maven2 dependencies will show up and
  dynamically change as you edit your POM hierarchy
  6) Edit Build Path in Project's properties and remove
 MyProject.  Instead
  add the ejb3/src/main/java and war/src/main/java source folders.
  7) Check Allow output folders for source folders
  8) Now I use a generic build.xml ANT file to execute Maven2 such as
 this:
 
  project name=MyProject default=all
  property environment=env/
  property file= build.properties/
 
  !-- Feel free to conditional this to execute the bat or shell
 depending
  on OS --
  property name=mvn value=${env.MAVEN_HOME}\bin\mvn.bat/
 
  target name=mvn
  exec dir=${basedir} executable=${mvn}
  arg line=-P${maven.profile.list} -
 Dmaven.test.skip=true${goal}/
  /exec
  /target
 
  target name=clean
  antcall target=mvn
  param name=goal value=clean/
  /antcall
  /target
 
  target name=process-resources
antcall target=mvn
  param name=goal value=process-resources/
 /antcall
  /target
 
  target name=compile
  antcall target=mvn
  param name=goal value=compile/
  /antcall
  /target
 
  target name=site
  antcall target=mvn
  param name=goal value=site/
  /antcall
  /target
 
  target name=all
  antcall target=package/
  /target
 
  target name=package
  antcall target=mvn
  param name=goal value=package/
  /antcall
  /target
 
  target name=install
  antcall target=mvn
  param name=goal value=install/
  /antcall
  /target
  /project
 
  Mine has some more stuff in it but you get the idea.
 
  9)  Now copy build.xml to Ant View and execute targets
  10) Remove the old MyProject you imported as now its part of your
 workspace
  (I guess you could have not imported it originally 

maven2 / continuum / scm URL frustration

2007-09-15 Thread Marco Mistroni
hello all,
  i am having huge troubles to setting up my mvn2 project for continuum..
i have following scm 'settings' in my pom.xml

scm
connection
scm:svn:svn//localhost/trunk/
/connection
developerConnection
scm:svn:svn://localhost/trunk/
/developerConnection
  /scm

and i have svn running on my Linux machine at following url  svn://localhost

my project is at following svn URL

svn://localhost/trunk/TestApp

i have tried following URL
scm:svn:svn//localhost/trunk/
scm:svn:svn//localhost/trunk/TestApp

and when i validate it using mvn scm:validate i always get back following
exception

[DEBUG] Configuring mojo '
org.apache.maven.plugins:maven-scm-plugin:1.0:validate' --
[DEBUG]   (f) basedir = /home/marco/TestApp
[DEBUG]   (f) connectionType = connection
[DEBUG]   (s) connectionUrl = scm:svn://localhost/trunk/TestApp
[DEBUG]   (f) developerConnectionUrl = scm:svn://localhost/trunk/TestApp
[DEBUG]   (f) scmConnection = scm:svn://localhost/trunk/TestApp
[DEBUG]   (f) scmDeveloperConnection = scm:svn://localhost/trunk/TestApp
[DEBUG]   (f) settings = [EMAIL PROTECTED]

  scm
connectionscm:svn://localhost/trunk/TestApp/connection

developerConnectionscm:svn://localhost/trunk/TestApp/developerConnection
  /scm



could anybody tell me what would be a proper URL if i have subversin running
at svn://localhost?

thanx and regards
  Marco


Re: xdoclet maven plugin: Ambiguous subtask definition exception

2007-09-06 Thread Marco Mistroni
Hello,
 i had.. long time ago while i was trying to do exactly the same thing.
Resorted to use xdoclet in one project, and to call xdocket from maven
antrun plugin in the other

not elegant, but was theonly solution i found

hth
 marco

On 9/6/07, Brian Smith [EMAIL PROTECTED] wrote:

 I'm getting an error (Ambiguous subtask definition exception) while trying
 to run Maven from the top directory of a multi-module project that
 contains
 both EJBs and web apps.  I've seen that this has been reported before and
 that a bug was created and has been closed (
 http://jira.codehaus.org/browse/MOJO-223).  Supposedly this is an xdoclet
 issue.

 Has anyone ran into this lately and found a way to work around this?  The
 solution on the bug report won't work because it says the plugin doesn't
 exist.  Also, are other developers not relying on a tool (xdoclet or
 ejbgen
 or ??) to create descriptors?

 Thanks,
 Brian



Re: Maven Hibernate Plugin with Maven2

2007-09-02 Thread Marco Mistroni
David,
 i havent followed htis thread sorry,but  if your goal is to pre-create
tables for your tests, you might want to set the
hibernate.ddl.auto=create/update property... ,
if your goal is to generate hbm.xml files, you might want to have a look at
xd2 mvn2 plugin...

hth
 marco

On/1/07, David Williams [EMAIL PROTECTED] wrote:

 Thanks Tim.  I will.

 David

 On 9/1/07, Tim Kettler [EMAIL PROTECTED] wrote:
 
  You are right, the plugin website seems to be out of date. Have you
  looked at the hbm2ddl goal?
 
  You should ask specific questions about the plugin on the mojo-user list
  [1].
 
  -Tim
 
  [1] http://mojo.codehaus.org/mail-lists.html
 
  David Williams schrieb:
   Thanks Tim!!!  I tried to use the plugin but the schema-export goal
  doesn't
   exist in the 2.0-alpha-2.jar.  Do you have any suggestions?  In the
  meantime
   I'll look at the XDoclet plugin.
  
   Thanks,
  
   David
  
   On 8/31/07, Tim Kettler [EMAIL PROTECTED] wrote:
   Hi,
  
   here's the Maven2 plugin [1].
  
   -Tim
  
   [1]
 http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/
  
   David Williams schrieb:
   Hi Everyone,
  
   Is it possible to use the maven hibernate plugin with Maven2?  Is
  there
   a
   replacement for this Maven1 plugin?
  
   Thanks,
  
   David
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



JMock 2

2007-09-01 Thread Marco Mistroni
hello all,
 does anyone know if jmock2 has been uploaded in some maven2 repositories?

thanks and regards
   Marco


problem when generating one-to-many associations wiht xd2 mvn2 plugin

2007-08-26 Thread Marco Mistroni
hi all,
 i am using xd2 mvn2 plugin to generate xdoclet files... but it looks like
it is falling short when i am using associations..

here is the class that is failing...
code:

package com.mm.backend.model;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @hibernate.class table=ENTRYTYPES
 * @hibernate.discriminator column=discriminator
 *
 */


public class AbstractEntryType  {
protected String description;
protected Long id;
protected String discriminator;
protected Integer version;
protected List entries =
new ArrayList();


/**
 * @hibernate.property
 * @return entry type description
 */
public String getDescription() {
// TODO Auto-generated method stub
return description;
}

/**
 * @hibernate.property column=discriminator
 * insert=false
 * update=false
 */
public String getDiscriminator() {
return discriminator;
}

/**
 * @hibernate.id column=id
 * generator-class=increment
 * unsaved-value=-1
 */
public Long getId() {
// TODO Auto-generated method stub
return id;
}


/**
 * @hibernate.version
 * unsaved-value=null
 * @return
 */
public Integer getVersion() {
return version;
}


public void setDescription(String description) {
// TODO Auto-generated method stub
this.description = description;
}


public void setDiscriminator(String discriminator) {
this.discriminator = discriminator;
}

public void setId(Long id) {
this.id = id;
}

public void setVersion(Integer version) {
this.version = version;
}

/**
 * @hibernate.list cascade=save-update
 * @hibernate.collection-one-to-many class=
com.mm.backend.model.AbstractBudgetEntry
 * @hibernate.collection-key column=FK_ENTRY_ID
 * @return
 */
public List getEntries() {
return entries;
}

public void setEntries(List entries) {
this.entries = entries;
}


/** common methods ***/
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof AbstractEntryType)) return false;

final AbstractEntryType item = (AbstractEntryType) o;

if (! (id == item.getId()) ) return false;

return true;
}

public int hashCode() {
int result;
result = 29 * description.hashCode() + id.intValue() +
version.hashCode();
return result;
}

public String toString() {
return  id (' + getId() + '),  +
Desc: ' + getDescription();
}

public int compareTo(Object o) {
if (o instanceof AbstractEntryType) {
// Don't compare Date objects! Use the time in milliseconds!
return String.valueOf(id).compareTo(
String.valueOf(
((AbstractEntryType)o).getId()));
}
return 0;
}


}


and here's the hbm.xml file that gets generated

hibernate-mapping
−
class table=ENTRYTYPES name=com.mm.backend.model.AbstractEntryType
−
id unsaved-value=-1 name=id column=id
generator class=increment/
/id
discriminator column=discriminator/
version unsaved-value=null name=version/
property name=description/
property name=discriminator column=discriminator update=false
insert=false/
−
list cascade=save-update name=entries
key/
/list
subclass name=com.mm.backend.model.ExpenseType
discriminator-value=Expense/
subclass name=com.mm.backend.model.SavingsType
discriminator-value=Savings/
/class
/hibernate-mapping

somehow the key is not getting populated... so in the output i got this :

[INFO] XDoclet plugin failed:
   Line: 15 Column: 12
   Message: The content of element type list is incomplete, it must match
(me
ta*,subselect?,cache?,synchronize*,comment?,key,(index|list-index),(element|one-
to-many|many-to-many|composite-element|many-to-any),loader?,sql-insert?,sql-upda
te?,sql-delete?,sql-delete-all?,filter*).

[INFO]

[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: XDoclet plugin
failed:
   Line: 15 Column: 12
   Message: The content of element type list is incomplete, it must match
(me
ta*,subselect?,cache?,synchronize*,comment?,key,(index|list-index),(element|one-
to-many|many-to-many|composite-element|many-to-any),loader?,sql-insert?,sql-upda
te?,sql-delete?,sql-delete-all?,filter*).
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:564)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(
DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau

what triggers the inclusion of ehcache-1.1.jar in my war fil?

2007-07-15 Thread Marco Mistroni

hi all,
i have a webapp built on top of two projects,  a backend projet which uses
spring and hibernate, and
a webproject done using webwork which uses backend to connect to the
database...

somehow, in my web-inf\lib  directory an ehcache-1.1.jar is included, and i
cannot find out why
it gets included, or which dependency triggers its inclusion..
the problem i am having is that i plan to use acegisecurity in my app, and
acegi requires ehcache-1.2.3..
so i will end up having two versions of ehcache which will make my app blow
up at runtime

if anyone has experienced this, could you pls tell me which is the
dependency that triggers the inclusion
of ehcache-1.1?

here's are my dependencies of both projects..

*** backend 
dependencies
   dependency
 groupIdjunit/groupId
 artifactIdjunit/artifactId
   /dependency
   dependency
 groupIdcommons-logging/groupId
 artifactIdcommons-logging/artifactId
 version1.1/version
   /dependency
   dependency
 groupIdorg.springframework/groupId
 artifactIdspring/artifactId
   /dependency
   dependency
 groupIdhibernate/groupId
 artifactIdhibernate/artifactId
 version3.1rc2/version
   /dependency
   dependency
 groupIdspringframework/groupId
 artifactIdspring-mock/artifactId
   /dependency
   dependency
  groupIdgeronimo-spec/groupId
  artifactIdgeronimo-spec-j2ee-jacc/artifactId
  version1.0-rc1/version
   /dependency
   dependency
  groupIdjavax.mail/groupId
  artifactIdmail/artifactId
  version1.4/version
   /dependency

   dependency
groupIdhsqldb/groupId
artifactIdhsqldb/artifactId
version1.8.0.4/version
   /dependency

   dependency
groupIddbunit/groupId
artifactIddbunit/artifactId
version2.1/version
   /dependency


 /dependencies

 webwork *
dependencies
   dependency
 groupIdjunit/groupId
 artifactIdjunit/artifactId
   /dependency
   dependency
 groupIdopensymphony/groupId
 artifactIdwebwork/artifactId
 version2.2.5/version
   /dependency
   dependency
 groupIdopensymphony/groupId
 artifactIdsitemesh/artifactId
 version2.3/version
   /dependency
   dependency
 groupIdlog4j/groupId
 artifactIdlog4j/artifactId
   /dependency
   dependency
 groupIdjavax.servlet/groupId
 artifactIdservlet-api/artifactId
 version2.4/version
 scopeprovided/scope
   /dependency
   dependency
 groupIdorg.springframework/groupId
 artifactIdspring/artifactId
   /dependency
   dependency
 groupIdspringframework/groupId
 artifactIdspring-mock/artifactId
   /dependency
   dependency
 groupIdcommons-logging/groupId
 artifactIdcommons-logging/artifactId
 version1.0.3/version
   /dependency
   dependency
 groupIdcommons-lang/groupId
 artifactIdcommons-lang/artifactId
 version2.3/version
   /dependency

   dependency
 groupIdcommons-collections/groupId
 artifactIdcommons-collections/artifactId
 version3.0/version
   /dependency
   dependency
 groupIdcommons-beanutils/groupId
 artifactIdcommons-beanutils/artifactId
 version1.7.0/version
   /dependency

   dependency
 groupIdjstl/groupId
 artifactIdjstl/artifactId
 version1.1.2/version
   /dependency
   dependency
 groupIdtaglibs/groupId
 artifactIdstandard/artifactId
 version1.1.2/version
   /dependency
   dependency
 groupIdfreemarker/groupId
 artifactIdfreemarker/artifactId
 version2.3.9/version
   /dependency
   dependency
 groupIdvelocity/groupId
 artifactIdvelocity/artifactId
 version1.4-rc1/version
   /dependency
   dependency
 groupIdvelocity-tools/groupId
 artifactIdvelocity-tools/artifactId
 version1.2/version
   /dependency
   dependency
 groupIdvelocity-tools/groupId
 artifactIdvelocity-tools-view/artifactId
 version1.2/version
   /dependency
   dependency
 groupIdvelocity/groupId
 artifactIdvelocity/artifactId
 version1.4/version
   /dependency
   dependency
 groupIdjmock/groupId
 artifactIdjmock/artifactId
 version1.2.0/version
   /dependency
   dependency
 groupIdWebWork/groupId
 artifactIdWebWorkBackend/artifactId
 version1.0-SNAPSHOT/version
 scopecompile/scope
   /dependency
   dependency
 groupIddwr/groupId
 artifactIddwr/artifactId
 version2.0/version
   /dependency
   dependency
 groupIdajaxtags/groupId
 artifactIdajaxtags/artifactId
 version1.3-beta-rc4/version
/dependency
dependency
 groupIdjericho-html/groupId
 artifactIdjericho-html/artifactId
 version2.4/version
/dependency


thanks in advance and regards
marco


Re: problems with mvn2, Spring and Hibernate... anyone could help?

2007-07-13 Thread Marco Mistroni

thanx johann!
i'll try it out!

regards
marco

On 7/13/07, Johann Reyes [EMAIL PROTECTED] wrote:


Hello Marco

I had a problem like that too, overloaded the class to, but didn't like
the
result of it. At then I came up with the following:

* For each project have a hibernate.cfg.xml file that holds reference to
your hibernate classes.

* in your Sring config file have the following:

  bean id=sessionFactory class=
org.springframework.orm.hibernate3.LocalSessionFactoryBean
property name=configLocation value=classpath:hibernate.cfg.xml/
property name=configLocations value=classpath*:hibernate.cfg.xml
/

That would work with your local classpath as well with your jars,
including
test phases

Regards

Johann Reyes

On 7/6/07, Marco Mistroni [EMAIL PROTECTED] wrote:

 Hi Trevor,
 thanks... that would work
 unfortunately my app is splitted in two jars, one for backend and
another
 for
 webapp.
 everythign works fine at the junit level for the backend, but once code
 runs
 in app server ,  where the webapp jar is calling the backend jar for
 interactign with db.. code fails..
 my best option now is to override LocalSessionFactoryBean.. i found
 a sample ont henet, i am going to try and post results..

 thanks and regards
 marco

 On 7/6/07, Trevor Torrez [EMAIL PROTECTED] wrote:
 
  The problem is with the ability of the JVM to enumerate resources in
  the root of the classpath when these resources are in jars.  The
  mappingJarLocations property would be used to search through jars that
  are *not* normally on the classpath, so you shouldn't be using that
  for WEB-INF/lib jars; in some cases you would cause hibernate to read
  the mapping files twice, once for the jar on the classpath, and once
  for the jar in the mappingJarLocations -- they just happen to be the
  same physical jar.
 
  The best fix is to create all the hbm.xml files in a subpackage of
  src/main/resources -- perhaps com/project/domain; then use a
  resource pattern like classpath*:/com/project/domain/**/*.hbm.xml.
 
 
  On 7/5/07, Marco Mistroni [EMAIL PROTECTED] wrote:
   Hello Jon
 actually it has nothing to do with maven, as i discovered later..
  since
   scope=compile will be visible in the test
   it has to do with Spring classloading actually.. i'll post a
solution
  here
   as soon as i finish to try some code i found on
   the web
  
   with kindest regards
marco
  
   On 7/5/07, Jon SlinnHawkins [EMAIL PROTECTED] wrote:
   
I think this may be a problem with Surefire and the way spring
uses
classloaders :
   
   
   
 

http://jira.codehaus.org/browse/SUREFIRE-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
   
If you find a solution please post
   
Thanks
   
   
Marco Mistroni wrote:
 hi all,
 i know i should post this to maven list but it is about spring
and
 i
  am
 sure someone here is using maven for building its environment

 I have an app composed of 3 project:
 - domain OBjects  , contains domain objects used by web and
 backend
project
 - backend project contains hibernate code
 - webapp contains webwork code that uses hibernate to access
  database

 i have been searching for solutions for not hardcoding hibernate
  mapping
 files.. i came across mappingJarLocations where you can specify
 jars
where
 hbm.xml file are located.
 this is fine, however i am building my project using maven2 and
i
 am
 setting
 the dependency scope for domainObjects.jar on my backend
project..
 if i use
 scopetest/scope

 test will fail because spring won't be able to find hbm.xml file
  (jar is
 not
 in classpath)

 if  i use
 scopecompile/scope

 jar won't be in test classpath
 i was wondering if anyone on this forum came across same
  situation...

 here's my spring context...

 bean id=sessionFactory class=
 org.springframework.orm.hibernate3.LocalSessionFactoryBean
property name=dataSource
ref bean=dataSource/
/property
property name=mappingJarLocations
valueclasspath*:domainObjects-1.0-SNAPSHOT.jar
 /value
/property
property name=hibernateProperties
 ref bean=exampleHibernateProperties /
/property
/bean




 thanks in advancea nd regards
 marco

   
   
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 




Re: problems with mvn2, Spring and Hibernate... anyone could help?

2007-07-06 Thread Marco Mistroni

Hi Trevor,
thanks... that would work
unfortunately my app is splitted in two jars, one for backend and another
for
webapp.
everythign works fine at the junit level for the backend, but once code runs
in app server ,  where the webapp jar is calling the backend jar for
interactign with db.. code fails..
my best option now is to override LocalSessionFactoryBean.. i found
a sample ont henet, i am going to try and post results..

thanks and regards
marco

On 7/6/07, Trevor Torrez [EMAIL PROTECTED] wrote:


The problem is with the ability of the JVM to enumerate resources in
the root of the classpath when these resources are in jars.  The
mappingJarLocations property would be used to search through jars that
are *not* normally on the classpath, so you shouldn't be using that
for WEB-INF/lib jars; in some cases you would cause hibernate to read
the mapping files twice, once for the jar on the classpath, and once
for the jar in the mappingJarLocations -- they just happen to be the
same physical jar.

The best fix is to create all the hbm.xml files in a subpackage of
src/main/resources -- perhaps com/project/domain; then use a
resource pattern like classpath*:/com/project/domain/**/*.hbm.xml.


On 7/5/07, Marco Mistroni [EMAIL PROTECTED] wrote:
 Hello Jon
   actually it has nothing to do with maven, as i discovered later..
since
 scope=compile will be visible in the test
 it has to do with Spring classloading actually.. i'll post a solution
here
 as soon as i finish to try some code i found on
 the web

 with kindest regards
  marco

 On 7/5/07, Jon SlinnHawkins [EMAIL PROTECTED] wrote:
 
  I think this may be a problem with Surefire and the way spring uses
  classloaders :
 
 
 
http://jira.codehaus.org/browse/SUREFIRE-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
 
  If you find a solution please post
 
  Thanks
 
 
  Marco Mistroni wrote:
   hi all,
   i know i should post this to maven list but it is about spring and i
am
   sure someone here is using maven for building its environment
  
   I have an app composed of 3 project:
   - domain OBjects  , contains domain objects used by web and backend
  project
   - backend project contains hibernate code
   - webapp contains webwork code that uses hibernate to access
database
  
   i have been searching for solutions for not hardcoding hibernate
mapping
   files.. i came across mappingJarLocations where you can specify jars
  where
   hbm.xml file are located.
   this is fine, however i am building my project using maven2 and i am
   setting
   the dependency scope for domainObjects.jar on my backend project..
   if i use
   scopetest/scope
  
   test will fail because spring won't be able to find hbm.xml file
(jar is
   not
   in classpath)
  
   if  i use
   scopecompile/scope
  
   jar won't be in test classpath
   i was wondering if anyone on this forum came across same
situation...
  
   here's my spring context...
  
   bean id=sessionFactory class=
   org.springframework.orm.hibernate3.LocalSessionFactoryBean
  property name=dataSource
  ref bean=dataSource/
  /property
  property name=mappingJarLocations
  valueclasspath*:domainObjects-1.0-SNAPSHOT.jar/value
  /property
  property name=hibernateProperties
   ref bean=exampleHibernateProperties /
  /property
  /bean
  
  
  
  
   thanks in advancea nd regards
   marco
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: problems with mvn2, Spring and Hibernate... anyone could help?

2007-07-05 Thread Marco Mistroni

Hello Jon
 actually it has nothing to do with maven, as i discovered later.. since
scope=compile will be visible in the test
it has to do with Spring classloading actually.. i'll post a solution here
as soon as i finish to try some code i found on
the web

with kindest regards
marco

On 7/5/07, Jon SlinnHawkins [EMAIL PROTECTED] wrote:


I think this may be a problem with Surefire and the way spring uses
classloaders :


http://jira.codehaus.org/browse/SUREFIRE-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel

If you find a solution please post

Thanks


Marco Mistroni wrote:
 hi all,
 i know i should post this to maven list but it is about spring and i am
 sure someone here is using maven for building its environment

 I have an app composed of 3 project:
 - domain OBjects  , contains domain objects used by web and backend
project
 - backend project contains hibernate code
 - webapp contains webwork code that uses hibernate to access database

 i have been searching for solutions for not hardcoding hibernate mapping
 files.. i came across mappingJarLocations where you can specify jars
where
 hbm.xml file are located.
 this is fine, however i am building my project using maven2 and i am
 setting
 the dependency scope for domainObjects.jar on my backend project..
 if i use
 scopetest/scope

 test will fail because spring won't be able to find hbm.xml file (jar is
 not
 in classpath)

 if  i use
 scopecompile/scope

 jar won't be in test classpath
 i was wondering if anyone on this forum came across same situation...

 here's my spring context...

 bean id=sessionFactory class=
 org.springframework.orm.hibernate3.LocalSessionFactoryBean
property name=dataSource
ref bean=dataSource/
/property
property name=mappingJarLocations
valueclasspath*:domainObjects-1.0-SNAPSHOT.jar/value
/property
property name=hibernateProperties
 ref bean=exampleHibernateProperties /
/property
/bean




 thanks in advancea nd regards
 marco



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




problems with mvn2, Spring and Hibernate... anyone could help?

2007-07-04 Thread Marco Mistroni

hi all,
i know i should post this to maven list but it is about spring and i am
sure someone here is using maven for building its environment

I have an app composed of 3 project:
- domain OBjects  , contains domain objects used by web and backend project
- backend project contains hibernate code
- webapp contains webwork code that uses hibernate to access database

i have been searching for solutions for not hardcoding hibernate mapping
files.. i came across mappingJarLocations where you can specify jars where
hbm.xml file are located.
this is fine, however i am building my project using maven2 and i am setting
the dependency scope for domainObjects.jar on my backend project..
if i use
scopetest/scope

test will fail because spring won't be able to find hbm.xml file (jar is not
in classpath)

if  i use
scopecompile/scope

jar won't be in test classpath
i was wondering if anyone on this forum came across same situation...

here's my spring context...

bean id=sessionFactory class=
org.springframework.orm.hibernate3.LocalSessionFactoryBean
   property name=dataSource
   ref bean=dataSource/
   /property
   property name=mappingJarLocations
   valueclasspath*:domainObjects-1.0-SNAPSHOT.jar/value
   /property
   property name=hibernateProperties
ref bean=exampleHibernateProperties /
   /property
   /bean




thanks in advancea nd regards
marco


Re: help with Cobertura

2007-07-03 Thread Marco Mistroni

Hello Paul,
thanks for advice.. still i got it failing.
as of report, i have 100% code coverage for my tests, but when i run
cobertura as part
of mvn clean install, it errors with following message:

Cobertura: Saved information on 14 classes.
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[echo] ...Deleting stale web.xml ...
[INFO] Executed tasks
[INFO] [cobertura:check {execution: check}]
[INFO] Cobertura 1.7 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 14 classes.

[ERROR] Project failed check. Total branch coverage rate of 60.0% is below
80.0%
Project failed check. Total line coverage rate of 43.6% is below 80.0%


i am now wondering if i am missing something in my pom.xml ..

plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdcobertura-maven-plugin/artifactId
   version2.0/version
   configuration
 check
   totalLineRate80/totalLineRate
   totalBranchRate80/totalBranchRate
 /check
   /configuration
   executions
  execution
   idclean/id
   goals
 goalclean/goal
   /goals
 /execution
 execution
   idcheck/id
   goals
 goalcheck/goal
   /goals
 /execution
   /executions
 /plugin

i was also wondering if anyone is using cobertura this way (as part of
build) or everyone is using
it as part of report..
it would be nice if i can make it part of build so taht it blocks creation
of jar/war if there's not enough coverage, however
i am beginning to wonder if the original intent of cobertura was just for a
report...

thanks and regards
marco


On 7/2/07, Paul Spencer [EMAIL PROTECTED] wrote:


Marco,
You may be seeing the bug MCOBERTURA-61[1] in 2.1.  I use 2.0 for that
reason.  As to the test running twice, I see this also.

vaul Spencer

[1]http://jira.codehaus.org/browse/MCOBERTURA-61

Marco Mistroni wrote:
 hi all,
 in my mvn2 webapp i am currently using Cobertura under the 'report'
 section, to get a  test coverage report when i build the site.
 However, i woudl like to apply cobertura also to my build, so that mvn
wont
 build anything until i have tested at least, let's say, 80% of my
code..(i
 normally
 do TDD, but i just want also maven to force me to do TDD in case i
 forget :)

 the problem is that, when i run it as part of my build ,  i keep on
getting
 following exception

 INFO] Cobertura 1.8 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
 Cobertura: Loaded information on 14 classes.
 [cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
 com.mm.webwork.HelloWorldIntro, line coverage rate: 0.0%, branch
coverage
 rate: 100.0%
 [cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
 com.mm.testbean.TestManager, line coverage rate: 100.0%, branch coverage
 rate: 100.0%
 [cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
 com.mm.webwork.jobapp.JobAppRedirect, line coverage rate: 0.0%, branch
 coverage rate: 100.0%
 [cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
 com.mm.webwork.agencies.AgencyView, line coverage rate: 0.0%, branch
 coverage rate: 0.0%
 [cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
 com.mm.webwork.agencies.AgencyUpdate, line coverage rate: 0.0%, branch
 coverage rate: 0.0%
 [cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
 com.mm.webwork.agencies.AgencyRedirect, line coverage rate: 0.0%, branch
 coverage rate: 100.0%
 [cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
 com.mm.webwork.constants.Constants, line coverage rate: 0.0%, branch
 coverage rate: 100.0%
 [cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
 com.mm.webwork.jobapp.JobApplicationUpdate, line coverage rate: 0.0%,
 branch
 coverage rate: 0.0%
 [cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
 com.mm.webwork.HelloWorld, line coverage rate: 0.0%, branch coverage
rate:
 100.0%
 [cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
 WebWorkApp.App, line coverage rate: 0.0%, branch coverage rate: 100.0%
 [cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
 com.mm.testbean.TestManagerImpl, line coverage rate: 0.0%, branch
coverage
 rate: 100.0%[cobertura] DEBUG [main]
net.sourceforge.cobertura.check.Main -
 Class com.mm.webwork.login.Login, line coverage rate: 0.0%, branch
coverage
 rate: 100.0%
 [cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
 com.mm.webwork.jobapp.SearchJobApplication, line coverage rate: 0.0%,
 branch
 coverage rate: 0.0%
 [cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
 com.mm.webwork.agencies.SearchAgency, line coverage rate: 0.0%, branch
 coverage rate: 0.0%

 [DEBUG] 
 [DEBUG] 
 [DEBUG]  Standard error from the Cobertura task:
 [DEBUG] 
 [ERROR] Project

help with Cobertura

2007-07-02 Thread Marco Mistroni

hi all,
in my mvn2 webapp i am currently using Cobertura under the 'report'
section, to get a  test coverage report when i build the site.
However, i woudl like to apply cobertura also to my build, so that mvn wont
build anything until i have tested at least, let's say, 80% of my code..(i
normally
do TDD, but i just want also maven to force me to do TDD in case i forget :)

the problem is that, when i run it as part of my build ,  i keep on getting
following exception

INFO] Cobertura 1.8 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 14 classes.
[cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
com.mm.webwork.HelloWorldIntro, line coverage rate: 0.0%, branch coverage
rate: 100.0%
[cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
com.mm.testbean.TestManager, line coverage rate: 100.0%, branch coverage
rate: 100.0%
[cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
com.mm.webwork.jobapp.JobAppRedirect, line coverage rate: 0.0%, branch
coverage rate: 100.0%
[cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
com.mm.webwork.agencies.AgencyView, line coverage rate: 0.0%, branch
coverage rate: 0.0%
[cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
com.mm.webwork.agencies.AgencyUpdate, line coverage rate: 0.0%, branch
coverage rate: 0.0%
[cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
com.mm.webwork.agencies.AgencyRedirect, line coverage rate: 0.0%, branch
coverage rate: 100.0%
[cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
com.mm.webwork.constants.Constants, line coverage rate: 0.0%, branch
coverage rate: 100.0%
[cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
com.mm.webwork.jobapp.JobApplicationUpdate, line coverage rate: 0.0%, branch
coverage rate: 0.0%
[cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
com.mm.webwork.HelloWorld, line coverage rate: 0.0%, branch coverage rate:
100.0%
[cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
WebWorkApp.App, line coverage rate: 0.0%, branch coverage rate: 100.0%
[cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
com.mm.testbean.TestManagerImpl, line coverage rate: 0.0%, branch coverage
rate: 100.0%[cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main -
Class com.mm.webwork.login.Login, line coverage rate: 0.0%, branch coverage
rate: 100.0%
[cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
com.mm.webwork.jobapp.SearchJobApplication, line coverage rate: 0.0%, branch
coverage rate: 0.0%
[cobertura] DEBUG [main] net.sourceforge.cobertura.check.Main - Class
com.mm.webwork.agencies.SearchAgency, line coverage rate: 0.0%, branch
coverage rate: 0.0%

[DEBUG] 
[DEBUG] 
[DEBUG]  Standard error from the Cobertura task:
[DEBUG] 
[ERROR] Project failed check. Total branch coverage rate of 0.0% is below
80.0%
Project failed check. Total line coverage rate of 0.0% is below 80.0%

[DEBUG] 
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Coverage check failed. See messages above.
[INFO]

[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Coverage check
failed. See messages above.
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:564)
   at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleExecutor.java:480)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:459)
   at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:311)
   at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:143)
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
   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:585)
   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

Spring/Hibernate/ maven / unexpected error.. when using flat layout for parent projects

2007-05-17 Thread Marco Mistroni

hi all,
 i have a project with this structure

|_WebWorkMain
| WebWorkBackend
| WebWorkWebApp

in WebWorkBackend i have hibernate code (mappings generated via xdoclet
etc)..


WebWorkMain is the parent project, which has been laid out like that for
Eclipse.

whenever i run mvn test from WebWork  Backend, they all succeed

whenever i run mvn clean test from WebWorkMain they all fails as hibernate
cannot find .hbm.xml files in the classpath

weird enough, if i setup the project with WebWorkMain as parent directory of
WEbWorkBackend and WebWorkWebApp (in an hierarchical structure)
everything works fine

i was wondering if anyone else has found same issue and how he/she  fixed
it..

with kindest regards
marco


Re: Maven2 + XDoclet + JBoss (JBossWS)

2007-04-20 Thread Marco Mistroni

HI,
 in the maven wiki page i have posted an example of using mvn2, xdoclet, 
jbossws
it's here

http://docs.codehaus.org/display/MAVENUSER/Examples

pls have a look, it might be that you have specified an incorrect name in
your xdoclet tags

hth
marco




On 4/18/07, Schludi [EMAIL PROTECTED] wrote:



Hello, I have the following problem since 2 weeks, hope someone can help
me,
i've tried to ask in much other forums before:
I am new to maven and have to refactor an old project for JBossWS, which
was
deployed on Tomcat before. The maven-script (or ejbdoclet) currently don't
generate the *Endpoint-Classes.

I get the following error:


Generating EJB deployment descriptor (ejb-jar.xml).
[INFO] Executed tasks
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 3 source files to
C:\dev\helloMaven\FirstEJB-ejb\target\classe

[INFO] [antrun:run {execution: antTask}]
[INFO] Executing tasks
 [echo] ** Running jboss ws **
log4j:WARN No appenders could be found for logger
(org.jboss.ws.tools.WSTools).
log4j:WARN Please initialize the log4j system properly.
org.jboss.ws.WSException: Endpoint org.bbmag.test.StatlessEJBEndpoint ca
not be loaded
at
org.jboss.ws.tools.helpers.ToolsHelper.handleJavaToWSDLGeneration(To
lsHelper.java:113)
at org.jboss.ws.tools.WSTools.process(WSTools.java:132)
at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
at org.jboss.ws.tools.ant.wstools.execute(wstools.java:103)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at
org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(Abstract
ntMojo.java:108)
at
org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83

at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlug
nManager.java:420)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Def
ultLifecycleExecutor.java:539)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithL
fecycle(DefaultLifecycleExecutor.java:480)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defa
ltLifecycleExecutor.java:459)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHa
dleFailures(DefaultLifecycleExecutor.java:311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegme
ts(DefaultLifecycleExecutor.java:278)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultL
fecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:330)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
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)
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Error executing ant tasks

Embedded error: Error running jbossws:
Endpoint org.bbmag.test.StatlessEJBEndpoint cannot be loaded
[INFO]

[INFO] For more information, run Maven with the -e switch
[INFO]

[INFO] Total time: 1 minute 7 seconds
[INFO] Finished at: Wed Apr 18 09:44:02 CEST 2007
[INFO] Final Memory: 8M/21M
[INFO]



Here the Maven Script for the EJB, which creates an ant-task to generate:


project
modelVersion4.0.0/modelVersion
parent
groupIdorg.bbmag.test/groupId
artifactIdFirstEJB/artifactId
version0.1/version
/parent
artifactIdFirstEJB-ejb/artifactId
packagingejb/packaging
nameFirstEJBejb/name
descriptionEine EJB/description
dependencies
dependency
groupIdorg.apache.geronimo.specs/groupId
artifactIdgeronimo-j2ee_1.4_spec/artifactId
version1.0/version
scopeprovided/scope

XD2 maven2 plugin / problems with mergedir

2007-04-02 Thread Marco Mistroni

hi all,
i am trying to move my current m2 project to use xd2 maven2 plugin but i am
encountering big problems, so i appreciate if anyone
could help me out.
this is my pom..  i have used previously xd maven2 plugin where i specified
mergedir attribute to merge files about servlets, filters etc... from
docs i read on web (http://xdoclet.codehaus.org/Maven2+plugin) looks like
mergedir is not supported in web plugin or is it?


?xml version=1.0 encoding=UTF-8?
project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;
 modelVersion4.0.0/modelVersion
 groupIdWebWork/groupId
 artifactIdWebWorkWebApp/artifactId
 packagingwar/packaging
 nameWebWorkWebApp/name
 version1.0-SNAPSHOT/version
 urlhttp://maven.apache.org/url
 build

   plugins
   plugin
   artifactIdmaven-antrun-plugin/artifactId
   executions
   execution
   idAntPlugin/id
   phasegenerate-sources/phase
   configuration
   tasks
   echoDeleting stale web.xml/echo
   delete
file=${basedir}/src/main/webapp/WEB-INF/web.xml/
   /tasks
   /configuration
   goals
   goalrun/goal
   /goals
   /execution
   /executions
   /plugin
   plugin
   groupIdxdoclet/groupId
   artifactIdmaven2-xdoclet2-plugin/artifactId
   executions
   execution
   idgenerateSources/id
   phasegenerate-sources/phase
   goals
   goalxdoclet/goal
   /goals
   /execution
   /executions
   dependencies
   dependency
   groupIdxdoclet-plugins/groupId

artifactIdxdoclet-plugin-web/artifactId
   version1.0.4-SNAPSHOT/version
   /dependency
   /dependencies
   configuration
   configs
   config
   components
   component
   classname
org.xdoclet.plugin.web.WebPlugin/classname
   params

mergedir${basedir}/metadata/web/mergedir

destdir${basedir}/src/main/webapp/WEB-INF//destdir
   /params
   /component
   /components
   /config
   /configs
   /configuration
   !--  configuration
   tasks
   webdoclet
destDir=${basedir}/src/main/webapp/WEB-INF/

mergeDir=${basedir}/metadata/web
   fileset
dir=${basedir}/src/main/java/
   deploymentdescriptor /
   /webdoclet
   /tasks
   /configuration
   /execution
   /executions--
 /plugin
 plugin
   artifactIdmaven-war-plugin/artifactId
   version2.0/version
   configuration
   warNameSpringApp/warName

outputDirectory${jbossDir}/server/default/deploy/outputDirectory
   /configuration
 /plugin
   /plugins
 /build
 dependencies
   dependency
 groupIdjunit/groupId
 artifactIdjunit/artifactId
 version3.8.1/version
 scopetest/scope
   /dependency
   dependency
 groupIdopensymphony/groupId
 artifactIdwebwork/artifactId
 version2.2/version
   /dependency
   dependency
 groupIdopensymphony/groupId
 artifactIdxwork/artifactId
 version1.2/version
   /dependency
   dependency
 groupIdjavax.servlet/groupId
 artifactIdservlet-api/artifactId
 version2.4/version
   /dependency
   dependency
 groupIdorg.springframework/groupId
 artifactIdspring/artifactId
 version2.0-rc1/version
   /dependency
   dependency
 groupIdcommons-logging/groupId
 artifactIdcommons-logging/artifactId
 version1.0.3/version
   /dependency
   dependency
 groupIdcommons-collections/groupId
 artifactIdcommons-collections/artifactId
 version3.0/version
   /dependency
   dependency
 groupIdjstl/groupId
 artifactIdjstl/artifactId
 version1.1.2/version
   /dependency
   

Re: maven2 websphere plugin

2007-02-16 Thread Marco Mistroni

Hi Remy,
 WAS has some custom ant tags for that...
you can call those tasks from antrun plugin.
that's solution one

solution two is one maven guy wrote some maven 1.1 code for that. it's
in the archive of this list
if i can find it i post it here

regards
marco

On 2/16/07, Rémy Sanlaville [EMAIL PROTECTED] wrote:


Hi,

I'm also interested by a such plugin.
I need to generate Stub websphere classes for ejb modules.


 Grab it from svn:
 https://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/mojo-was


Don't you have an example in order to be able to generate Stub websphere
classes ?
What about also maven-was5-plugin (
http://maven-plugins.sourceforge.net/maven-was5-plugin/index.html) ?

Rémy



Re: maven2 websphere plugin

2007-02-16 Thread Marco Mistroni

Hi
got it.
Courtesy of mr hermod opstvedt
below was its messge (dated 12/11/06)

hth
marco

Hi

The plugin was developed by me. It is here:

Maven2 plugin(s): http://snapshots.maven
.codehaus.org/maven2/org/codehaus/mojo/mojo-was
SVN: https://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/mojo-was

Hermod

On 2/16/07, Marco Mistroni [EMAIL PROTECTED]  wrote:


Hi Remy,
  WAS has some custom ant tags for that...
you can call those tasks from antrun plugin.
that's solution one

solution two is one maven guy wrote some maven 1.1 code for that. it's
in the archive of this list
if i can find it i post it here

regards
 marco

On 2/16/07, Rémy Sanlaville [EMAIL PROTECTED]  wrote:

 Hi,

 I'm also interested by a such plugin.
 I need to generate Stub websphere classes for ejb modules.

 
  Grab it from svn:
  https://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/mojo-was


 Don't you have an example in order to be able to generate Stub websphere

 classes ?
 What about also maven-was5-plugin (
 http://maven-plugins.sourceforge.net/maven-was5-plugin/index.html ) ?

 Rémy





Re: maven2 websphere plugin

2007-02-16 Thread Marco Mistroni

Hi Remy,
shame on me... i didnt follow links as i did need plugin at that time...
well, then your best bet is to go with WAS-specific ant task, call them
from maven-antrun plugin

a friend of mine (Mr Peter Pilgrim) has done some work on that..
i post here the link of his blog where he describes how to use it...

http://www.jroller.com/page/peter_pilgrim

hth
marco

On 2/16/07, Rémy Sanlaville [EMAIL PROTECTED] wrote:


Hi Marco,

Thanks for the information.
I now understand that the mojo-was project [1] contains two sub-project
  - was5-maven-plugin [2] : a maven plugin. But the document is not really
clear and up-to-date ;
  - was-plugin-anttasks : some custom ant tags that you can call from
antrun
plugin. I did not find any documentation to use it.

So I still do not know how to use this plugin properly. Don't you have an
example ?

regards,

Rémy

[1] https://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/mojo-was
[2] http://maven-plugins.sourceforge.net/maven-was5-plugin/index.html



Re: Maven 1.1 for aspectj project

2007-02-13 Thread Marco Mistroni

hi,
 IF you have patience, i'll post a pom.xml as soon as i get home  my
app using aspectj for maven1.1...now i have converted it to maven2

it's a webap though

hth
marco

On 2/13/07, Build Admin [EMAIL PROTECTED] wrote:


Hi
How to build aspectj project with maven 1.1?
Can anyone suggest useful link and dependency files required?



Re: Maven 1.1 for aspectj project

2007-02-13 Thread Marco Mistroni

Hello,
as promised here's the maven.xml (in mvn 1.1 there's no pom, but you have a
project.xml and a maven.xml)

?xml version=1.0?
project   xmlns:m=jelly:maven
 xmlns:ant=jelly:ant

 preGoal name=jsf-dist
  attainGoal name=clean/
  ant:copy file=../properties/web-context.xml
  toDir=../spring
  overwrite=true/
  attainGoal name=xdoclet:webdoclet/
  attainGoal name=aspectj:compile/
 /preGoal


 goal name=jsf-dist
attainGoal name=jar:install/
 /goal

 postGoal name=jar:install
ant:property name=substitution.file
location=../properties/project.properties/
ant:property file=${substitution.file} prefix=s/

ant:copy file=target/xdoclet/webdoclet/WEB-INF/web.xml
  toDir=${jsfapp.webdir}
  overwrite=true
 ant:filterchain
   ant:replacetokens
   ant:token key=DB_URL
  value=${s.db.url}/
   ant:token key=DATASOURCE_POPULATOR
  value=${s.datasource.populator}/
   ant:token key=DB_DRIVER
  value=${s.db.driver}/
   ant:token key=DB_USER
  value=${s.db.user}/
   ant:token key=DB_PASSWORD
  value=${s.db.password}/
   ant:token key=DB_STOCK_URL
  value=${s.db.stock.url}/
   ant:token key=DB_PRODUCTION
   value=${s.datasource.populator.production}/
   ant:token key=QUARTZ_CONTEXT
   value=${s.quartz.context}/
   /ant:replacetokens
/ant:filterchain
 /ant:copy

  /postGoal

/project


as Kaare and other were saying, you want to have a look at aspectj plugin
for maven 1.1

hth
marco


On 2/13/07, Kaare Nilsen [EMAIL PROTECTED] wrote:


On 13/02/07, Marco Mistroni [EMAIL PROTECTED] wrote:
 hi,
   IF you have patience, i'll post a pom.xml as soon as i get home 
my
 app using aspectj for maven1.1...now i have converted it to maven2

for maven2 you could use this plugin :
http://mojo.codehaus.org/aspectj-maven-plugin


 it's a webap though

Would not matter. Just put the aspectj pluging configuration in your
modules containing source and everything shoould work fine


 hth
  marco

 On 2/13/07, Build Admin [EMAIL PROTECTED] wrote:
 
  Hi
  How to build aspectj project with maven 1.1?
  Can anyone suggest useful link and dependency files required?
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: EAR libs and MANIFEST.MF generation

2007-02-06 Thread Marco Mistroni

Hi,
any particular reason for not using maven-ear-plugin, since it will
generate manifest classpath entries based on dependencies of your projects?

hth
marco

On 2/6/07, Manos Batsis [EMAIL PROTECTED] wrote:




Hello,

Back in my Ant-based projects i used the pathconvert to generate
manifest files from myruntime.classpathref. I also filtered all those
jars out of my WARs/WEB-INF/lib and put them in the EAR/lib, where
(thanks to the manifests) both EJBs and WAR classes could access them,
avoiding duplication of library JARs.

I'm getting ready to port the same logic through the antrun plugin, then
use exclusions and what not to finally end up with the same structure
and was wondering if there is a better way to do this.

Thanks in advance,

Manos

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: EAR libs and MANIFEST.MF generation

2007-02-06 Thread Marco Mistroni

Hi Manos

mmm, why would the manifest of the .ear have classpath entries?
the classpath entries you need are in the manifest of your project for which
you have
jars (pls anyone correct me if i m wrong)

what your ear should contain is artifacts for your project,
META-INF\application.xml and common libraries.

I believe maven ear plugin is clever enough to know, if two projects depends
on the same library, to add it to the .EAR (of course, this will depend on
the scope of your dependencies)

Pls anyone correct me if i m wrong..  Manos, best suggestion is that you try
a simple .ear project for yourself and see what maven does with Manifest

i think you'll find solution to your problems quite soon...

if not, let me know, i'll mail you a sample that i have at home so you can
see where all dependencies go

If your war are dependent to libraries which are common to other projects,
don't put them in the war, change their scope so that they won't be
included..

hth
marco




On 2/6/07, Manos Batsis [EMAIL PROTECTED] wrote:



Hey Marco,

Thanks for your email.

Quoting Marco Mistroni [EMAIL PROTECTED]:
  any particular reason for not using maven-ear-plugin, since it will
 generate manifest classpath entries based on dependencies of your
 projects?


I use it already, but i probably not to its full extent. The manifest it
creates for the EAR has no classpath entry. Do i have to tell the plugin
to create it using jarModule elements for all the runtime dependencies
or is there an other way?

Even then:

* Do i have to manually exclude the deps from my WAR using the plugin?
* Will the WAR and EJB-JAR obey the EAR manifest? I used to create the
manifest for those modules with Ant for this structure to work.


Many thanks,

Manos


 hth
  marco

 On 2/6/07, Manos Batsis [EMAIL PROTECTED] wrote:
 
 
 
  Hello,
 
  Back in my Ant-based projects i used the pathconvert to generate
  manifest files from myruntime.classpathref. I also filtered all
 those
  jars out of my WARs/WEB-INF/lib and put them in the EAR/lib, where
  (thanks to the manifests) both EJBs and WAR classes could access
 them,
  avoiding duplication of library JARs.
 
  I'm getting ready to port the same logic through the antrun plugin,
 then
  use exclusions and what not to finally end up with the same
 structure
  and was wondering if there is a better way to do this.
 
  Thanks in advance,
 
  Manos
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: EAR libs and MANIFEST.MF generation

2007-02-06 Thread Marco Mistroni

Oh dear, thanx Stephane for the clarifications..
I completely forgot that EAR i built were EJB3 based, where i didnt have an
ejb artifact as
i can deploy ejbs as jars

thanks for pointing that out.

regards
marco


On 2/6/07, Stephane Nicoll [EMAIL PROTECTED] wrote:


Hi,

On 2/6/07, Manos Batsis [EMAIL PROTECTED] wrote:

 Hey Marco,

 Thanks for your email.

 Quoting Marco Mistroni [EMAIL PROTECTED]:
   any particular reason for not using maven-ear-plugin, since it will
  generate manifest classpath entries based on dependencies of your
  projects?


Even if you do this, it won't work AFAIK since it's not part of the
spec. The way to define dependencies between an EJB module and
third-party libs is to define a manifest for the *EJB* module.

Does this actually work? On which app server?

 * Will the WAR and EJB-JAR obey the EAR manifest? I used to create the
 manifest for those modules with Ant for this structure to work.

I am pretty sure it won't work and this way of working is not compliant
anyway.

Back to your original question, this is an interesting use case. Why
don't you generate the manifest when you actually build your EJB
modules? Maven can do this for your (see the archive settings).

Regards,
Stéphane



 Many thanks,

 Manos

 
  hth
   marco
 
  On 2/6/07, Manos Batsis [EMAIL PROTECTED] wrote:
  
  
  
   Hello,
  
   Back in my Ant-based projects i used the pathconvert to generate
   manifest files from myruntime.classpathref. I also filtered all
  those
   jars out of my WARs/WEB-INF/lib and put them in the EAR/lib, where
   (thanks to the manifests) both EJBs and WAR classes could access
  them,
   avoiding duplication of library JARs.
  
   I'm getting ready to port the same logic through the antrun plugin,
  then
   use exclusions and what not to finally end up with the same
  structure
   and was wondering if there is a better way to do this.
  
   Thanks in advance,
  
   Manos
  
  
  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Installing application in a directory for test purposes

2007-02-05 Thread Marco Mistroni

Hi,
any particular reason why you can't run test from your src\test directory,
since all your mainapp classes will be in the classpath ?

do you need to have your app installed for testing purposes?

hth
marco

On 2/5/07, Christian Plessl [EMAIL PROTECTED] wrote:


Dear Maven Users

I have recently converted my java command-line application to Maven. While
building an packaging the application generally works well, I still cannot
figure out a good workflow for deploying the application to a local
directory for testing purposes.

I would like to use the following directory layout in the target (i.e.
installation) directory of my application:

app_directory
+ bin/
 myapp.sh  (application wrapper, sets up the environment etc.)
+ lib/ (directory with all libraries used by myapp)
 lib1.jar
 lib2.jar
+ myapp.jar (my application: either as jar file, or in directories
org/myname/myapp/..)
+ moreresources/

With this directory layout, I can run my application with commands like:
./bin/myapp.sh -arg1 value1 -arg2 value2

Unfortunately, I have not discovered a good way to install the application
using this directory layout. My current solution is to use the assembly
plugin and execute the assembly:directory target. I'm using the following
configuration for the assembly plugin.

plugin
  groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-assembly-plugin/artifactId
configuration
   descriptorRefs
 descriptorRefjar-with-dependencies/descriptorRef
   /descriptorRefs
/configuration
/plugin

When executing the assembly:directory plugin, the application gets
installed in directory target/myapp-1.0-SNAPSHOT-jar-with-dependencies,
but all jar files myapp depends on are unpacked. Since my  application
depends on many, large jar files this step is simply too time-consuming for
frequent rebuilds.

In particular, the assembly plugin seems incapable of dealing with
incremental changes and hence the jar files are unpacked every time
assembly:directory is executed.


I would prefer that the build process figures out which jar files to
include in the lib directory from the project dependencies in  pom.xml,
but that the jar files are not unpacked.

Is there a better way, to achieve the installation of the application in a
directory?

Best regards,
Christian


--
Christian Plessl [EMAIL PROTECTED] http://plesslweb.ch


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: hibernate InstrumentTask

2007-01-30 Thread Marco Mistroni

Hi,
my 2 cents . don't know the issue but i went to check
what does that instrument task do..
i see no reason why you can't just use maven antrun plugin and execute it...
dont know if this might help...  here i configured a custom ant task
(wstools), like this

configuration
  tasks
 taskdef name=wstools classname=org.jboss.ws.tools.ant.wstools

 classpath refid=maven.dependency.classpath/

 classpath
 fileset dir=${jboss.libdir}\client
   include name=activation.jar/
   include name=javassist.jar/
   include name=jboss-common-client.jar/
   include name=jbossretro-rt.jar/
   include name=jboss-backport-concurrent.jar/
   include name=jbossws-client.jar/
   include name=jboss-xml-binding.jar/
   include name=concurrent.jar/
   include name=log4j.jar/
   include name=mail.jar/
   include name=wsdl4j.jar/

   /fileset
   fileset dir=${jboss.libdir}\lib\endorsed
   include name=*.jar/
   /fileset

   /classpath
   /taskdef
 /tasks
 wstools dest=${project.build.outputDirectory}/META-INF
  config=${workspace.dir}/middleware/jboss/wstools-
messenger-config.xml/

but i bet you knew that, i saw your name on this list since long

was that hte problem? if you just replace it the above code with the ant
code listed here

http://www.hibernate.org/hib_docs/v3/reference/en/html/performance.html


now. watching at that ant task for instrumentationTask it says
'depends=compile',
so you shoul dinvoke your maven-antrun-plugin in the process-classes phase

you might encounter problems of classpath...

pls let me know if this helps

rgds
marco





On 1/30/07, nicolas de loof [EMAIL PROTECTED] wrote:


Hello,

Is there any plugin that support hibernate InstrumentTask ?
How to configure the antrun plugin to use it ?




Re: hibernate InstrumentTask

2007-01-30 Thread Marco Mistroni

ah i see, i was betting that that could have been one of the problems

any reasons why the code below does not work using
phaseprocess-classes/phase?
i had to add extra classes 'manually' to classpath because i had problem
with some jboss versions that were screwing up the wstools task.. so i
couldn't import the whole  jboss-all-client, that's why you see all
include in sample i gave


classpath refid=maven.dependency.classpath/


there was a message i saw on this list which was talking about using maven
dependencies for classpath. i m sure is  than 1 month..

good luck

rgds
marco





On 1/30/07, nicolas de loof [EMAIL PROTECTED] wrote:


My issue is about building the classpath for the hibernate instrumentTask
using maven dependencies : your sample config uses ${jboss.libdir} to
build
the task calsspath. I'd like to set a dependency for the plugin on
hibernate.

Thanks anyway.

2007/1/30, Marco Mistroni [EMAIL PROTECTED]:

 Hi,
 my 2 cents . don't know the issue but i went to check
 what does that instrument task do..
 i see no reason why you can't just use maven antrun plugin and execute
 it...
 dont know if this might help...  here i configured a custom ant task
 (wstools), like this

 configuration
tasks
   taskdef name=wstools classname=
 org.jboss.ws.tools.ant.wstools
 
   classpath refid=maven.dependency.classpath/

   classpath
   fileset dir=${jboss.libdir}\client
 include name=activation.jar/
 include name=javassist.jar/
 include name=jboss-common-client.jar /
 include name=jbossretro-rt.jar/
 include name=jboss-backport-concurrent.jar/
 include name= jbossws-client.jar/
 include name=jboss-xml-binding.jar/
 include name=concurrent.jar/
 include name= log4j.jar/
 include name=mail.jar/
 include name=wsdl4j.jar/

 /fileset
 fileset dir=${ jboss.libdir}\lib\endorsed
 include name=*.jar/
 /fileset

 /classpath
 /taskdef
   /tasks
   wstools dest=${project.build.outputDirectory}/META-INF
config=${workspace.dir}/middleware/jboss/wstools-
 messenger-config.xml /

 but i bet you knew that, i saw your name on this list since long

 was that hte problem? if you just replace it the above code with the ant
 code listed here

 http://www.hibernate.org/hib_docs/v3/reference/en/html/performance.html


 now. watching at that ant task for instrumentationTask it says
 'depends=compile',
 so you shoul dinvoke your maven-antrun-plugin in the process-classes
 phase

 you might encounter problems of classpath...

 pls let me know if this helps

 rgds
 marco





 On 1/30/07, nicolas de loof [EMAIL PROTECTED] wrote:
 
  Hello,
 
  Is there any plugin that support hibernate InstrumentTask ?
  How to configure the antrun plugin to use it ?
 
 






Re: hibernate InstrumentTask

2007-01-30 Thread Marco Mistroni

Nicholas, additional thing

if you make it work, would you mind write a wiki here

http://docs.codehaus.org/display/MAVENUSER/Examples

with your example pom.xml? it might help (me :)  or anyone that want to do
same
things later on

regards
marco

On 1/30/07, Marco Mistroni [EMAIL PROTECTED] wrote:


ah i see, i was betting that that could have been one of the problems

any reasons why the code below does not work using
phaseprocess-classes/phase?
i had to add extra classes 'manually' to classpath because i had problem
with some jboss versions that were screwing up the wstools task.. so i
couldn't import the whole  jboss-all-client, that's why you see all
include in sample i gave


classpath refid=maven.dependency.classpath/


there was a message i saw on this list which was talking about using maven
dependencies for classpath. i m sure is  than 1 month..

good luck

rgds
 marco





On 1/30/07, nicolas de loof [EMAIL PROTECTED] wrote:

 My issue is about building the classpath for the hibernate
 instrumentTask
 using maven dependencies : your sample config uses ${jboss.libdir} to
 build
 the task calsspath. I'd like to set a dependency for the plugin on
 hibernate.

 Thanks anyway.

 2007/1/30, Marco Mistroni [EMAIL PROTECTED]:
 
  Hi,
  my 2 cents . don't know the issue but i went to check
  what does that instrument task do..
  i see no reason why you can't just use maven antrun plugin and execute
  it...
  dont know if this might help...  here i configured a custom ant task
  (wstools), like this
 
  configuration
 tasks
taskdef name=wstools classname=
  org.jboss.ws.tools.ant.wstools
  
classpath refid=maven.dependency.classpath/
 
classpath
fileset dir=${jboss.libdir}\client
  include name=activation.jar/
  include name=javassist.jar/
  include name=jboss-common-client.jar /
  include name=jbossretro-rt.jar/
  include name=jboss-backport-concurrent.jar/
  include name= jbossws-client.jar/
  include name=jboss-xml-binding.jar/
  include name=concurrent.jar/
  include name= log4j.jar/
  include name=mail.jar/
  include name=wsdl4j.jar/
 
  /fileset
  fileset dir=${ jboss.libdir}\lib\endorsed
  include name=*.jar/
  /fileset
 
  /classpath
  /taskdef
/tasks
wstools dest=${project.build.outputDirectory}/META-INF
 config=${workspace.dir}/middleware/jboss/wstools-
  messenger-config.xml /
 
  but i bet you knew that, i saw your name on this list since long
 
  was that hte problem? if you just replace it the above code with the
 ant
  code listed here
 
  http://www.hibernate.org/hib_docs/v3/reference/en/html/performance.html

 
 
  now. watching at that ant task for instrumentationTask it says
  'depends=compile',
  so you shoul dinvoke your maven-antrun-plugin in the process-classes
  phase
 
  you might encounter problems of classpath...
 
  pls let me know if this helps
 
  rgds
  marco
 
 
 
 
 
  On 1/30/07, nicolas de loof  [EMAIL PROTECTED] wrote:
  
   Hello,
  
   Is there any plugin that support hibernate InstrumentTask ?
   How to configure the antrun plugin to use it ?
  
  
 
 





Re: maven2, eclipse and hierarchical layout

2007-01-27 Thread Marco Mistroni

On 1/27/07, Marco Mistroni [EMAIL PROTECTED] wrote:



child pom:

 parent
 groupIdparent/groupId
 artifactIdparent-pom/artifactId
 version1/version
 relativePath../parent/pom.xml/relativePath
 /parent


there you go!!
thanx a lot Alexander...
this was what i was missing..

 thanx a lot!!!

regards
 Marco

artifactIdchild1/artifactId
 groupIdparent/groupId
  --
 *From:* Marco Mistroni [mailto:[EMAIL PROTECTED]
 *Sent:* Saturday, January 27, 2007 8:11 AM
 *To:* Morgovsky, Alexander (US - Glen Mills)
 *Subject:* Re: maven2, eclipse and hierarchical layout

 Hi Alexander,
  would you mind posting a simple pom.xml of the children?
 because i was using ../ in the module tag of the parent,  it is
 working fine from commandline but in eclipse is
 screwing up every time i try to build childrens...

 thanx and regards
  marco

 On 1/27/07, Morgovsky, Alexander (US - Glen Mills) [EMAIL PROTECTED]
  wrote:
 
   I use a flat structure where the children reference the parent as
  ..\(name of parent).  Thanks.
 
 
  This message (including any attachments) contains confidential
  information intended for a specific individual and purpose, and is protected
  by law.  If you are not the intended recipient, you should delete this
  message.
 
  Any disclosure, copying, or distribution of this message, or the
  taking of any action based on it, is strictly prohibited. [v.E.1]
 





Re: EJB3 with maven

2007-01-26 Thread Marco Mistroni

Hi,
 you don't need anything special.. with jboss, you can deploy an ejb
as a jar file.
All you  need to do is to have a  jar project, make sure to put in your
src/main/resources  a META-INF directory with your persistence.xml file in
it

this is the simplest setup you could have


hth
marco

On 1/26/07, Vidya Mahavadi [EMAIL PROTECTED] wrote:


Hi,

I have to deploy an application with EJB3 to JBoss 4.0.4 server. I also
need to use EJB JPA for persistance. In maven 2.0, can anyone please give
me steps how to generate/deploy ear file from the application. It would be
a great help!

Regards,

This e-mail is subject to a disclaimer, available at

http://www.rmb.co.za/web/elements.nsf/online/disclaimer-communications.html





Re: EJB3 with maven

2007-01-26 Thread Marco Mistroni

Hi,
here i posted a project that uses EJB3 with microcontainer.. you can get
copy of pom.xml from attachments

http://docs.codehaus.org/display/MAVENUSER/How+to+use+the+JBoss+Embedded+EJB3+Container+for+Unit+testing

i am NOT using EJB3 plugin, because in jboss you can deploy ejb3 in a simple
jar file  (as long as you put the persistence.xml in the file)

pls have a look, i can mail  you a working sample when i m at home as most
of my code
is at my home

regards
marco

On 1/26/07, Vidya Mahavadi [EMAIL PROTECTED] wrote:


Hi Marco,

Thanks for your respose. Can you please explain in little detail or a
sample pom.xml if you have..

I am having problem to get ejb3 plugin to work..

Regards,
Vidya




Marco Mistroni [EMAIL PROTECTED]
26/01/2007 15:52
Please respond to
Maven Users List users@maven.apache.org


To
Maven Users List users@maven.apache.org
cc

Subject
Re: EJB3 with maven






Hi,
  you don't need anything special.. with jboss, you can deploy an ejb
as a jar file.
All you  need to do is to have a  jar project, make sure to put in your
src/main/resources  a META-INF directory with your persistence.xml file in
it

this is the simplest setup you could have


hth
marco

On 1/26/07, Vidya Mahavadi [EMAIL PROTECTED] wrote:

 Hi,

 I have to deploy an application with EJB3 to JBoss 4.0.4 server. I also
 need to use EJB JPA for persistance. In maven 2.0, can anyone please
give
 me steps how to generate/deploy ear file from the application. It would
be
 a great help!

 Regards,

 This e-mail is subject to a disclaimer, available at



http://www.rmb.co.za/web/elements.nsf/online/disclaimer-communications.html






This e-mail is subject to a disclaimer, available at

http://www.rmb.co.za/web/elements.nsf/online/disclaimer-communications.html





Re: EJB3 with maven

2007-01-26 Thread Marco Mistroni

Hi,
the simplest thing?
- write  a jar project containing two simple ejb, mayb a session and an
entity
- create a META-INF directory in your src/main/resources directory, place
there your persistence.xml
- build and package the jar
- deploy on jboss

if you don't see any errors, it means it has successfully deployed the ejb
then you can expand your app to make it an ear that contains your ejbs and a
simple servlet
that calls them..to see if everything is in place.

once you have this running, you can invest time in trying to learn better
ejb3, various beans interactions,
relationships etc

and, DONT FORGET unit tests :)

hth
marco


On 1/26/07, Vidya Mahavadi [EMAIL PROTECTED] wrote:


Thanks Marco,

I will check out the link. I am trying to learn most of the stuff  I
mentioned all at same time, and struggling to put everything together. :)

Thanks,
Vidya




Marco Mistroni [EMAIL PROTECTED]
26/01/2007 16:43
Please respond to
Maven Users List users@maven.apache.org


To
Maven Users List users@maven.apache.org
cc

Subject
Re: EJB3 with maven






Hi,
here i posted a project that uses EJB3 with microcontainer.. you can get
copy of pom.xml from attachments


http://docs.codehaus.org/display/MAVENUSER/How+to+use+the+JBoss+Embedded+EJB3+Container+for+Unit+testing


i am NOT using EJB3 plugin, because in jboss you can deploy ejb3 in a
simple
jar file  (as long as you put the persistence.xml in the file)

pls have a look, i can mail  you a working sample when i m at home as most
of my code
is at my home

regards
marco

On 1/26/07, Vidya Mahavadi [EMAIL PROTECTED] wrote:

 Hi Marco,

 Thanks for your respose. Can you please explain in little detail or a
 sample pom.xml if you have..

 I am having problem to get ejb3 plugin to work..

 Regards,
 Vidya




 Marco Mistroni [EMAIL PROTECTED]
 26/01/2007 15:52
 Please respond to
 Maven Users List users@maven.apache.org


 To
 Maven Users List users@maven.apache.org
 cc

 Subject
 Re: EJB3 with maven






 Hi,
   you don't need anything special.. with jboss, you can deploy an ejb
 as a jar file.
 All you  need to do is to have a  jar project, make sure to put in your
 src/main/resources  a META-INF directory with your persistence.xml file
in
 it

 this is the simplest setup you could have


 hth
 marco

 On 1/26/07, Vidya Mahavadi [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I have to deploy an application with EJB3 to JBoss 4.0.4 server. I
also
  need to use EJB JPA for persistance. In maven 2.0, can anyone please
 give
  me steps how to generate/deploy ear file from the application. It
would
 be
  a great help!
 
  Regards,
 
  This e-mail is subject to a disclaimer, available at
 
 



http://www.rmb.co.za/web/elements.nsf/online/disclaimer-communications.html


 
 
 


 This e-mail is subject to a disclaimer, available at



http://www.rmb.co.za/web/elements.nsf/online/disclaimer-communications.html






This e-mail is subject to a disclaimer, available at

http://www.rmb.co.za/web/elements.nsf/online/disclaimer-communications.html





maven2, eclipse and hierarchical layout

2007-01-26 Thread Marco Mistroni

hi all,
 i still havent' managed to use maven2 with eclipse where i have a parent
project and few children project

has anyone managed to have that setup working correctly in eclipse?

any hints on how to make it work will be greatly appreciated

regards
 marco


Re: pom.xml

2007-01-24 Thread Marco Mistroni

would it be because you have a 'hierarchical project' ?

p1
|_pom.xml
|_p2
  |__ pom.xml

?

hth
marco

On 1/24/07, Jan-Oliver Wuelfing [EMAIL PROTECTED]
wrote:


Hello to everybody,

I´ve encountered a prob with Eclipse´s Maven plug-in:

It prompts that a project build error exist: failed to validate pom.

Can anyone give an advice, please?

Cheers
  Jan



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [M2] not to include dependencies in an ear file

2007-01-24 Thread Marco Mistroni

Hi,
  can u try to change the scope  of those dependencies?

hth
marco



On 1/24/07, Roberto UserList [EMAIL PROTECTED] wrote:


Hi all ! What can I do not to include the dependencies described in the
master pom into an ear file?
Thanks in advance for help.
Regards,
Roberto.




Re: maven2 eclipse question

2007-01-24 Thread Marco Mistroni

Hi,
check maven2 ecliplse plugin (pls google it, i dont remember webaddress)

create your project, then right click and do maven2 --enable

then, for source folders, you might want to rightclick on your project
and choose maven2--update source folders

hth
marco

On 1/24/07, Arash Amiri [EMAIL PROTECTED] wrote:


Hi


I dont know if this the right place to ask this, but I have a problem
with maven webapps and eclipse.

I am a newbie to maven2 and I create a new maven project by using:

mvn archetype:create -DgroupId=myGroup.myApp -DartifactId=myServerTest
-DarchetypeArtifactId=maven-archetype-webapp

then I run

mvn eclipse:eclipse

but for some reason, the source folders in eclipse are not correct.
meaning that src/main/webapp is not part of the source tree in eclipse.

why doesnt that work?

greetings, arash.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Hibernate3 export where *.hbm.cfg and *.hbm.xml are resources

2007-01-23 Thread Marco Mistroni

Hi,
 actually what i was doing was trying to generate schema export file, but
then i
figured out that i might let the hibernate session create tables for me..


regards
marco

On 1/23/07, Johann Reyes [EMAIL PROTECTED] wrote:


Hello lexi

Are you trying to document your hibernate classes?? Have you tried
hbm2doc?

Regards

Johann Reyes

-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 16, 2007 11:22 AM
To: Maven Users List
Subject: Re: Hibernate3 export where *.hbm.cfg and *.hbm.xml are resources

Hi,
i think somehow you can make it work with the genration of DDL
if you check pluginDoc, in your configuration element there's something
that allows you to use hibernate.properties file (if that is what you are
using)

alternatively, i think you could still invoke schemaExport (or whatever
task
is called
in hibernate3) from maven-antrun-plugin

hth
marco




On 1/16/07, Aleksei Valikov [EMAIL PROTECTED] wrote:

 Hi.

  i think you can configure what todo in the sessionFactory
  prop key=hibernate.hbm2ddl.autocreate/prop
 
  that way will be easier

 Yes, this is how it works right now.
 But we'd also like to generate the DDLs for documentation/reference
 purposes.

  with codehaus plugin you can use also an hibernate.properties, pls
check
  properties available for that plugin
 
  when i tried, i didnt succeeded, so i decided to configure it on the
  sessionFactory.
  for tests, i am using a different DS, with different properties

 Ok, nice idea, thanks!

 Bye.
 /lexi

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Hibernate3 export where *.hbm.cfg and *.hbm.xml are resources

2007-01-16 Thread Marco Mistroni

Hello,
i think you can configure what todo in the sessionFactory
prop key=hibernate.hbm2ddl.autocreate/prop

that way will be easier

with codehaus plugin you can use also an hibernate.properties, pls check
properties available for that plugin

when i tried, i didnt succeeded, so i decided to configure it on the
sessionFactory.
for tests, i am using a different DS, with different properties

hth
marco


On 1/16/07, Aleksei Valikov [EMAIL PROTECTED] wrote:


Hi.

In my project, Hibernate configuration and mappings are distributed among
several JARs. That is, *.hbm.cfg and *.hbm.xml are resources inside JAR
artifacts rather than files. There is a war module which depends on all of
these
JARs. And I need to export the database schema (DDL) for this module.

Unfortunatelly codehaus hibernate3 plugin that I've encountered requires
Hibernate configuration as a file. Is there a way to export the database
schema
for the Hibernate configuration defined in several JARs with Maven?

Bye.
/lexi

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Hibernate3 export where *.hbm.cfg and *.hbm.xml are resources

2007-01-16 Thread Marco Mistroni

Hi,
i think somehow you can make it work with the genration of DDL
if you check pluginDoc, in your configuration element there's something
that allows you to use hibernate.properties file (if that is what you are
using)

alternatively, i think you could still invoke schemaExport (or whatever task
is called
in hibernate3) from maven-antrun-plugin

hth
marco




On 1/16/07, Aleksei Valikov [EMAIL PROTECTED] wrote:


Hi.

 i think you can configure what todo in the sessionFactory
 prop key=hibernate.hbm2ddl.autocreate/prop

 that way will be easier

Yes, this is how it works right now.
But we'd also like to generate the DDLs for documentation/reference
purposes.

 with codehaus plugin you can use also an hibernate.properties, pls check
 properties available for that plugin

 when i tried, i didnt succeeded, so i decided to configure it on the
 sessionFactory.
 for tests, i am using a different DS, with different properties

Ok, nice idea, thanks!

Bye.
/lexi

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: xdoclet2 maven2 plugin

2007-01-10 Thread Marco Mistroni

Hi,
  i have tried to use xdoclet2 plugin for hibernate
here's how i m using it

plugin
   groupIdxdoclet/groupId
   artifactIdmaven2-xdoclet2-plugin/artifactId
   version2.0.5/version
   executions
   execution
   idxdoclet/id
   phaseprocess-classes/phase
   goals
   goalxdoclet/goal
   /goals
   /execution
   /executions
   dependencies
   dependency
   groupIdxdoclet-plugins/groupId
   artifactIdxdoclet-plugin-hibernate/artifactId
   version1.0.4-SNAPSHOT/version
   /dependency
   /dependencies
   configuration
   configs
   config
   components
   component
   classname
org.xdoclet.plugin.hibernate.HibernateMappingPlugin/classname
params
   version3.0/version
   destdir${project.build.outputDirectory}/destdir
/params
   /component
   /components


   /config
   /configs
   /configuration
/plugin

i suppose other uses are similar

hth
marco

PS got a problem wit 2.0.5-SNAPSHOT last wkend... i was suggested to move to
2.0.5




On 1/10/07, nicolas de loof [EMAIL PROTECTED] wrote:


Thanks !

the mojo is for xDoclet, not xDoclet2.
Is there active dev on xDoclet2 ?

Nico.


Le 10/01/07, LAMY Olivier [EMAIL PROTECTED] a écrit :

 Hi,

 http://repo1.maven.org/maven2/org/codehaus/mojo/xdoclet-maven-plugin/

 Try with
 plugin
   artifactIdxdoclet-maven-plugin/artifactId
   groupIdorg.codehaus.mojo/groupId
   version1.0-alpha-2/version
   ...
 /plugin

 Look http://mojo.codehaus.org/xdoclet-maven-plugin/usage.html

 I think  http://xdoclet.codehaus.org/Maven2+plugin is not up to date.

 --
 Olivier

 -Message d'origine-
 De : nicolas de loof [mailto:[EMAIL PROTECTED]
 Envoyé : mercredi 10 janvier 2007 08:52
 À : Maven Users List
 Objet : xdoclet2 maven2 plugin

 Hello,
 According to http://xdoclet.codehaus.org/Maven2+plugin, the xdoclet2
 plugin for maven2 can be downloaded from
 http://dist.codehaus.org/xdoclet/maven-plugins/.

 This folder contains both a SNAPSHOT and a 2.0.5.jar. Is this plugin
 ready for production ? Why isn't it deployed on public maven repository
?

 Nico.


 This e-mail, any attachments and the information contained therein
(this
 message) are confidential and intended solely for the use of the
 addressee(s). If you have received this message in error please send it
back
 to the sender and delete it. Unauthorized publication, use,
dissemination or
 disclosure of this message, either in whole or in part is strictly
 prohibited.


--
 Ce message électronique et tous les fichiers joints ainsi que  les
 informations contenues dans ce message ( ci après le message ), sont
 confidentiels et destinés exclusivement à l'usage de la  personne à
laquelle
 ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le
 renvoyer à son émetteur et de le détruire. Toutes diffusion,
publication,
 totale ou partielle ou divulgation sous quelque forme que se soit non
 expressément autorisées de ce message, sont interdites.


-


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






Re: xdoclet2 maven2 plugin

2007-01-10 Thread Marco Mistroni

hello,
u r welcome
if by any chance u get it to work with ejbdodclet and webdoclet could you
post your pom.xml? i'd need to convert my existing projects to use m2 xd2
plugin.. but right now i am busy with ohter stuff

regards
marco

On 1/10/07, nicolas de loof [EMAIL PROTECTED] wrote:


Thanks a lot for code sample.

2007/1/10, Marco Mistroni [EMAIL PROTECTED]:

 Hi,
i have tried to use xdoclet2 plugin for hibernate
 here's how i m using it

 plugin
 groupIdxdoclet/groupId
 artifactIdmaven2-xdoclet2-plugin/artifactId
 version2.0.5/version
 executions
 execution
 idxdoclet/id
 phaseprocess-classes/phase
 goals
 goalxdoclet/goal
 /goals
 /execution
 /executions
 dependencies
 dependency
 groupIdxdoclet-plugins/groupId
 artifactIdxdoclet-plugin-hibernate/artifactId
 version1.0.4-SNAPSHOT/version
 /dependency
 /dependencies
 configuration
 configs
 config
 components
 component
 classname
 org.xdoclet.plugin.hibernate.HibernateMappingPlugin/classname
  params
 version3.0/version
 destdir${project.build.outputDirectory}/destdir
  /params
 /component
 /components


 /config
 /configs
 /configuration
 /plugin

 i suppose other uses are similar

 hth
 marco

 PS got a problem wit 2.0.5-SNAPSHOT last wkend... i was suggested to
move
 to
 2.0.5




 On 1/10/07, nicolas de loof [EMAIL PROTECTED] wrote:
 
  Thanks !
 
  the mojo is for xDoclet, not xDoclet2.
  Is there active dev on xDoclet2 ?
 
  Nico.
 
 
  Le 10/01/07, LAMY Olivier [EMAIL PROTECTED] a écrit :
  
   Hi,
  
  
http://repo1.maven.org/maven2/org/codehaus/mojo/xdoclet-maven-plugin/
  
   Try with
   plugin
 artifactIdxdoclet-maven-plugin/artifactId
 groupIdorg.codehaus.mojo/groupId
 version1.0-alpha-2/version
 ...
   /plugin
  
   Look http://mojo.codehaus.org/xdoclet-maven-plugin/usage.html
  
   I think  http://xdoclet.codehaus.org/Maven2+plugin is not up to
date.
  
   --
   Olivier
  
   -Message d'origine-
   De : nicolas de loof [mailto:[EMAIL PROTECTED]
   Envoyé : mercredi 10 janvier 2007 08:52
   À : Maven Users List
   Objet : xdoclet2 maven2 plugin
  
   Hello,
   According to http://xdoclet.codehaus.org/Maven2+plugin, the xdoclet2
   plugin for maven2 can be downloaded from
   http://dist.codehaus.org/xdoclet/maven-plugins/.
  
   This folder contains both a SNAPSHOT and a 2.0.5.jar. Is this
plugin
   ready for production ? Why isn't it deployed on public maven
 repository
  ?
  
   Nico.
  
  
   This e-mail, any attachments and the information contained therein
  (this
   message) are confidential and intended solely for the use of the
   addressee(s). If you have received this message in error please send
 it
  back
   to the sender and delete it. Unauthorized publication, use,
  dissemination or
   disclosure of this message, either in whole or in part is strictly
   prohibited.
  
  
 

--
   Ce message électronique et tous les fichiers joints ainsi que  les
   informations contenues dans ce message ( ci après le message ),
sont
   confidentiels et destinés exclusivement à l'usage de la  personne à
  laquelle
   ils sont adressés. Si vous avez reçu ce message par erreur,
merci  de
 le
   renvoyer à son émetteur et de le détruire. Toutes diffusion,
  publication,
   totale ou partielle ou divulgation sous quelque forme que se soit
non
   expressément autorisées de ce message, sont interdites.
  
  
 

-
  
  
  
-
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 






Re: Compiling maven project from eclipse project

2007-01-10 Thread Marco Mistroni

Hello,
you have to use m2 plugin for eclipse and make sure that your eclipse
project is maven enabled.
check plugin here  http://m2eclipse.codehaus.org/

once installed, have you project imported in your workspace, you should
right-click on them and choose Maven2--enable

hth
marco


On 1/10/07, Ojak [EMAIL PROTECTED] wrote:


Hi
I want to know how a maven project is compiled using eclipse

Thanks
Ojak






Re: problem building with m2 today

2007-01-10 Thread Marco Mistroni

Hello,
fixed.. i googled it.. found guideline that if  i had that problem that
file might have been corrupted in my repo
so i deleted it from localrepo and then i re-got it again with maven

thx
regards
marco

On 1/10/07, Wayne Fay [EMAIL PROTECTED] wrote:


I'd assume a transient network problem... The artifacts are certainly
available in Central [1]. Try again with -U perhaps, or add a declared
dependency on that artifact using version 1.4.8 which appears to be
the latest.

[1] http://repo1.maven.org/maven2/com/lowagie/itext/

Wayne

On 1/10/07, Marco Mistroni [EMAIL PROTECTED] wrote:
 hi all,
  i am suddenly getting this exception when i run mvn clean test

 [INFO] Failed to resolve artifact.

 No versions are present in the repository for the artifact with a range
[
 1.02b,)

  com.lowagie:itext:jar:null

 from the specified remote repositories:
  Maven Snapshots (http://snapshots.maven.codehaus.org/maven2/),
  central (http://repo1.maven.org/maven2),
  scriptlandia-maven2 (http://scriptlandia.sourceforge.net/maven2)


 it might be linked with castor-1.0M4 that i m trying to download

 can anyone help me out?

 thanks in advance and regards
  Marco



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




M2 / avoiding to download latest from repositories....

2007-01-08 Thread Marco Mistroni

Hi all,
i was wondering how to avoid maven2 uploading latest jars from
repositories
. question came after i was working on an hibernate/spring app last
weekend
i read somewhere that someone has changed hibernate DTD last weekend, so i
changed my code accordingly, andthis morning when i ran my tests they broke
again so i had to re-fix my code again

is runnign mvn -o the only possibility?

How can i specify that i don't want to download the latest jar for a certain
dependency?

thanks in advance and regards
Marco


Re: Invoking ant java Task from Maven or similar approaches in MAVEN

2007-01-05 Thread Marco Mistroni

Hi,
you can use maven ant plugin and use same code that is within your target
elements
not sure if it can be an alternative, but if you are doing xslt there's an
xslt task in ant.

hth
marco

On 1/5/07, raju [EMAIL PROTECTED] wrote:



Hi ,
Currently I am invoking java org.apache.xalan.xslt.Process using an ant
build file in order to generate output based on XSL.IS there any way i can
do the same in MAVEN or maybe call this ant script from within MAVEN POM.

?xml version=1.0 encoding=UTF-8?
project name=Code Generation default=build basedir=.
property file=build.properties/
target name=build
java classname=harsh.javatoxml.Java2XML fork=true 
arg line=${dir.src}/*.java/
classpath
pathelement location=${java2xml.jarpath
}/
/classpath
/java
java classname=org.apache.xalan.xslt.Process
fork=true 
arg line=-in ${dir.outputsrcxml}/output.xml -xsl
${dir.inputsrcxml}/initial.xsl/
classpath
!-- Using Saxon as didnt find option to
write output to java--
pathelement location=${saxonapi.jar}/
pathelement location=${xalanapi.jar}/
!--pathelement location=${env.XALAN_BIN
}/bsf.jar/--
/classpath
/java
/target
/project

Regards
Raju
--
View this message in context:
http://www.nabble.com/Invoking-ant-java-Task-from-Maven-or-similar-approaches-in-MAVEN-tf2924117s177.html#a8173529
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to integrate XDoclet 1.2.3 in Maven2?

2007-01-04 Thread Marco Mistroni

Hi,
this is a sample pom.xml

this is for creating hibernate mappings

plugins
 plugin
artifactIdxdoclet-maven-plugin/artifactId
groupIdorg.codehaus.mojo/groupId
executions
execution
 phasegenerate-sources/phase
goals
   goalxdoclet/goal
/goals
configuration
   tasks
   echo message=Generating HBM files from java source to
${basedir}/src/main/resources/
   hibernatedoclet destdir=${basedir}/src/main/resources/
excludedtags=@version,@author,@todo,@see,@desc verbose=true
  fileset dir=${basedir}/src/main/java
includes=**/hibernate/*.java/
  hibernate version=3.0 /
   /hibernatedoclet
   /tasks
   /configuration
  /execution
 /executions
 /plugin

i have @work also a sample that generates ejb classes, including an ejb
exposed as webservice

i'll post it to you privately if it helps otherwise pls let me know
how you want to use xdoclet with maven and i'll try to see if i have a
sample

hth
marco




On 1/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Hi,

does anybody know how to get XDoclet 1.2.3 run in Maven2? I have googled
and browsed the internet for quite a while now, tried different things,
still not working...

Thanks in advance for any hints,
-Steffen-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  1   2   3   >