Re: run maven from ant

2006-11-27 Thread John Sanda

I have been looking to call a Maven build from Ant as well. Has anyone tried
using the Embedder,
http://maven.apache.org/guides/mini/guide-embedding-m2.html? Looks like it
may provide a nice API that could be used to write Ant tasks for different
goals.

On 11/27/06, Christofer Jennings <[EMAIL PROTECTED]> wrote:


So far, using the exec task seems to work.


   
  
   


This is in a build.xml next to my pom.

,chris



On 11/27/06, Christofer Jennings <[EMAIL PROTECTED]> wrote:
>
> What is the simplest / preferred way to run maven from ant?
>
> My maven project is being integrated with a larger project that uses
> ant. I want the process to be painless to ant lovers, if possible.
>
> Thanks in advance
> ,chris
>





--

- John


Re: JXR with Ant

2006-07-10 Thread John Sanda

Nevermind. I was looking in the plugins section on Maven. I found the
repo info at http://maven.apache.org/jxr.

On 7/10/06, John Sanda <[EMAIL PROTECTED]> wrote:

Where can I find the docs and source for JXR? I am a lot more familiar
with Ant than I am with Maven, but I can take a crack writing the Ant
task.

On 7/10/06, Brett Porter <[EMAIL PROTECTED]> wrote:
> There isn't currently an Ant task, but it is a separate library so it
> wouldn't be hard to write one if someone was willing to contribute it.
>
> An alternative is to have a minimal Maven pom.xml that includes the
> source directories and the jxr plugin settings to do this (and you
> could 
> - Brett
>
> On 11/07/06, John Sanda <[EMAIL PROTECTED]> wrote:
> > Is there to run JXR with an Ant build?
> >
> > --
> >
> > - John
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Apache Maven - http://maven.apache.org
> "Better Builds with Maven" book - http://library.mergere.com/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--

- John




--

- John

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



Re: JXR with Ant

2006-07-10 Thread John Sanda

Where can I find the docs and source for JXR? I am a lot more familiar
with Ant than I am with Maven, but I can take a crack writing the Ant
task.

On 7/10/06, Brett Porter <[EMAIL PROTECTED]> wrote:

There isn't currently an Ant task, but it is a separate library so it
wouldn't be hard to write one if someone was willing to contribute it.

An alternative is to have a minimal Maven pom.xml that includes the
source directories and the jxr plugin settings to do this (and you
could  wrote:
> Is there to run JXR with an Ant build?
>
> --
>
> - John
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Apache Maven - http://maven.apache.org
"Better Builds with Maven" book - http://library.mergere.com/

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





--

- John

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



JXR with Ant

2006-07-10 Thread John Sanda

Is there to run JXR with an Ant build?

--

- John

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



Re: m2.0.3 and TestNG

2006-04-17 Thread John Sanda
Brett,

I really appreciate the feedback. I made the change, and I am good to
go. Many thanks for the help.

On 4/17/06, Brett Porter <[EMAIL PROTECTED]> wrote:
> Hi John,
>
> I'm not sure where you got the surefire plugin from - did you build it
> from source?
>
> That should have set the correct repository, being:
> http://cvs.apache.org/maven-snapshot-repository
> (instead of snapshots.maven.codehaus.org)
>
> - Brett
>
> On 4/18/06, John Sanda <[EMAIL PROTECTED]> wrote:
> > Hi Brett. I have run into the same situation as Ian, and I tried to
> > use the 2.2-SNAPSHOT version of the plugin, but I ran into some
> > problems. Here is what my pom.xml (with only relavant sections):
> >
> > 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";>
> >   4.0.0
> >   com.foo
> >   maven-app
> >   jar
> >   1.0-SNAPSHOT
> >   Maven Quick Start Archetype
> >   http://maven.apache.org
> >   
> >   org.testng
> >   testng
> >   4.6.1
> >   test
> >   jdk15
> > 
> >   
> >   
> > 
> >   
> > org.apache.maven.plugins
> > maven-compiler-plugin
> > 
> >   1.5
> >   1.5
> > 
> >   
> >   
> > org.apache.maven.plugins
> > maven-surefire-plugin
> > 2.2-SNAPSHOT
> > 
> >   
> > src/test/resources/testng.xml
> >   
> > 
> >   
> > 
> >   
> >   
> > 
> >   apache.snapshots
> >   http://cvs.apache.org/maven-snapshot-repository
> >   
> > true
> >   
> > 
> >   
> >   
> > 
> >   Maven Snapshots
> >   http://snapshots.maven.codehaus.org/maven2
> >   
> > true
> >   
> > 
> >   
> > 
> >
> > Here is the error message that I get:
> >
> > Missing:
> > --
> > 1) org.apache.maven.surefire:surefire-testng:jar:2.0-SNAPSHOT
> >
> >   Try downloading the file manually from the project website.
> >
> >   Then, install it using the command:
> >   mvn install:install-file -DgroupId=org.apache.maven.surefire
> > -DartifactId=surefire-testng \
> >   -Dversion=2.0-20060304.160715-2 -Dpackaging=jar 
> > -Dfile=/path/to/file
> >
> >   Path to dependency:
> > 1) dummy:dummy:jar:1.0
> > 2) 
> > org.apache.maven.surefire:surefire-testng:jar:2.0-20060304.160715-2
> >
> > --
> > 1 required artifact is missing.
> >
> > for artifact:
> >   dummy:dummy:jar:1.0
> >
> > from the specified remote repositories:
> >   Maven Snapshots (http://snapshots.maven.codehaus.org/maven2),
> >   central (http://repo1.maven.org/maven2)
> >
> >
> > For the repositories that I am using, the latest snapshot release that
> > I saw was 1.5-SNAPSHOT. I should also mention that I am running Maven
> > 2.0.4, but I assume that that shouldn't be a problem.
> >
> > Just for the sake of learning more about Maven, I did manage to get my
> > annotations and testng.xml file recognized by executing the testng Ant
> > task using the antrun plugin. Of course, I am aware that the antrun
> > plugin is completely separaten from the SureFire plugin. I just wanted
> > to verify that it wasn't something I was doing wrong on my end.
> >
> > Thanks.
> >
> > On 4/16/06, Brett Porter <[EMAIL PROTECTED]> wrote:
> > > Hi Ian,
> > >
> > > I'll roll these into the docs as it gets closer to release, but
> > > currently this support is only in a development snapshot of surefire.
> > >
> > > Basically, you need to be using 2.2-SNAPSHOT of the surefire plugin,
> > > and you must declare a testNG dependency (scoped test) in your
> > > project.
> > >
> > > - Brett
> > >
> > > On 4/16/06, Ian Shafer <[EMAIL PROTECTED]> wrote:
> > > > Hello,
> > > >
> > > > I'm trying to use TestNG, but I'm having no luck. I'm using Java 1.5
> > > > source and 1.5 compilation target and I'm using a 1.5 JVM (I don't
> > > > have any other version of Java installed on

Re: m2.0.3 and TestNG

2006-04-17 Thread John Sanda
Hi Brett. I have run into the same situation as Ian, and I tried to
use the 2.2-SNAPSHOT version of the plugin, but I ran into some
problems. Here is what my pom.xml (with only relavant sections):

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";>
  4.0.0
  com.foo
  maven-app
  jar
  1.0-SNAPSHOT
  Maven Quick Start Archetype
  http://maven.apache.org
  
  org.testng
  testng
  4.6.1
  test
  jdk15

  
  

  
org.apache.maven.plugins
maven-compiler-plugin

  1.5
  1.5

  
  
org.apache.maven.plugins
maven-surefire-plugin
2.2-SNAPSHOT

  
src/test/resources/testng.xml
  

  

  
  

  apache.snapshots
  http://cvs.apache.org/maven-snapshot-repository
  
true
  

  
  

  Maven Snapshots
  http://snapshots.maven.codehaus.org/maven2
  
true
  

  


Here is the error message that I get:

Missing:
--
1) org.apache.maven.surefire:surefire-testng:jar:2.0-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command:
  mvn install:install-file -DgroupId=org.apache.maven.surefire
-DartifactId=surefire-testng \
  -Dversion=2.0-20060304.160715-2 -Dpackaging=jar -Dfile=/path/to/file

  Path to dependency:
1) dummy:dummy:jar:1.0
2) org.apache.maven.surefire:surefire-testng:jar:2.0-20060304.160715-2

--
1 required artifact is missing.

for artifact:
  dummy:dummy:jar:1.0

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


For the repositories that I am using, the latest snapshot release that
I saw was 1.5-SNAPSHOT. I should also mention that I am running Maven
2.0.4, but I assume that that shouldn't be a problem.

Just for the sake of learning more about Maven, I did manage to get my
annotations and testng.xml file recognized by executing the testng Ant
task using the antrun plugin. Of course, I am aware that the antrun
plugin is completely separaten from the SureFire plugin. I just wanted
to verify that it wasn't something I was doing wrong on my end.

Thanks.

On 4/16/06, Brett Porter <[EMAIL PROTECTED]> wrote:
> Hi Ian,
>
> I'll roll these into the docs as it gets closer to release, but
> currently this support is only in a development snapshot of surefire.
>
> Basically, you need to be using 2.2-SNAPSHOT of the surefire plugin,
> and you must declare a testNG dependency (scoped test) in your
> project.
>
> - Brett
>
> On 4/16/06, Ian Shafer <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I'm trying to use TestNG, but I'm having no luck. I'm using Java 1.5
> > source and 1.5 compilation target and I'm using a 1.5 JVM (I don't
> > have any other version of Java installed on the server that I'm
> > working on).
> >
> > It seems that my 1.5 annotations are not being recognized. Only tests
> > that begin with 'test' are being run and @Configuration(beforeSuite =
> > true) is ignored. Any idea what I'm doing wrong? I'm not clear how
> > surefire knows whether to run TestNG or JUnit; that would be nice to
> > know too. Any info would be greatly appreciated.
> >
> > Thanks,
> >
> > Ian
> >
> >
> >
> > Here's a snippet from a test class:
> >
> > package com.example.test;
> >
> > // imports removed for brevity
> >
> > public class Test {
> >  @Configuration(beforeSuite = true)
> >  public void suiteSetup() throws Exception {
> >  System.out.println("suiteSetup()");
> >  }
> >
> >  @Test()
> >  public void testAppContext() {
> >  System.out.println("testAppContext");
> >  }
> > }
> >
> > Here's a snippet from my pom.xml:
> >
> >  
> >  org.apache.maven.plugins
> >  maven-surefire-plugin
> >  
> >  src/test/resources/testng.xml > suiteXmlFiles>
> >  
> >  
> >
> >
> > testng.xml:
> >
> > http://testng.org/testng-1.0.dtd";>
> >
> > 
> >  
> >  
> >  
> >  
> >  
> > 
> >
> >
> > -
> > 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]
>
>


--

- John

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



Re: Best approach to deploy in websphere app server

2006-04-14 Thread John Sanda
I work in a WebSphere shop, primarily WAS 5.0.x, but I have worked on
WAS 5.1.x some as well. I am new to Maven 2, and I do not know whether
or not there are any plugins to handle WebSphere deployments.
WebSphere come with a command line tool called Wsadmin, which provides
a scripting environment for all administrative tasks including
deployments. In version 5.0.x, the only language with which you can
write scripts in Jacl. I believe that Jython support has been added in
WAS 5.1. WebSphere also ships with a set of Ant tasks for deploying
and installing apps, starting/stopping the a server, etc. These Ant
tasks though, are just wrappers around Wsadmin scripts. If you are not
familiar with Wsadmin and JMX, the Ant tasks are a good place to start
in my opinion. You could use the antrun plugin to invoke the WAS ant
tasks from within your Maven build.

On 4/14/06, Vijay Shanker <[EMAIL PROTECTED]> wrote:
> Hi Maven users,
>
> Can anybody suggest the best approach to deploy maven built war and ear files 
> in websphere application server?
>
> Thanks,
> Shanker
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--

- John

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



Project build error Duplicate project ID

2006-04-13 Thread John Sanda
I just started working with the Eclipse plug-in, and I do not
understand why I get the following build error in the Eclipse console
- "Project build error Duplicate project ID found in
C:\dev\xfire-examples\BookFinder\pom.xml". Here is what my pom.xml
looks like:

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";>
  4.0.0
  com.foo
  bookfinder
  war
  1.0-SNAPSHOT
  Maven Webapp Archetype
  http://maven.apache.org

  

  junit
  junit
  3.8.1
  test


  org.codehaus.xfire
  xfire-spring
  1.0


  javax.servlet
  servlet-api
  2.4
  provided

  

  
bookfinder

  
org.apache.maven.plugins
maven-war-plugin

  ${basedir}/src/webapp

  

src/main
src/test

  
src/main

  **/*.xml

  


  
src/test

  **/*.xml
  **/*.properties
  **/*.wsdl

  

  

  
  

  codehaus
  Codehaus maven repository
  http://dist.codehaus.org/
  legacy

  



Is there a problem with my POM? Thanks.

--

- John

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



Re: Fw: 404 on Surefire-Report Plugin

2006-04-07 Thread John Sanda
I am new to Maven (2) and to TestNG. I decided to take both for a
spin, and I ran into the same situation. I had no problem running my
unit tests, but I was not able to generate the report. I had trouble
finding any documentation. I actually posted my questions on the
TestNG mailing list at
http://forums.opensymphony.com/thread.jspa?threadID=24959&tstart=0. I
guess I should have posted here. In any event, I was able to generate
my report, but there is something that I didn't expect to see. I have
one test class, com.foo.MessageProviderTest with one test,
testGetMessageOfTheDay().  On the report under the Test Cases section,
what shows up under MessageProviderTest is class
org.apache.maven.surefire.battery.JUnitBattery.testGetMessageOfTheDay.
It appears that at runtime, a class is dynamically generated. I am
just surprised to see that show up in the report.

On 4/7/06, Wayne Fay <[EMAIL PROTECTED]> wrote:
> I'm not sure where the documentation "lives" but this is all I did to
> get Surefire reports added to my site. ;-)
>
> 
>   
> 
>   org.codehaus.mojo
>   surefire-report-maven-plugin
> 
>   
> 
>
> Since its just a report of your test results, I'm not sure what if
> anything can be configured in the plugin. You might just find it
> easiest to pull the plugin code from Subversion and build the site
> yourself?
>
> HTH.
> Wayne
>
> On 4/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > I suppose it would help if I actually sent this to the right address... :\
> >
> > It's better to be hated for who you are
> > than loved for who you are not
> >
> > Ian D. Stewart
> > Appl Dev Analyst-Advisory, DCS Automation
> > JPMorganChase Global Technology Infrastructure
> > Phone: (614) 244-2564
> > Pager: (888) 260-0078
> > - Forwarded by Ian D Stewart/OH/ONE on 04/07/2006 11:44 AM -
> >
> >
> >  Ian D StewartTo:   [EMAIL PROTECTED]
> >   cc:
> >  04/07/2006 11:42 Subject:  404 on 
> > Surefire-Report Plugin
> >  AM
> >
> >
> >
> >
> > Dear List,
> >
> > I'm at the point now where I'm ready to start generating reports to go with
> > all of my spiffy code :)
> >
> > The logical starting point seemed to me to be the Surefire report, so I
> > went to maven.apache.org, clicked on "Available Plugins", and then
> > "surefire-report".  Unfortunately, this link gets redirected to
> > http://maven.apache.org/plugins/maven-surefire-report-plugin, which
> > displays a nice shiny "Page Not Found" error.
> >
> > I have opened an issue in JIRA (http://jira.codehaus.org/browse/MNG-2212).
> > In the meantime, can anyone point me to the real documentation for
> > maven-surefire-report-plugin?
> >
> >
> > Thanks,
> > Ian
> >
> >
> > It's better to be hated for who you are
> > than loved for who you are not
> >
> > Ian D. Stewart
> > Appl Dev Analyst-Advisory, DCS Automation
> > JPMorganChase Global Technology Infrastructure
> > Phone: (614) 244-2564
> > Pager: (888) 260-0078
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


--

- John

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