Menu

Buidling problem

Help
2012-08-13
2012-12-06
  • Rick van Rein

    Rick van Rein - 2012-08-13

    Hello Yohann,

    I am trying to test how well SIP Peers works over IPv6, and fix it
    if necessary.  The best place for that is probably the SVN trunk,
    but I'm having trouble building it.  Is the trunk stable?  If so, it
    may well be my rusty Java experience - I last used it when we
    all built with Makefiles.

    I'm trying "mvn jar:jar package" and consistently run into errors
    dealing with Java5 features.  I am using the SUN JDK for Java6,
    have it setup as my JAVA_HOME, and even tried extending
    pom.xml with

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
              <source>1.5</source>
              <target>1.5</target>
            </configuration>
          </plugin>
        </plugins>
      </build>

    In all cases, I get three kinds of error from mvn, namely language level
    support for for-each loops, annotations and generics:

    peers-svn/peers-lib/src/main/java/net/sourceforge/peers/sip/core/useragent/handlers/InviteHandler.java:
    for-each loops are not supported in -source 1.3
    (use -source 5 or higher to enable for-each loops)
                for (String route : routeSet) {

    peers-svn/peers-lib/src/main/java/net/sourceforge/peers/sip/syntaxencoding/NameAddress.java:
    annotations are not supported in -source 1.3
    (use -source 5 or higher to enable annotations)
        @Override

    peers-svn/peers-lib/src/main/java/net/sourceforge/peers/sip/core/useragent/MidDialogRequestManager.java:
    generics are not supported in -source 1.3
    (use -source 5 or higher to enable generics)
            Hashtable<String, String> params = destinationUri.getUriParameters();

    Am I doing something wrong, or is the repository currently a work in progress?

    Thanks,
    -Rick

     
  • Rick van Rein

    Rick van Rein - 2012-08-13

    Solved it - the addition to pom.xml is the right solution, but needed to be done to the components' */pom.xml instead of the toplevel pom.xml.

    Attached is a patch to the 0.5 snapshot that will make these changes. Please apply it, as it seems to apply to some building environments (*) and should not harm others. Please check; I am far from a Maven-expert.

    (*) Linux? OpenJDK 6? Some default/environment configuration?

     

    Last edit: Rick van Rein 2012-12-13

Log in to post a comment.