Maven 1

Using --dir and --find don't seem to work

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-beta-10
  • Fix Version/s: 1.0-rc1
  • Component/s: None
  • Labels:
    None
  • Environment:
    win 2k and maven beta 10
  • Number of attachments :
    0

Description

I am in c:\java and I want to run the maven build in c:\java\projectA\. It seems like maven --dir c:\java\projectA war:webapp would do it, but I get an error ons or it builds the Global Project:

C:\clients\Upstate>maven --dir c:\clients\upstate\fortius\ war
__ __

\/ __ Apache_ ___
  \/ / ` \ V / -) ' \ ~ intelligent projects ~
_   _,_ _/___ _ _ v. 1.0-beta-10

[echo] Assembling webapp Global Project
[echo] Building WAR Global Project
BUILD SUCCESSFUL
Total time: 2 seconds

Activity

Hide
dion gillard added a comment -

Can you test this against the stable branch?

I believe this was fixed yesterday.

Show
dion gillard added a comment - Can you test this against the stable branch? I believe this was fixed yesterday.
Hide
David Eric Pugh added a comment -

Dion,

The --dir command works great with the new CVS HEAD (was STABLE).

However, the --find doesn't work, but that may be user error...! I have a project.xml in c:\clients\upstate\fortius, if I am in c:\clients\upstate I tried maven -f c:\clients\upstate\fortius test but it seemed to build locally in c:\clients\upstate, but use the project.xml in c:\clients\upstate\fortius.

This could be because I don't understand the semantics of --find. However, --dir is what I really wanted, so I'm happy.

Show
David Eric Pugh added a comment - Dion, The --dir command works great with the new CVS HEAD (was STABLE). However, the --find doesn't work, but that may be user error...! I have a project.xml in c:\clients\upstate\fortius, if I am in c:\clients\upstate I tried maven -f c:\clients\upstate\fortius test but it seemed to build locally in c:\clients\upstate, but use the project.xml in c:\clients\upstate\fortius. This could be because I don't understand the semantics of --find. However, --dir is what I really wanted, so I'm happy.
Hide
dion gillard added a comment -

--find doesn't take an argument.

It simply starts from ${user.dir} and goes looking up the tree till it finds a project.xml

I've added a fix to App.java, so that whereever it does find it becomes the CWD.

Can you retest?

Show
dion gillard added a comment - --find doesn't take an argument. It simply starts from ${user.dir} and goes looking up the tree till it finds a project.xml I've added a fix to App.java, so that whereever it does find it becomes the CWD. Can you retest?
Hide
dion gillard added a comment -

C:\source\maven>cd src\java

C:\source\maven\src\java>maven --find test
__ __

\/ __ Apache_ ___
  \/ / ` \ V / -) ' \ ~ intelligent projects ~
_   _,_ _/___ _ _ v. 1.0-rc1-SNAPSHOT

java:prepare-filesystem:

java:compile:
[echo] Compiling to C:\source\maven/target/classes

java:jar-resources:

test:prepare-filesystem:

test:test-resources:

test:compile:

test:test:
...
...
...

jar:jar:
[jar] Building jar: C:\source\maven\target\maven.jar
BUILD SUCCESSFUL
Total time: 55 seconds
Finished at: Thu Aug 21 12:00:07 EST 2003

C:\source\maven\src\java>

Show
dion gillard added a comment - C:\source\maven>cd src\java C:\source\maven\src\java>maven --find test __ __
\/ __ Apache_ ___
  \/ / ` \ V / -) ' \ ~ intelligent projects ~
_   _,_ _/___ _ _ v. 1.0-rc1-SNAPSHOT
java:prepare-filesystem: java:compile: [echo] Compiling to C:\source\maven/target/classes java:jar-resources: test:prepare-filesystem: test:test-resources: test:compile: test:test: ... ... ... jar:jar: [jar] Building jar: C:\source\maven\target\maven.jar BUILD SUCCESSFUL Total time: 55 seconds Finished at: Thu Aug 21 12:00:07 EST 2003 C:\source\maven\src\java>

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: