Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • basis.cedric
    replied
    Great work! Will give it a try and I'll give you some feedback.

    Leave a comment:


  • bbruyn
    started a topic A Call to Maven Users

    A Call to Maven Users

    The first iteration of a mavenizer, whose history is documented in this forum post and this wiki page, to this point has been too difficult to maintain / collaborate on. The short of it is that I've gone ahead and written a Maven plugin that does pretty much the same thing, with a few improvements (I hope they're improvements). Wiki documentation will be updated in the near-term, but I'm asking the community to test what I have before I invest the time and energy to write it all up comprehensively. Meanwhile, here's what I think you might need to know to get started:
    • LGPL licenses are now supported.
    • The groupId has changed to com.isomorphic.smartgwt.
    • Some of the artifactIds have changed slightly. You shouldn't have much trouble figuring out what's available, but note that I tried to stick to the convention where client-side artifacts are prefixed with "smartgwt", and server-side with "isomorphic".
    • Version numbers have changed slightly, to take the form major.minor-[d|p]yyyyMMdd. As there is now a patch release available the day after the initial release, there is only support for nightly builds. i.e., you'll have to hack a little bit to get a production release without a 'pyyyyMMdd' classifier.
    • I changed some of the dependencies a bit, taking a guess at which dependencies were direct and which were transitive. More accurately, if a dependency was available transitively, it should now be resolved that way. It all seems to work with the showcase app, but I would appreciate some feedback on the POMs themselves (especially from Analytics, Messaging, Hibernate and JPA users).
    • Source is finally in a googlecode SVN repo. Find the project's home page at http://code.google.com/p/smartgwt-maven-plugin/.
    • The plugin is versioned to track along with SmartGWT releases (2.5p through 4.1d), such that e.g., a 3.0p user should use plugin version 3.0 and a 4.1d user should use the 4.1-SNAPSHOT release. Snapshot releases can be found at https://oss.sonatype.org/content/rep...ies/snapshots/. Production releases are normally released to a staging repository before they are synched to central. The current staging release (4.0p) can be found at https://oss.sonatype.org/content/rep...n-plugin-1007/
    • Some of the command line parameters have changed, but the main uses cases can be fulfilled with the following:


    Example Configuration (~/.m2/settings.xml)
    Code:
    <profile>
        <id>isc</id>
        <properties>
            <isc.username>YOUR_SMARTCLIENT_USERNAME</isc.username>
            <isc.password>YOUR_SMARTCLIENT_PASSWORD</isc.password>
            <license>ENTERPRISE</license>
            <!--
            <license>LGPL</license>
            <license>EVAL</license>
            <license>PRO</license>
            <license>POWER</license>
            <license>ENTERPRISE</license>
            -->
            <!-- set to true if optional analytics has been licensed with power/enterprise -->
            <analytics>false</analytics>
            <!-- set to true if optional messaging has been licensed with power/enterprise -->
            <messaging>false</messaging>
    
            <!-- to deploy the smartgwt artifacts to some corporate repo via deploy goal -->
            <!--
            <repository.id>corporate-nexus</repository.id>
            <repository.url>http://localhost:9081/nexus/content/repositories/thirdparty/</repository.url>
            -->
        </properties>
    
        <!-- configuration providing access to staging repos -->
        <pluginRepositories>
            <pluginRepository>
                <id>sonatype-staging</id>
    	    <name>Sonatype Staged Release</name>
    	    <releases>
    	      <enabled>true</enabled>
    	    </releases>
    	    <snapshots>
    	      <enabled>false</enabled>
    	    </snapshots>
    	    <url>https://oss.sonatype.org/content/repositories/comgooglecodesmartgwt-maven-plugin-1007/</url>
    	    <layout>default</layout>
    	</pluginRepository>
            <pluginRepository>
                <id>sonatype-snapshots</id>
                <name>Sonatype Release Snapshots</name>
                <releases>
                    <enabled>false</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
                <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
                <layout>default</layout>
            </pluginRepository>
        </pluginRepositories>
    </profile>
    <pluginGroups>
        <pluginGroup>com.googlecode.smartgwt-maven-plugin</pluginGroup>
    </pluginGroups>
    Installation
    Code:
    //use a plugin version other than the latest (currently 3.1) to be downloaded / installed locally (requires fully qualified group and artifact id)
    mvn com.googlecode.smartgwt-maven-plugin:smartgwt-maven-plugin:3.0:install -Pisc
    Example usage
    Code:
    //install today's build
    mvn smartgwt:install -Pisc
      
    //install and deploy today's build
    mvn smartgwt:deploy -Pisc
    
    //install the 1/1/2013 build
    mvn smartgwt:install -Pisc -Dbuild.date=2013-01-01
    
    //install the 1/1/2013 build again, overwriting whatever was there before (useful after an interrupted execution)
    mvn smartgwt:install -Pisc -Dbuild.date=2013-01-01 -Doverwrite=true
    Example POM that builds the showcase
    Code:
    <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>com.isomorphic.smartgwt</groupId>
        <artifactId>showcase-enterprise</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <packaging>war</packaging>
    
        <properties>
            <gwt.version>2.5.0</gwt.version>
            <smartgwt.version>3.1-p20130105</smartgwt.version>
    
            <webapp.directory>${project.build.directory}/${project.build.finalName}</webapp.directory>
    
            <maven.compiler.source>1.6</maven.compiler.source>
            <maven.compiler.target>1.6</maven.compiler.target>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        </properties>
    
        <dependencies> 
            <dependency>
                <groupId>com.isomorphic.smartgwt</groupId>
                <artifactId>smartgwt-eval</artifactId> 
                <version>${smartgwt.version}</version>
            </dependency>
            <dependency>
                <groupId>com.isomorphic.smartgwt</groupId>
                <artifactId>smartgwt-analytics</artifactId>
                <version>${smartgwt.version}</version>
            </dependency>
            <dependency>
                <groupId>com.isomorphic.smartgwt</groupId>
                <artifactId>smartgwt-messaging</artifactId>
                <version>${smartgwt.version}</version>
            </dependency>
            
            <dependency>
                <groupId>com.isomorphic.smartgwt</groupId>
                <artifactId>isomorphic-network</artifactId>
                <version>${smartgwt.version}</version>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>com.isomorphic.smartgwt</groupId>
                <artifactId>isomorphic-sql</artifactId>
                <version>${smartgwt.version}</version>
            </dependency>
            <dependency>
                <groupId>com.isomorphic.smartgwt</groupId>
                <artifactId>isomorphic-jpa</artifactId>
                <version>${smartgwt.version}</version>
            </dependency>
            <dependency>
                <groupId>com.isomorphic.smartgwt</groupId>
                <artifactId>isomorphic-hibernate</artifactId>
                <version>${smartgwt.version}</version>
            </dependency>
            <dependency>
                <groupId>com.isomorphic.smartgwt</groupId>
                <artifactId>isomorphic-spring</artifactId>
                <version>${smartgwt.version}</version>
            </dependency>
            <dependency>
                <groupId>com.isomorphic.smartgwt</groupId>
                <artifactId>isomorphic-tools</artifactId>
                <version>${smartgwt.version}</version>
            </dependency>
    
    
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-webmvc</artifactId>
                <version>3.1.1.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-orm</artifactId>
                <version>3.1.1.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-validator</artifactId>
                <version>4.2.0.Final</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.6.1</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>1.6.1</version>
            </dependency>
            <dependency>
                <groupId>commons-dbcp</groupId> 
                <artifactId>commons-dbcp</artifactId>
                <version>1.4</version>
            </dependency>
            <dependency>
                <groupId>hsqldb</groupId>
                <artifactId>hsqldb</artifactId>
                <version>1.8.0.10</version>
            </dependency>
            <dependency>
                <groupId>jstl</groupId>
                <artifactId>jstl</artifactId>
                <version>1.2</version>
            </dependency>
    
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.7</version>
                <scope>test</scope>
            </dependency>
    
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-servlet</artifactId>
                <version>${gwt.version}</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-user</artifactId>
                <version>${gwt.version}</version>
                <scope>provided</scope>
            </dependency>
    
            <dependency>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-naming</artifactId>
                <version>6.1.12</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-plus</artifactId>
                <version>6.1.12</version>
                <scope>provided</scope>
            </dependency>
    
        </dependencies>
    
        <build>
            <pluginManagement>
                <plugins>
                    <!-- http://wiki.eclipse.org/M2E_plugin_execution_not_covered#execute_plugin_goal -->
                    <plugin>
                        <groupId>org.eclipse.m2e</groupId>
                        <artifactId>lifecycle-mapping</artifactId>
                        <version>1.0.0</version>
                        <configuration>
                            <lifecycleMappingMetadata>
                                <pluginExecutions>
                                    <pluginExecution>
                                        <pluginExecutionFilter>
                                            <groupId>org.codehaus.mojo</groupId>
                                            <artifactId>gwt-maven-plugin</artifactId>
                                            <versionRange>[2.4.0,)</versionRange>
                                            <goals>
                                                <goal>i18n</goal>
                                            </goals>
                                        </pluginExecutionFilter>
                                        <action>
                                            <execute />
                                        </action>
                                    </pluginExecution>
                                    <pluginExecution>
                                        <pluginExecutionFilter>
                                            <groupId>org.apache.maven.plugins</groupId>
                                            <artifactId>maven-war-plugin</artifactId>
                                            <versionRange>[2.1.1,)</versionRange>
                                            <goals>
                                                <goal>exploded</goal>
                                            </goals>
                                        </pluginExecutionFilter>
                                        <action>
                                            <execute />
                                        </action>
                                    </pluginExecution>
                                </pluginExecutions>
                            </lifecycleMappingMetadata>
                        </configuration>
                    </plugin>
                </plugins>
            </pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>${gwt.version}</version>
                    <configuration>
                        <runTarget>index.html</runTarget>
                        <hostedWebapp>${webapp.directory}</hostedWebapp>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.1.1</version>
                    <configuration>
                        <webappDirectory>${webapp.directory}</webappDirectory>
                    </configuration>
                </plugin>
            </plugins>
    
        </build>
    
    </project>
    Please do give it a try on your own projects and reply here with your findings, including license, version, and any optional modules you might be using.


    Thanks in advance,

    Bill
    Last edited by bbruyn; 29 Aug 2013, 19:13. Reason: staging repo updated
Working...
X