I would like to submit that the issue is that "make" already sees the built 
binaries and the sources have not modified so a re-build is not triggered.

http://maven.apache.org/plugins/maven-clean-plugin/examples/delete_additional_files.html

you will want to modify your pom to include these items in a clean, and add 
"clean" as your first maven target to force a build to take place.

-----Original Message-----
From: bettypop [mailto:yashu....@gmail.com] 
Sent: Wednesday, April 25, 2012 4:56 AM
To: users@maven.apache.org
Subject: 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*

<project xmlns="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";>
    <modelVersion>4.0.0</modelVersion>
        
        <groupId>com.nds.TestProjectMaven</groupId>
        <artifactId>nativeTestProjectMaven</artifactId>
        <version>1.0-SNAPSHOT</version>

        
        <name>TestProjectMaven</name>
        <url>http://maven.apache.org</url>
        
        <properties>
        <native.source.dir>C:\Program
Files\apache-maven-3.0.4\maven-native-example\src\main\native</native.source.dir>
                <native.build.dir>../../../target/native</native.build.dir>
    </properties>

    

    <build>
        <plugins>
            <plugin>    
                                <groupId>org.codehaus.mojo</groupId>    
                                <artifactId>exec-maven-plugin</artifactId>    
                                <version>1.1</version>  
                                <executions>      
                                        <execution>            
                                                            
                                                <id>exe</id>        
                                                <phase>compile</phase>          
  
                                               
<goals><goal>exec</goal></goals>            
                                                <configuration>    
                                                       
<executable>C:\Program Files\GnuWin32\bin\make</executable>  
                                                        <arguments>
                                                                       
<argument>C:\Program
Files\apache-maven-3.0.4\maven-native-example\src\main\makefile</argument>
                                                        </arguments>
                                                        
                                                </configuration>          
                                        </execution>        
                                </executions>  
                        </plugin>
        </plugins>
    </build>

</project>






*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+05:30 2012 
[INFO] Final Memory: 5M/15M 
[INFO]
------------------------------------------------------------------------ 
C:\Program Files\apache-maven-3.0.4\maven-native-example> 


--
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-tp5663921p5664373.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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to