Quantcast

How can I trigger a makefile through Maven? is there any plugin for this?

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How can I trigger a makefile through Maven? is there any plugin for this?

bettypop
This post was updated on .
I need to trigger a makefile through Maven. Which plugin can I use so that I can mention makefile as the target that needs to be executed, in the pom.xml
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I trigger a makefile through Maven? is there any plugin for this?

Thomas Sundberg-2
Hi!

You might be interested in http://mojo.codehaus.org/exec-maven-plugin/

Or Google for 'maven exec plugin' and checkout the first hit.

/Thomas

On Wed, Apr 25, 2012 at 07:34, bettypop <[hidden email]> wrote:

>
>
> --
> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I trigger a makefile through Maven? is there any plugin for this?

bettypop
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:
<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>
                <directory>${native.source.dir}</directory>
        <plugins>
            <plugin>   
                                <groupId>org.codehaus.mojo</groupId>   
                                <artifactId>exec-maven-plugin</artifactId>   
                                <version>1.1</version> 
                                <executions>     
                                        <execution>           
                                                           
                                                <id>buildlib</id>       
                                                <phase>compile</phase>           
                                                <goals><goal>exec</goal></goals>           
                                                <configuration>   
                                                        <executable>C:\Program Files\apache-maven-3.0.4\TestProjectMaven\src\main\native\makefile</executable>             
                                                </configuration>         
                                        </execution>       
                                </executions> 
                        </plugin>
        </plugins>
    </build>

</project>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I trigger a makefile through Maven? is there any plugin for this?

bettypop
Basically, it is not recognizing the makefile as an operable program at all
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I trigger a makefile through Maven? is there any plugin for this?

Thomas Sundberg-2
On Wed, Apr 25, 2012 at 10:24, bettypop <[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I trigger a makefile through Maven? is there any plugin for this?

bettypop
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>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I trigger a makefile through Maven? is there any plugin for this?

Dave Wolf
In reply to this post by bettypop
If your goal is to compile / link c, c++, or fortran; then you might take a look at the maven-nar-plugin. We just began using it and so far, so good.

Dave Wolf

On Apr 25, 2012, at 12:31 AM, "bettypop" <[hidden email]> wrote:

>
>
> --
> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>

This electronic communication and any attachments may contain confidential and proprietary
information of DigitalGlobe, Inc. If you are not the intended recipient, or an agent or employee
responsible for delivering this communication to the intended recipient, or if you have received
this communication in error, please do not print, copy, retransmit, disseminate or
otherwise use the information. Please indicate to the sender that you have received this
communication in error, and delete the copy you received. DigitalGlobe reserves the
right to monitor any electronic communication sent or received by its employees, agents
or representatives.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I trigger a makefile through Maven? is there any plugin for this?

Wayne Fay
In reply to this post by Thomas Sundberg-2
> 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-

No, that isn't what is happening. Read the output from make in your
build log again:

> [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'.

"Nothing to be done". This is directly from make.

This is not something we (Maven Users) can help you with.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: How can I trigger a makefile through Maven? is there any plugin for this?

Lyons, Roy
In reply to this post by bettypop
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:[hidden email]]
Sent: Wednesday, April 25, 2012 4:56 AM
To: [hidden email]
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: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: How can I trigger a makefile through Maven? is there any plugin for this?

walshmatt
In reply to this post by bettypop

>> [INFO] make: Nothing to be done for `C:\Program
>> Files\apache-maven-3.0.4\maven-n
>> ative-example\src\main\makefile'

This looks like a makefile target/rule/dependency issue, not a Maven
issue.

> -----Original Message-----
> From: bettypop [mailto:[hidden email]]
> Sent: Wednesday, April 25, 2012 3:56 AM
> To: [hidden email]
> 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: [hidden email]
> For additional commands, e-mail: [hidden email]


______________________________________________________________________
This message, including any attachments, is confidential and contains information intended only for the person(s) named above. Any other distribution, copying or disclosure is strictly prohibited. If you are not the intended recipient or have received this message in error, please notify us immediately by reply email and permanently delete the original transmission from all of your systems and hard drives, including any attachments, without making a copy.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I trigger a makefile through Maven? is there any plugin for this?

Manfred Moser
In reply to this post by bettypop
Look at the exec plugin in the extreme case that there is no more suitable
plugin to do you native build.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I trigger a makefile through Maven? is there any plugin for this?

Karl Heinz Marbaise-3
In reply to this post by bettypop
Hi,

i would suggest to take a deeper look into the maven-nar-plugin


--
SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
Hauptstrasse 177                         USt.IdNr: DE191347579
52146 Würselen                           http://www.soebes.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I trigger a makefile through Maven? is there any plugin for this?

Karl Heinz Marbaise-3
Hi,

sorry forgot the link.

> i would suggest to take a deeper look into the maven-nar-plugin

http://duns.github.com/maven-nar-plugin/

Kind regards
Karl Heinz Marbaise
--
SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
Hauptstrasse 177                         USt.IdNr: DE191347579
52146 Würselen                           http://www.soebes.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I trigger a makefile through Maven? is there any plugin for this?

Manfred Moser
In reply to this post by bettypop
Get you Maven installed into a folder without spaces in it and get the
project into a different folder..

that should do the trick.

manfred

On Wed, April 25, 2012 1:22 am, bettypop wrote:

> 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:*
> <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>
> <directory>${native.source.dir}</directory>
>         <plugins>
>             <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>exec-maven-plugin</artifactId>
> <version>1.1</version>
> <executions>
> <execution>
>
> <id>buildlib</id>
> <phase>compile</phase>
> <goals><goal>exec</goal></goals>
> <configuration>
> <executable>C:\Program
> Files\apache-maven-3.0.4\TestProjectMaven\src\main\native\makefile</executable>
> </configuration>
> </execution>
> </executions>
> </plugin>
>         </plugins>
>     </build>
>
> </project>
>
> --
> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I trigger a makefile through Maven? is there any plugin for this?

bettypop
This post was updated on .
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:

It has two folders-  'maven-archiver', 'surefire' and a 'nativeTestProjectMaven-1.0-SNAPSHOT.jar' file

It creates a .jar file. I am confused
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I trigger a makefile through Maven? is there any plugin for this?

Wayne Fay
> It's not an issue with the makefile, coz' it executes properly when run
> independently. It compiles my source file and creates a .exe.

I assure you -- it is an issue with your makefile. You most likely
just need to add a call to "clean" in there so make thinks it needs to
build things again:
all: clean 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.*
>
> It creates a .jar file. I am confused!

Maven creates jar files for projects configured to create a jar which
is the default. What were you expecting Maven to create if not a jar
file?

Please follows the advice of others and look into the nar plugin.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: How can I trigger a makefile through Maven? is there any plugin for this?

walshmatt
In reply to this post by bettypop
You're getting a jar file because by omission of the <packaging>
element, that's what you've asked for.

There's nothing in that makefile that tells it to put anything in your
target directory. I'd look for it beside the helloworld.c, wherever that
is.

> -----Original Message-----
> From: bettypop [mailto:[hidden email]]
> Sent: Thursday, April 26, 2012 12:25 AM
> To: [hidden email]
> Subject: 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: [hidden email]
> For additional commands, e-mail: [hidden email]


______________________________________________________________________
This message, including any attachments, is confidential and contains information intended only for the person(s) named above. Any other distribution, copying or disclosure is strictly prohibited. If you are not the intended recipient or have received this message in error, please notify us immediately by reply email and permanently delete the original transmission from all of your systems and hard drives, including any attachments, without making a copy.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: How can I trigger a makefile through Maven? is there any plugin for this?

bettypop
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?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: How can I trigger a makefile through Maven? is there any plugin for this?

huseyn
Hi,

I have eigtht libraries. There are very dependieces. I use c/c++ and makefile. How can I solve the problem of dependency?  Can you help me?


Thanks,

Huseyn D.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I trigger a makefile through Maven? is there any plugin for this?

Ed Hillmann-2
Use the native plugin?

http://mojo.codehaus.org/maven-native/native-maven-plugin/

I've never used this, so I'm not much more help than supplying the URL

On Mon, Jul 30, 2012 at 10:49 PM, huseyn <[hidden email]> wrote:

> Hi,
>
> I have eigtht libraries. There are very dependieces. I use c/c++ and
> makefile. How can I solve the problem of dependency?  Can you help me?
>
>
> Thanks,
>
> Huseyn D.
>
>
>
>
> --
> 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-tp5663921p5715218.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
12
Loading...