RE: How can I trigger a makefile through Maven? is there any plugin for this?
Actually there are existing makefiles that we want to use, instead of converting them again into xml files. So I want to know how I can use my makefiles in Maven. I read up on the *Maven Make Orchestration Plugin*. But there are very less resources on the net about it. Can anyone throw some light on how I can use Maven Make Orchestration Plugin to include makefiles in my Maven build life cycle? -- View this message in context: http://maven.40175.n5.nabble.com/How-can-I-trigger-a-makefile-through-Maven-is-there-any-plugin-for-this-tp5663921p5685213.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How can I trigger a makefile through Maven? is there any plugin for this?
It's not an issue with the makefile, coz' it executes properly when run independently. It compiles my source file and creates a .exe. *This is my makefile*: all: hello hello: helloWorld.o gcc helloWorld.o -o hello helloWorld.o: helloWorld.c gcc -c helloWorld.c clean: rm -rf *o hello *Now, I want to trigger this makefile through Maven. The compilation will be done by the makefile and not Maven. Maven should just trigger it.* When I run 'mvn install', This is what I see in the target folder: http://maven.40175.n5.nabble.com/file/n5666817/untitled.bmp It creates a .jar file. I am confused! -- View this message in context: http://maven.40175.n5.nabble.com/How-can-I-trigger-a-makefile-through-Maven-is-there-any-plugin-for-this-tp5663921p5666817.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How can I trigger a makefile through Maven? is there any plugin for this?
Hi, I did as you said. But it is not compiling the target which I have mentioned in the makefile. My target is a C file and in the makefile I am just compiling the target. My updated POM.xml and the result I got on execution- *POM.xml* 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.nds.TestProjectMaven nativeTestProjectMaven 1.0-SNAPSHOT TestProjectMaven http://maven.apache.org C:\Program Files\apache-maven-3.0.4\maven-native-example\src\main\native ../../../target/native org.codehaus.mojo exec-maven-plugin 1.1 exe compile exec C:\Program Files\GnuWin32\bin\make C:\Program Files\apache-maven-3.0.4\maven-native-example\src\main\makefile *On mvn install:* C:\Program Files\apache-maven-3.0.4\maven-native-example>mvn install [INFO] Scanning for projects... [INFO] [INFO] [INFO] Building TestProjectMaven 1.0-SNAPSHOT [INFO] [INFO] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ nativeTest ProjectMaven --- [debug] execute contextualize [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Program Files\apache-maven-3.0.4\m aven-native-example\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ nativeTestPro jectMaven --- [INFO] No sources to compile [INFO] [INFO] --- exec-maven-plugin:1.1:exec (exe) @ nativeTestProjectMaven --- [INFO] make: Nothing to be done for `C:\Program Files\apache-maven-3.0.4\maven-n ative-example\src\main\makefile'. [INFO] [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ na tiveTestProjectMaven --- [debug] execute contextualize [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Program Files\apache-maven-3.0.4\m aven-native-example\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ nativ eTestProjectMaven --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.10:test (default-test) @ nativeTestProjectMav en --- [INFO] No tests to run. [INFO] Surefire report directory: C:\Program Files\apache-maven-3.0.4\maven-nati ve-example\target\surefire-reports --- T E S T S --- Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ nativeTestProjectMaven --- [WARNING] JAR will be empty - no content was marked for inclusion! [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ nativeTestProj ectMaven --- [INFO] Installing C:\Program Files\apache-maven-3.0.4\maven-native-example\targe t\nativeTestProjectMaven-1.0-SNAPSHOT.jar to C:\Documents and Settings\yashaswin is\.m2\repository\com\nds\TestProjectMaven\nativeTestProjectMaven\1.0-SNAPSHOT\n ativeTestProjectMaven-1.0-SNAPSHOT.jar [INFO] Installing C:\Program Files\apache-maven-3.0.4\maven-native-example\pom.x ml to C:\Documents and Settings\yashaswinis\.m2\repository\com\nds\TestProjectMa ven\nativeTestProjectMaven\1.0-SNAPSHOT\nativeTestProjectMaven-1.0-SNAPSHOT.pom [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] Total time: 1.438s [INFO] Finished at: Wed Apr 25 15:12:36 GMT
Re: How can I trigger a makefile through Maven? is there any plugin for this?
12 [INFO] Final Memory: 5M/15M [INFO] C:\Program Files\apache-maven-3.0.4\maven-native-example> Thomas Sundberg-2 wrote > > On Wed, Apr 25, 2012 at 10:24, bettypop <yashu.s30@> wrote: >> Basically, it is not recognizing the makefile as an operable program at >> all > > Make files are not executables so this should not surprise anybody. > > What you probably would want to do is execute 'make' and supply it > with the proper makefile as argument. > > /Thomas > > >> >> -- >> View this message in context: >> http://maven.40175.n5.nabble.com/How-can-I-trigger-a-makefile-through-Maven-is-there-any-plugin-for-this-tp5663921p5664179.html >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscribe@.apache >> For additional commands, e-mail: users-help@.apache >> > > > > -- > Thomas Sundberg > M. Sc. in Computer Science > > Mobile: +46 70 767 33 15 > Blog: http://thomassundberg.wordpress.com/ > Twitter: @thomassundberg > > Better software through faster feedback > > ----- > To unsubscribe, e-mail: users-unsubscribe@.apache > For additional commands, e-mail: users-help@.apache > Thomas Sundberg-2 wrote > > On Wed, Apr 25, 2012 at 10:24, bettypop <yashu.s30@> wrote: >> Basically, it is not recognizing the makefile as an operable program at >> all > > Make files are not executables so this should not surprise anybody. > > What you probably would want to do is execute 'make' and supply it > with the proper makefile as argument. > > /Thomas > > >> >> -- >> View this message in context: >> http://maven.40175.n5.nabble.com/How-can-I-trigger-a-makefile-through-Maven-is-there-any-plugin-for-this-tp5663921p5664179.html >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscribe@.apache >> For additional commands, e-mail: users-help@.apache >> > > > > -- > Thomas Sundberg > M. Sc. in Computer Science > > Mobile: +46 70 767 33 15 > Blog: http://thomassundberg.wordpress.com/ > Twitter: @thomassundberg > > Better software through faster feedback > > - > To unsubscribe, e-mail: users-unsubscribe@.apache > For additional commands, e-mail: users-help@.apache > Thomas Sundberg-2 wrote > > On Wed, Apr 25, 2012 at 10:24, bettypop <yashu.s30@> wrote: >> Basically, it is not recognizing the makefile as an operable program at >> all > > Make files are not executables so this should not surprise anybody. > > What you probably would want to do is execute 'make' and supply it > with the proper makefile as argument. > > /Thomas > > >> >> -- >> View this message in context: >> http://maven.40175.n5.nabble.com/How-can-I-trigger-a-makefile-through-Maven-is-there-any-plugin-for-this-tp5663921p5664179.html >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscribe@.apache >> For additional commands, e-mail: users-help@.apache >> > > > > -- > Thomas Sundberg > M. Sc. in Computer Science > > Mobile: +46 70 767 33 15 > Blog: http://thomassundberg.wordpress.com/ > Twitter: @thomassundberg > > Better software through faster feedback > > - > To unsubscribe, e-mail: users-unsubscribe@.apache > For additional commands, e-mail: users-help@.apache > Thomas Sundberg-2 wrote > > On Wed, Apr 25, 2012 at 10:24, bettypop <yashu.s30@> wrote: >> Basically, it is not recognizing the makefile as an operable program at >> all > > Make files are not executables so this should not surprise anybody. > > What you probably would want to do is execute 'make' and supply it > with the proper makefile as argument. > > /Thomas > > >> >> -- >> View this message in context: >> http://maven.40175.n5.nabble.com/How-can-I-trigger-a-makefile-through-Maven-is-there-any-plugin-for-this-tp5663921p5664179.html >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> -
Re: How can I trigger a makefile through Maven? is there any plugin for this?
Basically, it is not recognizing the makefile as an operable program at all -- View this message in context: http://maven.40175.n5.nabble.com/How-can-I-trigger-a-makefile-through-Maven-is-there-any-plugin-for-this-tp5663921p5664179.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How can I trigger a makefile through Maven? is there any plugin for this?
Hi I am using the maven-exec-plugin. But on trying to compile the build, I get the following error: [INFO] Scanning for projects... [INFO] [INFO] [INFO] Building TestProjectMaven 1.0-SNAPSHOT [INFO] [INFO] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ nativeTest ProjectMaven --- [debug] execute contextualize [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Program Files\apache-maven-3.0.4\T estProjectMaven\src\main\native\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ nativeTestPro jectMaven --- [INFO] No sources to compile [INFO] [INFO] --- exec-maven-plugin:1.1:exec (buildlib) @ nativeTestProjectMaven --- [INFO] '"C:\Program Files\apache-maven-3.0.4\TestProjectMaven\src\main\native\ma kefile"' is not recognized as an internal or external command, [INFO] operable program or batch file. [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 2.469s [INFO] Finished at: Wed Apr 25 12:50:11 GMT+05:30 2012 [INFO] Final Memory: 4M/15M [INFO] [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1:exec (bui ldlib) on project nativeTestProjectMaven: Result of cmd.exe /X /C ""C:\Program F iles\apache-maven-3.0.4\TestProjectMaven\src\main\native\makefile"" execution is : '1'. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE xception C:\Program Files\apache-maven-3.0.4\TestProjectMaven\src\main\native> C:\Program Files\apache-maven-3.0.4\TestProjectMaven\src\main\native> *My POM.xml looks like this:* 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.nds.TestProjectMaven nativeTestProjectMaven 1.0-SNAPSHOT TestProjectMaven http://maven.apache.org C:\Program Files\apache-maven-3.0.4\maven-native-example\src\main\native ../../../target/native ${native.source.dir} org.codehaus.mojo exec-maven-plugin 1.1 buildlib compile exec C:\Program Files\apache-maven-3.0.4\TestProjectMaven\src\main\native\makefile -- View this message in context: http://maven.40175.n5.nabble.com/How-can-I-trigger-a-makefile-through-Maven-is-there-any-plugin-for-this-tp5663921p5664177.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
How can I trigger a makefile through Maven? is there any plugin for this?
-- View this message in context: http://maven.40175.n5.nabble.com/How-can-I-trigger-a-makefile-through-Maven-is-there-any-plugin-for-this-tp5663921p5663921.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org