Re: Ignore module if missing - possible bug?

2007-03-20 Thread Jean-Luc Wasmer

I think I know why it didn't work: I was not in the project's directory.

I don't call mvn myself but it's done from a shell script which is done 
in a different directory (with the -f option).


Here's your example run:
1- in the project directory... everything works fine
2- outside the project directory... the profile doesn't get activated


macb-003:~/Development/test/parent jl$ mvn install
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   Example parent
[INFO]   Example module1
[INFO]   Example module2
[INFO] 


[INFO] Building Example parent
[INFO]task-segment: [install]
[INFO] 


[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing /Users/jl/Development/test/parent/pom.xml to 
/Users/jl/.m2/repository/org/example/example-parent/0.0.1-SNAPSHOT/example-parent-0.0.1-SNAPSHOT.pom
[INFO] 


[INFO] Building Example module1
[INFO]task-segment: [install]
[INFO] 


[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing /Users/jl/Development/test/parent/module1/pom.xml to 
/Users/jl/.m2/repository/org/example/module1/0.0.1-SNAPSHOT/module1-0.0.1-SNAPSHOT.pom
[INFO] 


[INFO] Building Example module2
[INFO]task-segment: [install]
[INFO] 


[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing /Users/jl/Development/test/parent/module2/pom.xml to 
/Users/jl/.m2/repository/org/example/module2/0.0.1-SNAPSHOT/module2-0.0.1-SNAPSHOT.pom

[INFO]
[INFO]
[INFO] 


[INFO] Reactor Summary:
[INFO] 

[INFO] Example parent  SUCCESS 
[1.734s]
[INFO] Example module1 ... SUCCESS 
[0.007s]
[INFO] Example module2 ... SUCCESS 
[0.016s]
[INFO] 

[INFO] 


[INFO] BUILD SUCCESSFUL
[INFO] 


[INFO] Total time: 2 seconds
[INFO] Finished at: Tue Mar 20 17:30:49 EDT 2007
[INFO] Final Memory: 3M/7M
[INFO] 



macb-003:~/Development/test/parent jl$ cd ..

macb-003:~/Development/test jl$ mvn -f parent/pom.xml install
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   Example parent
[INFO]   Example module1
[INFO] 


[INFO] Building Example parent
[INFO]task-segment: [install]
[INFO] 


[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing /Users/jl/Development/test/parent/pom.xml to 
/Users/jl/.m2/repository/org/example/example-parent/0.0.1-SNAPSHOT/example-parent-0.0.1-SNAPSHOT.pom
[INFO] 


[INFO] Building Example module1
[INFO]task-segment: [install]
[INFO] 


[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing /Users/jl/Development/test/parent/module1/pom.xml to 
/Users/jl/.m2/repository/org/example/module1/0.0.1-SNAPSHOT/module1-0.0.1-SNAPSHOT.pom

[INFO]
[INFO]
[INFO] 


[INFO] Reactor Summary:
[INFO] 

[INFO] Example parent  SUCCESS 
[1.593s]
[INFO] Example module1 ... SUCCESS 
[0.012s]
[INFO] 

[INFO] 


[INFO] BUILD SUCCESSFUL
[INFO] 


[INFO] Total time: 1 second
[INFO] Finished at: Tue Mar 20 17:31:06 EDT 2007
[INFO] Final Memory: 3M/7M
[INFO] 





Jean-Luc





Thierry Lach wrote:

Then you're probably doing something wrong.  Here's a simple test case.

(...)

On 3/20/07, Jean-Luc Wasmer <[EMAIL PROTECTED]> wrote:


That doesn't seem to work: the module never gets built (even when I
don't 

Re: Ignore module if missing

2007-03-20 Thread Thierry Lach

Then you're probably doing something wrong.  Here's a simple test case.

parent pom...


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
 org.example
 example-parent
 pom
 Example parent
 0.0.1-SNAPSHOT
 
   module1
 
 
   
 module2-build
 
   
 module2/pom.xml
   
 
 
   module2
 
   
 


module1 pom


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";>
 
   example-parent
   org.example
   0.0.1-SNAPSHOT
 
 4.0.0
 org.example
 module1
 pom
 0.0.1-SNAPSHOT
 Example module1



module2 pom


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";>
 
   example-parent
   org.example
   0.0.1-SNAPSHOT
 
 4.0.0
 org.example
 module2
 pom
 0.0.1-SNAPSHOT
 Example module2



execution

C:\src\modules>mvn install
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   Example parent
[INFO]   Example module1
[INFO]   Example module2
[INFO]

[INFO] Building Example parent
[INFO]task-segment: [install]
[INFO]

[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing C:\src\modules\pom.xml to c:\Documents and
Settings\lacht\.m2\repository\org\example\example-parent\0.0.1-SNAPSHOT
\example-parent-0.0.1-SNAPSHOT.pom
[INFO]

[INFO] Building Example module1
[INFO]task-segment: [install]
[INFO]

[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing C:\src\modules\module1\pom.xml to c:\Documents and
Settings\lacht\.m2\repository\org\example\module1\0.0.1-SNAPSHOT\module1-
0.0.1-SNAPSHOT.pom
[INFO]

[INFO] Building Example module2
[INFO]task-segment: [install]
[INFO]

[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing C:\src\modules\module2\pom.xml to c:\Documents and
Settings\lacht\.m2\repository\org\example\module2\0.0.1-SNAPSHOT\module2-
0.0.1-SNAPSHOT.pom
[INFO]
[INFO]
[INFO]

[INFO] Reactor Summary:
[INFO]

[INFO] Example parent  SUCCESS [
1.765s]
[INFO] Example module1 ... SUCCESS [
0.015s]
[INFO] Example module2 ... SUCCESS [
0.016s]
[INFO]

[INFO]

[INFO] BUILD SUCCESSFUL
[INFO]

[INFO] Total time: 2 seconds
[INFO] Finished at: Tue Mar 20 14:16:11 EDT 2007
[INFO] Final Memory: 3M/7M
[INFO]


C:\src\modules>

and with module2 missing

C:\src\modules>rename module2 module3

C:\src\modules>mvn install
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   Example parent
[INFO]   Example module1
[INFO]

[INFO] Building Example parent
[INFO]task-segment: [install]
[INFO]

[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing C:\src\modules\pom.xml to c:\Documents and
Settings\lacht\.m2\repository\org\example\example-parent\0.0.1-SNAPSHOT
\example-parent-0.0.1-SNAPSHOT.pom
[INFO]

[INFO] Building Example module1
[INFO]task-segment: [install]
[INFO]

[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing C:\src\modules\module1\pom.xml to c:\Documents and
Settings\lacht\.m2\repository\org\example\module1\0.0.1-SNAPSHO
T\module1-0.0.1-SNAPSHOT.pom
[INFO]
[INFO]
[INFO]

[INFO] Reactor Summary:
[INFO]

[INFO] Example parent  SUCCESS [
1.

Re: Ignore module if missing

2007-03-20 Thread Jean-Luc Wasmer
That doesn't seem to work: the module never gets built (even when I 
don't have an activation section).


Jean-Luc


Thierry Lach wrote:
I think this will work Define each module in a profile, then 
activate it

if the pom exists, something like this:


 module1-build
 
   
 module1/pom.xml
   
 
 
   module1
 




On 3/20/07, Jean-Luc Wasmer <[EMAIL PROTECTED]> wrote:


Hi,

I would like to disable some modules if their folder is missing instead
of failing.
How can I do this?


Jean-Luc 


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



Re: Ignore module if missing

2007-03-20 Thread Thierry Lach

I think this will work Define each module in a profile, then activate it
if the pom exists, something like this:


 module1-build
 
   
 module1/pom.xml
   
 
 
   module1
 




On 3/20/07, Jean-Luc Wasmer <[EMAIL PROTECTED]> wrote:


Hi,

I would like to disable some modules if their folder is missing instead
of failing.
How can I do this?


Jean-Luc

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