aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Using Makefile from pom.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Using Makefile from pom.xml" Watch "Using Makefile from pom.xml" New topic
Author

Using Makefile from pom.xml

nikunj Shrestha
Greenhorn

Joined: Mar 26, 2013
Posts: 2
Hello everyone,
i was looking for the way to create a RPM for a project in maven using command line or eclipse. how do i include / invoke the makefile from the pom.xml. i tried to use make-maven plugin but could not find more about it's usage online. any help??? what are the tags and attributes that are suppose to be added in pom file to make use of makefile???

thank you
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15629
    
  15

Welcome to the Ranch, Nikunj!

I am confused about why you want to do this. When using Maven to build an RPM, the POM is the "makefile".

For a non-Maven RPM project, the makefile is in the RPM source directory that is created under your RPM SOURCES directory when the RPM build process unpacks the SRPM. But if Maven is doing the build, then Maven has to do what Maven does, and normally this doesn't involve a non-Java build step or even an SRPM unpack/build operation.


Customer surveys are for companies who didn't pay proper attention to begin with.
nikunj Shrestha
Greenhorn

Joined: Mar 26, 2013
Posts: 2
Tim Holloway wrote:Welcome to the Ranch, Nikunj!

I am confused about why you want to do this. When using Maven to build an RPM, the POM is the "makefile".

For a non-Maven RPM project, the makefile is in the RPM source directory that is created under your RPM SOURCES directory when the RPM build process unpacks the SRPM. But if Maven is doing the build, then Maven has to do what Maven does, and normally this doesn't involve a non-Java build step or even an SRPM unpack/build operation.


Thank you.
M confused too.
Let me ask one thing, ok i have some files in this project, that should be compiled through different compiler and all the compiled files should be deployed. that's what this makefile does : creates dir, and run the files through compiler. and i m trying to use RPM-maven plugin to create RPM out of those compiled files before deploying. Any suggestions on what can be done?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15629
    
  15

There are several different ways you could attempt this. Probably the best of them involve having separate projects for each of the various java and non-java components, then bringing them together in an RPM-building project that produces the actual RPM. That would normally involve a master POM and component POMs. Except that for the non-java stuff, you ultimately want to run that component's makefile.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using Makefile from pom.xml
 
Similar Threads
Is Maven that good? Non-Standard artifact creation.
Maven or Ant?
class file has wrong version 50.0, should be 49.0
Modify build xml to replace words in an xml or properties file based on a text file
Maven sync and plugin