Building pjsip with Maven

DT
David Talmage
Wed, Dec 7, 2016 7:18 PM

I'm looking for help to build pjsip with Maven on and for Linux.  If
you have a working pom.xml for this, please contact me.

I am investigating both org.codehaus.mojo/native-maven-plugin and
com.github.maven-nar/nar-maven-plugin.  I am leaning toward
native-maven-plugin.

In the meantime, I am trying to make this work myself.  If I am
successful, I will post my pom.xml or a link to it.

David Talmage

I'm looking for help to build pjsip with Maven on and for Linux. If you have a working pom.xml for this, please contact me. I am investigating both org.codehaus.mojo/native-maven-plugin and com.github.maven-nar/nar-maven-plugin. I am leaning toward native-maven-plugin. In the meantime, I am trying to make this work myself. If I am successful, I will post my pom.xml or a link to it. David Talmage
DT
David Talmage
Thu, Dec 8, 2016 11:11 PM

On Wed, Dec 7, 2016 at 11:18 AM, David Talmage sip.phone.fan@gmail.com wrote:

I'm looking for help to build pjsip with Maven on and for Linux.  If
you have a working pom.xml for this, please contact me.

I was successful.  With some help from Eclipse, I created a pom.xml
that can compile pjsip.

I am investigating both org.codehaus.mojo/native-maven-plugin and
com.github.maven-nar/nar-maven-plugin.  I am leaning toward
native-maven-plugin.

I used neither one of these.  Instead, I used
org.apache.maven.plugins/maven-antrun-plugin.

My pom.xml can only compile pjsip.  It doesn't do anything for the
other phases of pjsip's life cycle.

This page got me started:
https://blog.jayway.com/2013/06/10/how-to-use-make-and-makefile-in-maven-pom-xml/

This page https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html
helped me to configure maven-antrun-plugin. Eclipse's Quick Fix
provided the pluginManagement element.

In the meantime, I am trying to make this work myself.  If I am
successful, I will post my pom.xml or a link to it.

Here it is:

<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>pjproject-2.2.1</groupId>
<artifactId>pjproject-2.2.1</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>PJSIP libraries</name>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.8.1</version>
</dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.8</version>
            <executions>
                <execution>
                    <id>make</id>
                    <phase>compile</phase>
                    <configuration>
                        <target name="make" description="Invoke

make(1) to compile pjproject-2.2.1">
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" />
<echo>RUNNING MAKE!"</echo>
<exec executable="make" failonerror="true" dir="${project.basedir}" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-antrun-plugin
</artifactId>
<versionRange>[1.8,)</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

On Wed, Dec 7, 2016 at 11:18 AM, David Talmage <sip.phone.fan@gmail.com> wrote: > I'm looking for help to build pjsip with Maven on and for Linux. If > you have a working pom.xml for this, please contact me. I was successful. With some help from Eclipse, I created a pom.xml that can compile pjsip. > I am investigating both org.codehaus.mojo/native-maven-plugin and > com.github.maven-nar/nar-maven-plugin. I am leaning toward > native-maven-plugin. I used neither one of these. Instead, I used org.apache.maven.plugins/maven-antrun-plugin. My pom.xml can only compile pjsip. It doesn't do anything for the other phases of pjsip's life cycle. This page got me started: https://blog.jayway.com/2013/06/10/how-to-use-make-and-makefile-in-maven-pom-xml/ This page https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html helped me to configure maven-antrun-plugin. Eclipse's Quick Fix provided the pluginManagement element. > In the meantime, I am trying to make this work myself. If I am > successful, I will post my pom.xml or a link to it. Here it is: <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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>pjproject-2.2.1</groupId> <artifactId>pjproject-2.2.1</artifactId> <version>0.0.1-SNAPSHOT</version> <name>PJSIP libraries</name> <dependencies> <dependency> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1</version> </dependency> <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.8</version> </dependency> <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant-nodeps</artifactId> <version>1.8.1</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.8</version> <executions> <execution> <id>make</id> <phase>compile</phase> <configuration> <target name="make" description="Invoke make(1) to compile pjproject-2.2.1"> <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" /> <echo>RUNNING MAKE!"</echo> <exec executable="make" failonerror="true" dir="${project.basedir}" /> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> </plugins> <pluginManagement> <plugins> <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. --> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId> org.apache.maven.plugins </groupId> <artifactId> maven-antrun-plugin </artifactId> <versionRange>[1.8,)</versionRange> <goals> <goal>run</goal> </goals> </pluginExecutionFilter> <action> <ignore></ignore> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> </build> </project>
M
Ming
Fri, Dec 9, 2016 1:04 AM

Thanks, David. Hopefully it can help others as well.

On Fri, Dec 9, 2016 at 7:11 AM, David Talmage sip.phone.fan@gmail.com
wrote:

On Wed, Dec 7, 2016 at 11:18 AM, David Talmage sip.phone.fan@gmail.com
wrote:

I'm looking for help to build pjsip with Maven on and for Linux.  If
you have a working pom.xml for this, please contact me.

I was successful.  With some help from Eclipse, I created a pom.xml
that can compile pjsip.

I am investigating both org.codehaus.mojo/native-maven-plugin and
com.github.maven-nar/nar-maven-plugin.  I am leaning toward
native-maven-plugin.

I used neither one of these.  Instead, I used
org.apache.maven.plugins/maven-antrun-plugin.

My pom.xml can only compile pjsip.  It doesn't do anything for the
other phases of pjsip's life cycle.

This page got me started:
https://blog.jayway.com/2013/06/10/how-to-use-make-and-
makefile-in-maven-pom-xml/

This page https://www.eclipse.org/m2e/documentation/m2e-execution-
not-covered.html
helped me to configure maven-antrun-plugin. Eclipse's Quick Fix
provided the pluginManagement element.

In the meantime, I am trying to make this work myself.  If I am
successful, I will post my pom.xml or a link to it.

Here it is:

<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>pjproject-2.2.1</groupId>
<artifactId>pjproject-2.2.1</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>PJSIP libraries</name>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.8.1</version>
</dependency>
</dependencies>

 <build>
     <plugins>
         <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-antrun-plugin</artifactId>
             <version>1.8</version>
             <executions>
                 <execution>
                     <id>make</id>
                     <phase>compile</phase>
                     <configuration>
                         <target name="make" description="Invoke

make(1) to compile pjproject-2.2.1">
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" />
<echo>RUNNING MAKE!"</echo>
<exec executable="make" failonerror="true" dir="${project.basedir}" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-antrun-plugin
</artifactId>
<versionRange>[1.8,)</
versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Thanks, David. Hopefully it can help others as well. On Fri, Dec 9, 2016 at 7:11 AM, David Talmage <sip.phone.fan@gmail.com> wrote: > On Wed, Dec 7, 2016 at 11:18 AM, David Talmage <sip.phone.fan@gmail.com> > wrote: > > I'm looking for help to build pjsip with Maven on and for Linux. If > > you have a working pom.xml for this, please contact me. > > > I was successful. With some help from Eclipse, I created a pom.xml > that can compile pjsip. > > > I am investigating both org.codehaus.mojo/native-maven-plugin and > > com.github.maven-nar/nar-maven-plugin. I am leaning toward > > native-maven-plugin. > > I used neither one of these. Instead, I used > org.apache.maven.plugins/maven-antrun-plugin. > > My pom.xml can only compile pjsip. It doesn't do anything for the > other phases of pjsip's life cycle. > > This page got me started: > https://blog.jayway.com/2013/06/10/how-to-use-make-and- > makefile-in-maven-pom-xml/ > > This page https://www.eclipse.org/m2e/documentation/m2e-execution- > not-covered.html > helped me to configure maven-antrun-plugin. Eclipse's Quick Fix > provided the pluginManagement element. > > > > In the meantime, I am trying to make this work myself. If I am > > successful, I will post my pom.xml or a link to it. > > Here it is: > > <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/xsd/maven-4.0.0.xsd"> > <modelVersion>4.0.0</modelVersion> > <groupId>pjproject-2.2.1</groupId> > <artifactId>pjproject-2.2.1</artifactId> > <version>0.0.1-SNAPSHOT</version> > <name>PJSIP libraries</name> > <dependencies> > <dependency> > <groupId>org.codehaus.mojo</groupId> > <artifactId>exec-maven-plugin</artifactId> > <version>1.1</version> > </dependency> > <dependency> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-antrun-plugin</artifactId> > <version>1.8</version> > </dependency> > <dependency> > <groupId>org.apache.ant</groupId> > <artifactId>ant-nodeps</artifactId> > <version>1.8.1</version> > </dependency> > </dependencies> > > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-antrun-plugin</artifactId> > <version>1.8</version> > <executions> > <execution> > <id>make</id> > <phase>compile</phase> > <configuration> > <target name="make" description="Invoke > make(1) to compile pjproject-2.2.1"> > <taskdef > resource="net/sf/antcontrib/antcontrib.properties" > classpathref="maven.plugin.classpath" > /> > <echo>RUNNING MAKE!"</echo> > <exec executable="make" > failonerror="true" dir="${project.basedir}" /> > </target> > </configuration> > <goals> > <goal>run</goal> > </goals> > </execution> > </executions> > </plugin> > </plugins> > <pluginManagement> > <plugins> > <!--This plugin's configuration is used to store > Eclipse m2e settings > only. It has no influence on the Maven build itself. > --> > <plugin> > <groupId>org.eclipse.m2e</groupId> > <artifactId>lifecycle-mapping</artifactId> > <version>1.0.0</version> > <configuration> > <lifecycleMappingMetadata> > <pluginExecutions> > <pluginExecution> > <pluginExecutionFilter> > <groupId> > org.apache.maven.plugins > </groupId> > <artifactId> > maven-antrun-plugin > </artifactId> > <versionRange>[1.8,)</ > versionRange> > <goals> > <goal>run</goal> > </goals> > </pluginExecutionFilter> > <action> > <ignore></ignore> > </action> > </pluginExecution> > </pluginExecutions> > </lifecycleMappingMetadata> > </configuration> > </plugin> > </plugins> > </pluginManagement> > </build> > </project> > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >