RE: Error in simple Maven build file

2004-08-10 Thread Andreas.Ebbert
Hi,

 -Original Message-
 From: ext Claus Pedersen [mailto:[EMAIL PROTECTED]

 The file test.c :
 
 int main()
 {
   int a = A;
   printf(a = %i,a);
   return a;
 }

 All the right values are returned, but why does it say 
 [ERROR] after the
 execution?

My C(++) days lay years behind me, but I think you are giving back an error code 
(return a), that's why maven assums, that something went wront. try return 0 instead.

BR,
Andreas Ebbert

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



Re: Error in simple Maven build file

2004-08-10 Thread Arto Pastinen
Hi!

I think that you c code should return 0 as return value, usually other
than 0 means some error.

Artsi

ti, 2004-08-10 kello 13:53, Claus Pedersen kirjoitti:
 I have the following maven.xml file:
 
 project xmlns:j=jelly:core
 goal name=myGoal
 
 j:forEach begin=1 end=5 indexVar=i
   echo${i}/echo
   
   exec executable=gcc
   arg line= -DA=${i} test.c -o test.exe/
   /exec
   exec executable=test/
   
 /j:forEach
 /goal
 /project
 
 
 The file test.c :
 
 int main()
 {
   int a = A;
   printf(a = %i,a);
   return a;
 }
 
 It looks like it works... I get the right output from the function
 
 Here is the Maven output:
 
 build:start:
 
 myGoal:
 [echo] 1
 [exec] a = 1
 [exec] [ERROR] Result: 1
 [echo] 2
 [exec] a = 2
 [exec] [ERROR] Result: 2
 [echo] 3
 [exec] a = 3
 [exec] [ERROR] Result: 3
 [echo] 4
 [exec] a = 4
 [exec] [ERROR] Result: 4
 [echo] 5
 [exec] a = 5
 [exec] [ERROR] Result: 5
 BUILD SUCCESSFUL
 Total time: 2 seconds
 
 
 All the right values are returned, but why does it say [ERROR] after the
 execution?
 
 I hope you have an answer.
 
 Best regards,
 Claus
 
 
 -
 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]