Do you have a project.xml in that directory?
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/
Work:      http://www.multitask.com.au


"David Liles" <[EMAIL PROTECTED]> wrote on 18/06/2003 02:37:13 PM:

> Thanks for the info however, when I entered the below line I got the
> following error.
> 
> I'm not sure what I need to do at this point....
> 
> Thanks
> 
> 
> C:\projects>maven -Dpackage=com.example.test testapp
>  __  __
> |  \/  |__ Jakarta _ ___
> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
> |_|  |_\__,_|\_/\___|_||_|  v. 1.0-beta-9-SNAPSHOT
> 
> java.lang.NullPointerException
>         at org.apache.maven.plugin.PluginManager.
> attainGoals(PluginManager.java:
> 376)
>         at 
org.apache.maven.MavenSession.attainGoals(MavenSession.java:357)
>         at org.apache.maven.cli.App.doMain(App.java:524)
>         at org.apache.maven.cli.App.main(App.java:1080)
>         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:324)
>         at com.werken.forehead.Forehead.run(Forehead.java:543)
>         at com.werken.forehead.Forehead.main(Forehead.java:573)
> Total time:  7 seconds
> 
> 
>    -----Original Message----- 
>    From: Brian Ewins [mailto:[EMAIL PROTECTED] 
>    Sent: Mon 6/16/2003 9:19 AM 
>    To: Maven Users List 
>    Cc: 
>    Subject: Re: running project
> 
> 
> 
>    Maven (like ant and make) depends on a build descriptor - project.xml 
-
>    that it expects to find in the base directory of your project. e.g. 
if
>    you have a file named:
>    ~/myproject/src/com/foo/Example.java
>    ... then its very likely the directory '~/myproject/' is where you 
want
>    to place your project.xml. If you want to compile the current project
>    from anywhere at or below this directory, you can just do:
>    maven -f project.xml java:compile
> 
>    the '-f' tells maven to look for the first available 'project.xml' in
>    this dir or any of its parents, and use that as the project.xml for 
the
>    build.
> 
>    The best way to see how this works isn't to start with an existing
>    project, but to get maven to generate a project for you. In an empty
>    directory, type:
>    maven -Dpackage=com.example.foo genapp
>    maven will generate a project.xml for you, and an example directory
>    structure, including examples of how to use unit tests with 
> maven. Now type:
>    maven test:test
>    This will compile the sample code and its tests, and run the tests.
> 
>    As for the site:deploy problem: by default maven will try to 'deploy' 
to
>    a secure server using scp, which requires a username and password. 
This
>    is used for deploying to remote live sites. Look at
>    <http://maven.apache.org/reference/plugins/site/properties.html>
>    especially at the "maven.site.deploy.method" property which should 
help
>    you do what you're after. You set this in a properties file called
>    project.properties - again in the project root.
> 
>    You don't need to use the maven folder structure, but it helps. You 
can
>    configure maven to look elsewhere (in a *single* source folder, 
though),
>    see the manual:
>    <http://maven.apache.org/reference/project-descriptor.html#build>
>    (sourceDirectory is the thing you're looking for - its in your
>    project.xml). You can set up multiple source dirs for code generation
>    and the like, but you'd be better coming back and asking about that 
once
>    you have simple projects working.
> 
>    Hope this helps
>            Baz
> 
>    David Liles wrote:
> 
>    > I just configured Maven and am having trouble understanding the
> structure and getting my project to run.
>    > 
>    > The documentation states that all projects must have a project.
> xml file. I've modified an example file but now how do I execute it,
> what is the call statement I should use?
>    >
>    > How do I get Maven to compile my source code? I have tried 
> using the physical path, relative path, everything.... so far I've 
> had no luck. I get a message that states there was no source code found.
>    > 
>    > Also, when I call maven site:deploy I get and error stating 
> that I need to provide a username in order to deploy the project. 
> The username can be placed in the build.property file.... but where 
> does the build.property file need to be located?
>    > 
>    > Finally, do I need to place all of my project source code in 
> the maven folder structure now?
>    > 
>    > Thanks.
>    > 
>    > Dave
>    >
>    > 
---------------------------------------------------------------------
>    > 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]

Reply via email to