Results 1 to 6 of 6

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,822

    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>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. WorldWind Compiling Guide Without Visual Studio
    By rnielsen in forum Developers' Corner
    Replies: 29
    Last Post: 06-06-2011, 03:55 PM
  2. Reg compiling the source code
    By Raj in forum Developers' Corner
    Replies: 10
    Last Post: 08-26-2008, 07:58 PM
  3. Dependency injection instead of static singleton WorldWind
    By stolsvik in forum Feature Discussion
    Replies: 19
    Last Post: 08-06-2007, 03:57 PM
  4. GPS and WorldWind - GPX LOC
    By rjchampagne in forum WorldWind General
    Replies: 1
    Last Post: 09-12-2005, 05:06 AM
  5. Newbies guide to worldwind
    By Llynix in forum WorldWind General
    Replies: 14
    Last Post: 12-25-2004, 02:55 PM

Posting Permissions

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