Topic - using an IDE for devel?
Topic - using an IDE for devel? Topic - using an IDE for devel?
from forum General Support
 forum index   my profile   search 
 new topic  post reply 
moderators: pjr tab
using an IDE for devel?
Joined: 23-July-2007
Posts: 12
Location: Milton Keynes, UK
Posted: 23-July-2007 13:34
Hello,

I would like to use an IDE to develop my module (at least for syntax coloring, docs, and CVS support), is there any recomended one that leverage some support in NetKernel?

If I have CVS folders/files in a module source directory is any issue?

Is there any way to package and deploy/undeploy modules, similar with war or ear archives?

Thanks,
Laurian
IDE
Joined: 7-February-2005
Posts: 397
Location: UK
Posted: 23-July-2007 14:58
There is no recommended NetKernel IDE.  There are detailed guides for setting up your IDE for developing low-level components...

http://docs.1060.org/docs/3.0.0/book/extensionsguide/doc_guide_developing_with_netkernel.html

For what its worth I use NetBeans.  The CVS support is very good.

You can create and deploy application packages using the provide package management tool in the control panel...

http://localhost:1060/ep+name@app_install_installer

Cheers,

Peter
Modules and deployment
Joined: 15-February-2005
Posts: 127
Location: Fort Collins, CO
Posted: 24-July-2007 11:14
Laurian,

Welcome to NetKernel!

NetKernel uses modules as the physical unit of deployment. Each module has a unique name and each release of a number can (should!) have a different version number. NetKernel supports the hot deployment of modules, can have different versions of the same module loaded, and can rollback to previous configurations - all through the control panel.

I think you will find NetKernel's support for module deployment very powerful.

Randy

IDE for NetKernel
Joined: 15-February-2005
Posts: 127
Location: Fort Collins, CO
Posted: 24-July-2007 11:18
Laurian,

There is no recommended IDE for NetKernel. As Peter mentioned there is documentation that explains how to use some common IDEs such as Netbeans, IntelliJ, and Eclipse.

If you have settled on a scripting language, that might influence your choice of IDE as you can now get language syntax coloring for Javascript, Java, Ruby, etc. depending on the IDE and plugin support.

If you find an IDE and plugins that are particularly useful, please share that information in this forum!

Regards,

Randy
Maven & NetKernel Modules
Joined: 28-July-2007
Posts: 62
Location: Boston, MA USA
Posted: 7-September-2007 14:00
We are using Maven 2 and the Maven Assembly Plug-in to define the projects for building NetKernel Modules. We also posted the applicable NetKernel development libraries to a Shared Maven Repository (internal to the organization). Thus, the Maven Projects can reference those libraries and are downloaded on demand. Finally, we use another Maven Plug-in to generate Eclipse projects. In this way our environment is independent of an IDE since Maven has other plug-ins for generating IDE specific projects such as NetBeans and intelliJ.

BTW, we also created a Maven Archetype (template) for creating a “NetKernel Module” Maven project. This Archetype was posted to our shared repository.

Links
http://maven.apache.org/
http://maven.apache.org/plugins/maven-assembly-plugin/
http://maven.apache.org/plugins/maven-archetype-plugin/
http://m2eclipse.codehaus.org/
http://www.theserverside.com/tt/articles/article.tss?l=SettingUpMavenRepository
Joined: 23-July-2007
Posts: 12
Location: Milton Keynes, UK
Posted: 25-September-2007 12:17
Would this NK maven module be public?
any update on the shared internal maven repo?
Joined: 23-July-2007
Posts: 12
Location: Milton Keynes, UK
Posted: 16-April-2008 12:27
I would love to get some examples of how you use maven in NK.
Maven POM Example
Joined: 28-July-2007
Posts: 62
Location: Boston, MA USA
Posted: 16-April-2008 14:03
Maven has the concept of a local, shared and public repository. When you build on your machine using Maven the resulting artifact is placed in your local repo. The JAR from your local repo can be referenced in your deployedModules.xml. Thus, anytime you build that module, NetKernel can pick up the latest version.

In addition, you can use Maven to generate an Eclipse project (using a plugin). In order for the plugin to setup the classpath correctly, you need to reference the NK Core JARs. So you make those JARs available via a "shared" repository. When a developer executes Maven the JARs are downloaded to his or her local repository (once).

You can also use the the Assembly plugin to create an NK Module with the dependencies referenced in the POM (part of the build cycle). For example, if you were using iText, you would want that JAR bundled into the NK Module JAR. But you do not want the NK Core JARs to be bundled since they are already available. So you set the scope of those dependencies as provided.

Finally, by convention Maven includes any files within src/main/resources within the JAR. So place any NK Module files in that location. For example, module.xml, entrypoints.xml, and script files.

POM (note that the many of the URLs are missing for security purposes)

<?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">

    <!-- =======================Organization Info=========================== -->
    <organization>
        <name></name>
        <url></url>
    </organization>
    <inceptionYear>2008</inceptionYear>
    <description></description>

    <!-- =========================Project Details=========================== -->
    <modelVersion>4.0.0</modelVersion>
    <groupId></groupId>
    <artifactId>module-name</artifactId>
    <packaging>jar</packaging>
    <name></name>
    <url></url>
    <version>1.0.0</version>
   
    <!-- ==========================Dependencies============================= -->
   <dependencies>
      
      <!-- External Dependencies (public repositories -->
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>3.8.1</version>
         <scope>test</scope>
      </dependency>
      
   
      
      <!-- NetKernel Development Environment Dependencies (available from organization shared repo)-->
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>1060netkernel</artifactId>
         <version>2.8.4</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>1060netkernel-bootloader</artifactId>
         <version>1.1.2</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>1060netkernel-cli</artifactId>
         <version>1.0.1</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>1060netkernel-embedded</artifactId>
         <version>1.0.1</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-debugger</artifactId>
         <version>1.1.6</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-dpml</artifactId>
         <version>1.2.5</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-entrypoint</artifactId>
         <version>1.1.4</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-http-client</artifactId>
         <version>1.2.1</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-install</artifactId>
         <version>1.2.3</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-introspect</artifactId>
         <version>1.3.0</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-kernel</artifactId>
         <version>1.0.9</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-layer1</artifactId>
         <version>1.3.4</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-script</artifactId>
         <version>1.4.0</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-session</artifactId>
         <version>1.1.3</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-sys</artifactId>
         <version>1.2.9</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-xforms</artifactId>
         <version>1.5.2</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-xhtml</artifactId>
         <version>1.1.2</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-xml-core</artifactId>
         <version>1.5.2</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-xml-ura</artifactId>
         <version>1.3.4</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-xquery</artifactId>
         <version>2.4.2</version>
         <scope>provided</scope>
      </dependency>

      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-xrl</artifactId>
         <version>1.5.3</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-xsecurity</artifactId>
         <version>1.2.3</version>
         <scope>provided</scope>
      </dependency>
      
      <dependency>
           <groupId>org.1060</groupId>
         <artifactId>ext-xunit</artifactId>
         <version>2.1.4</version>
         <scope>provided</scope>
      </dependency>
   
   </dependencies>   
   
    <!-- ===========Shared and Central Reporitory Locations================== -->
    <repositories>
        <repository>
            <id>shared-repo</id>
            <name>Organization Shared Repository</name>
            <url></url>
        </repository>
        <repository>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <id>central</id>
            <name>Maven Repository Switchboard</name>
            <url>http://repo1.maven.org/maven2</url>
        </repository>
    </repositories>

    <!-- =====================Distribution Locations======================== -->
    <distributionManagement>
      <repository>
            <id>shared-repo</id>
            <name>Organization Shared Repository</name>
            <url></url>
        </repository>
        <site>
            <id>module-name-website</id>
            <url></url>
        </site>
    </distributionManagement>
 
    <!-- ======================Build Time Settings========================== -->
    <build>
        <defaultGoal>install</defaultGoal>
        <plugins>
            <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
               <descriptors>
                  <descriptor>src/assemble/bin.xml</descriptor>
               </descriptors>
            </configuration>
            <executions>
               <execution>
                  <id>make-assembly</id>
                  <phase>package</phase>
                  <goals>
                     <goal>attached</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.4</source>
                    <target>1.4</target>
                </configuration>
            </plugin>
             <!-- ============Used to build the module JAR WITH dependent JARS (e.g. iText)============ -->
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/stage.xml</descriptor>
                    </descriptors>
                    <outputDirectory>target</outputDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <configuration>
                    <useProjectReferences>true</useProjectReferences>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-plugin</artifactId>
                <configuration>
                    <connectionType>connection</connectionType>
                </configuration>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh-external</artifactId>
            </extension>
        </extensions>
    </build>
   
    <!-- =======================Reporting Plugins=========================== -->
    <reporting>
        <plugins>
           
            <!--checks unit test coverage-->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <check>
                        <haltOnFailure>false</haltOnFailure>
                    </check>
                </configuration>
            </plugin>
           
            <!--JDepend traverses Java class file directories and generates design quality metrics for each Java package. -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jdepend-maven-plugin</artifactId>
            </plugin>     
           
            <!-- ============Test results. Mainly used by mvn site============ -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
            </plugin>
           
            <!-- ============Generate the documentation site for your project.============ -->
            <!-- ============mvn site:site, mvn site:deploy============ -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
            </plugin>
           
            <!-- ============Generates documentation for the Java code in the project using the standard Javadoc tool.============ -->
            <!-- ============Runs with mvn site command============ -->
            <!-- ============Explicit usage mvn javadoc============ -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <linksource>true</linksource>
                </configuration>
            </plugin>
           
            <!-- ============Produces a report on various tags found in the code, like @todo or //TODO tags.============ -->
            <!-- ============Runs with mvn site command============ -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                  <tags>
                    <tag>TODO</tag>
                    <tag>FIXME</tag>
                    <tag>@todo</tag>
                    <tag>@deprecated</tag>
                  </tags>
                </configuration>
            </plugin>
           
            <!-- ============Generate reports information about the project.============ -->
            <!-- ============Runs with mvn site command============ -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>summary</report>
                            <report>dependencies</report>
                            <report>project-team</report>
                            <report>mailing-list</report>
                            <report>cim</report>
                            <report>license</report>
                            <report>scm</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
</project>


Assembly bin.xml

<assembly>
  <id>with-dependencies</id>
  <formats>
    <format>jar</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>target/classes</directory>
      <outputDirectory>/</outputDirectory>
    </fileSet>
  </fileSets>
  <dependencySets>
    <dependencySet>
      <outputDirectory>/lib</outputDirectory>
      <unpack>false</unpack>
      <scope>runtime</scope>
    </dependencySet>
  </dependencySets>
</assembly>


I hope to put together a Maven NetKernel Development Guide/Cookbook over the summer. Hopefully, I will have it ready for the NetKernel Architects Conference in the fall.
Joined: 23-July-2007
Posts: 12
Location: Milton Keynes, UK
Posted: 16-April-2008 15:34
Great, I'll try it (now installing locally all the jars), I noticed that ext-xforms is not available anymore in NK 3.3.1.

BTW, where/when is the NK Architect's Conference?
NK Architects Weekend 2008
Joined: 28-July-2007
Posts: 62
Location: Boston, MA USA
Posted: 16-April-2008 15:48
 new topic  post reply  To find out about new replies to this post as they occur
please subscribe to one of these feeds:
AtomRSS moderate 
© 2003-2006, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.