It is currently Sat Nov 26, 2011 8:30 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Mon Oct 19, 2009 7:08 pm 
Offline
Lead Developer
User avatar

Joined: Mon Jan 16, 2006 5:46 pm
Posts: 904
Location: Netherlands
Just for my understanding for what kind of things are we going to use Maven?

Nightly builds, testing, library management,...?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 19, 2009 7:19 pm 
Offline
Lead Developer
User avatar

Joined: Mon Jan 16, 2006 5:46 pm
Posts: 904
Location: Netherlands
Btw: thanks for updating the wiki


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 19, 2009 8:19 pm 
Offline
Developer

Joined: Thu Oct 08, 2009 1:18 am
Posts: 62
Jofo wrote:
Just for my understanding for what kind of things are we going to use Maven?

Nightly builds, testing, library management,...?


Likely yes, yes, and yes.

As well, we should be able to build the jar with it instead of needing ant.

We can already run the unit tests from maven and collect the results.

Maven copies dependencies to a local repository (~/.m2/ in mac/linux). So if you delete your repository, or checkout a different copy (for a branch), you don't have to re-download all the dependencies.

We can also test other plugins that might be useful. For example:

Release - update version numbers, test, and branch in SVN.

PMD & Findbugs - scans Java source code and looks for potential problem

JDepends - reports on project interdependencies

Clover - show unit test coverage (won't show much yet :))

CheckStyle - once you define a codestyle, reports on violations

The Maven-style naming for builds is usually X-SNAPSHOT until the build is final, then you remove the SNAPSHOT. So I've named our current build 0.98-SNAPSHOT.


Top
 Profile  
 
 Post subject: Re: Maven Refactor
PostPosted: Mon Mar 29, 2010 11:28 pm 
Offline

Joined: Fri Dec 04, 2009 2:03 am
Posts: 12
Hello guys,

I saw that both Mike (mstead) and KenMacD have worked on the pom.xml for TED-CORE, so I'm writing to both of you.
Currently there are some ant tasks in the POM and there is also this closed task https://ted.nu/bugs/index.php?do=details&task_id=301, which ends with Mike's comment regarding the future usage of maven assembly plug-in. I've tried to replace those ant tasks with the maven assembly plug-in, and I want to ask for your opinion regarding the modifications I've made. I couldn't attache the xml files to this message, so I added them in the message. I could also send an email to if necessary, with the POM and the assembly descriptor.
POM: I removed the maven-dependency-plugin & maven-antrun-plugin since they are no longer required; their functionality was replaced by the maven-assembly-plugin.
Code:
<?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/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>ted</groupId>
        <artifactId>Ted-Project</artifactId>
        <version>0.98-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>ted-core</artifactId>
    <packaging>jar</packaging>
    <name>TED-CORE</name>

    <properties>
      <!--
         Explicitly declaring the source encoding eliminates the following
         message: [WARNING] Using platform encoding (UTF-8 actually) to copy
         filtered resources, i.e. build is platform dependent!
      -->
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <jdic-version>0.8.4</jdic-version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>ted.TedMain</mainClass>
                        </manifest>
                        <manifestEntries>
                            <Sealed>true</Sealed>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.1</version>
                <configuration>
                    <attach>true</attach>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.2-beta-5</version>
                <configuration>
                    <finalName>runnable</finalName>
                    <appendAssemblyId>false</appendAssemblyId>
                    <descriptors>
                        <descriptor>src/main/assembly/runnable-ted.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>assemble</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <!-- Needed for Rome 1.0 -->
        <repository>
            <id>maven2-repository.dev.java.net</id>
            <name>Java.net Repository for Maven</name>
            <url>http://download.java.net/maven/2/</url>
            <layout>default</layout>
        </repository>
        <!-- Needed for JDIC and AppleJavaExtensions -->
        <repository>
            <id>local repo</id>
            <name>Local Repository for non-mavenized jars</name>
            <url>file://${basedir}/lib</url>
            <layout>default</layout>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>rome</groupId>
            <artifactId>rome</artifactId>
            <!-- TODO: Version 1.0 is out, upgrade -->
            <version>1.0RC2</version>
        </dependency>

        <dependency>
            <groupId>net.java.dev.jgoodies</groupId>
            <artifactId>forms</artifactId>
            <version>1.1.0</version>
        </dependency>

        <!-- JAXB Support for XML to Java Translation -->
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.1.12</version>
            <scope>runtime</scope>
        </dependency>
        <!--
            Not really sure why this one is needed, it's listed in the release
            notes as required when redistributing jaxb
        -->
        <dependency>
            <groupId>javax.xml</groupId>
            <artifactId>jsr173</artifactId>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <version>1.1</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.jdesktop</groupId>
            <artifactId>JDIC</artifactId>
            <!-- TODO: Random old version  -->
            <version>${jdic-version}</version>
        </dependency>

        <dependency>
            <groupId>com.apple</groupId>
            <artifactId>JavaExtensions</artifactId>
            <!-- TODO: no idea if this is actually 1.0 -->
            <version>1.0</version>
        </dependency>
    </dependencies>
</project>


According to maven documentation http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html, the assembly descriptor should be placed under the following path: src/main/assembly/runnable-ted.xml
Code:
<assembly
   xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
   <id>runnable-ted</id>
   <formats>
      <format>dir</format>
   </formats>
   <includeBaseDirectory>false</includeBaseDirectory>
   <fileSets>
      <fileSet>
         <directory>lib/org/jdesktop/JDIC</directory>
         <outputDirectory></outputDirectory>
         <excludes>
            <exclude>${jdic-version}/**</exclude>
         </excludes>
      </fileSet>
   </fileSets>
   <dependencySets>
      <dependencySet />
   </dependencySets>
</assembly>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group