Results 1 to 7 of 7

Thread: Using Maven to build worldwind

  1. #1
    Junior Member
    Join Date
    Apr 2009
    Posts
    4

    Default Using Maven to build worldwind

    I am new to this project, I have downloaded the project source and noticed that ant is used to build this project.
    Is there a plan to move from ant to maven at some point in time? Anybody created a maven project file so that I don't go ahead and reinvent the wheel.

    thanks

    --zoly

  2. #2
    God. Root. What is difference? TomServo's Avatar
    Join Date
    Sep 2004
    Location
    Eastern Pennsylvania
    Posts
    2,812
    Go To My Homepage: Go to TomServo's homepage

    Default

    From the WW Workshop we had today: "What IS maven?"


    Earth is Square blog

    PUBLIC NOTICE AS REQUIRED BY LAW: Any use of this forum post, in any manner whatsoever, will increase the amount of disorder in the universe. Although no liability is implied herein, the consumer is warned that this process will ultimately lead to the heat death of the universe.

  3. #3
    Junior Member
    Join Date
    Apr 2009
    Posts
    4

    Default

    here is your answer:

    http://maven.apache.org/what-is-maven.html

    I can send you a simple POM file I built today that will build the WW project...

  4. #4
    Junior Member
    Join Date
    Apr 2009
    Posts
    4

    Default simple maven pom sample to build worldwind

    here is info on how to easily build with maven:
    http://maven.apache.org/run-maven/index.html

    also all major IDEs have maven plugins, making it very easy for developers to use any IDE ...

    only need to put a file named pom.xml(project definition) in project root containing:

    <?xml version="1.0" encoding="UTF-8"?>
    <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>
    <artifactId>worldwind</artifactId>
    <name>worldwind - ${version}</name>
    <groupId>gov.nasa.worldwind</groupId>
    <packaging>jar</packaging>
    <version>0.6.94-SNAPSHOT</version>
    <url>http://worldwind.arc.nasa.gov/java/index.html</url>
    <licenses>
    <license>
    <distribution>repo</distribution>
    <name>NASA OPEN SOURCE AGREEMENT VERSION 1.3</name>
    <url>http://worldwind.arc.nasa.gov/worldwind-nosa-1.3.html</url>
    </license>
    </licenses>
    <issueManagement>
    <system>Worldwind java forums</system>
    <url>http://forum.worldwindcentral.com/forumdisplay.php?f=37</url>
    </issueManagement>
    <developers>
    <developer>
    <name>Patrick Hogan</name>
    <id>Patrick.Hogan</id>
    <email>Patrick.Hogan@nasa.gov</email>
    <roles>
    <role>Project Manager</role>
    </roles>
    </developer>
    </developers>

    <repositories>
    <repository>
    <id>maven2-repository.dev.java.net</id>
    <name>Java.net Repository for Maven 2</name>
    <url>http://download.java.net/maven/2</url>
    <releases>
    <checksumPolicy>warn</checksumPolicy>
    <updatePolicy>never</updatePolicy>
    </releases>
    <snapshots>
    <enabled>false</enabled>
    </snapshots>
    </repository>
    </repositories>


    <build>
    <sourceDirectory>src</sourceDirectory>
    <testSourceDirectory>test</testSourceDirectory>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
    <source>1.5</source>
    <target>1.5</target>
    </configuration>
    </plugin>
    </plugins>
    </build>

    <dependencies>
    <!--mvn install:install-file -DgroupId=java -DartifactId=plugin -Dversion=1.6.0_13 -Dpackaging=jar -Dfile=/usr/java/jre/lib/plugin.jar-->
    <dependency>
    <groupId>java</groupId>
    <artifactId>plugin</artifactId>
    <version>1.6.0_13</version>
    <scope>provided</scope>
    </dependency>
    <dependency>
    <groupId>com.projectdarkstar.ext.net.jav a.dev.jogl</groupId>
    <artifactId>jogl</artifactId>
    <version>1.1.1</version>
    </dependency>
    </dependencies>
    <reporting>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <configuration>
    <javadocVersion>1.5</javadocVersion>
    <aggregate>true</aggregate>
    </configuration>
    </plugin>
    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>changelog-maven-plugin</artifactId>
    <configuration>
    <type>range</type>
    <range>30</range>
    </configuration>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-checkstyle-plugin</artifactId>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-project-info-reports-plugin</artifactId>
    </plugin>
    </plugins>
    </reporting>
    </project>
    Last edited by zolyfarkas; 05-02-2009 at 12:25 AM.

  5. #5
    Junior Member
    Join Date
    Apr 2010
    Posts
    12

    Default

    Hi zolyfarkas,

    Thanks for posting your pom.xml for the World Wind for Java SDK. I had to tweak the java plugin dependency to read
    Code:
    		<dependency>
    			<groupId>java</groupId>
    			<artifactId>plugin</artifactId>
    			<version>1.6.0_13</version>
    			<scope>system</scope>
    			<systemPath>${java.home}/lib/plugin.jar</systemPath>
    			<optional>true</optional>
    		</dependency>
    Last edited by buzz3791; 08-20-2010 at 03:30 PM.

  6. #6
    Junior Member
    Join Date
    Apr 2010
    Posts
    12

    Post

    Here is another tweak made to get the config and images resources into the worldwind.jar...

    Code:
        <build>
    
            <sourceDirectory>src</sourceDirectory>
    
            <resources>
            
                <resource>                     
                    
                    <filtering>false</filtering>
                    
                    <directory>${basedir}/src</directory>
                    
                    <includes>
                        <include>**/*.properties</include>
                    </includes>
                    
                    <excludes>
                        <exclude>config/</exclude>
                        <exclude>images/</exclude>
                    </excludes>                     
                    
                </resource>
                  
            </resources>
    
            <testSourceDirectory>test</testSourceDirectory>
    
            <plugins>
                
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.4.2</version>
                    <executions>
                        <execution>
                            <id>copy-resources</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.build.directory}/classes</outputDirectory>
                
                                <resources>
                
                                    <resource>
                                        <targetPath>config/</targetPath>
                                        <filtering>false</filtering>
                                        <directory>${basedir}/src/config</directory>
                                    </resource>
                
                                    <resource>
                                        <targetPath>images/</targetPath>
                                        <filtering>false</filtering>
                                        <directory>${basedir}/src/images</directory>
                                    </resource>
                
                                </resources>
                
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                    
            </plugins>
    
        </build>

  7. #7
    Junior Member
    Join Date
    Oct 2011
    Posts
    19

    Default

    I'm also interested in building worldwind with maven, is there any updates to this? Any plans to use maven for the official build?

    I've been using ant to build it, but I have to re-do the conversion after the move to github and instead of using ant I thought I might as well use maven... Is there anybody else using maven to build worldwind?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •