Skip to content
Snippets Groups Projects
Commit d6a0f546 authored by Tommy Olofsson's avatar Tommy Olofsson
Browse files

Added config to build and deploy 2014 as a bundle using maven.

parent 95aef48f
No related branches found
No related tags found
Loading
Loading
  • Anders Blomdell @anders_blomdell ·

    I'll need a lecture on maven...

  • Author Owner

    If you have an account on the Nexus server you basically do mvn deploy to compile, package, and upload the bundle to the server.

    If a project depends on labcomm2014.jar it includes

    <dependency>
      <groupId>se.lth.control</groupId>
      <artifactId>labcomm</artifactId>
      <version>2014.3.0-SNAPSHOT</version>
    </dependency>

    in its build file instead of having to build and package the jar. (Or more likely, hope that everybody have compatible jars lying around on their machines...)

    If a project is run in an OSGi runtime which knows about the bundle repository in will get it resolved automatically as well.

  • Anders Blomdell @anders_blomdell ·

    'the Nexus server'? http://maven.cs.lth.se/content/repositories/snapshot? how long do we need to support versions in the snapshot directory, ...

  • Author Owner

    Snapshots? Not at all. I suppose we could upload one in releases/ for each future version tag in git repo? Just to keep the versions consistent across the board.

  • Author Owner

    And maybe a maven plugin for the compiler as well... :)

    This is what I had to do to run the compiler because I really did not want to commit generated code (in another project):

          <!-- Create proper labcomm plugin? -->
          <plugin>                                                                                                                                                                                                                                                          
            <groupId>org.codehaus.mojo</groupId>                                                                                                                                                                                                                            
            <artifactId>build-helper-maven-plugin</artifactId>                                                                                                                                                                                                              
            <executions>                                                                                                                                                                                                                                                    
              <execution>                                                                                                                                                                                                                                                   
                <phase>generate-sources</phase>                                                                                                                                                                                                                             
                <goals>                                                                                                                                                                                                                                                     
                  <goal>add-source</goal>                                                                                                                                                                                                                                   
                </goals>                                                                                                                                                                                                                                                    
                <configuration>                                                                                                                                                                                                                                             
                  <sources>                                                                                                                                                                                                                                                 
                    <source>${project.build.directory}/generated-sources</source>                                                                                                                                                                                           
                  </sources>                                                                                                                                                                                                                                                
                </configuration>                                                                                                                                                                                                                                            
              </execution>                                                                                                                                                                                                                                                  
            </executions>                                                                                                                                                                                                                                                   
          </plugin>                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                            
          <plugin>                                                                                                                                                                                                                                                          
            <artifactId>exec-maven-plugin</artifactId>                                                                                                                                                                                                                      
            <groupId>org.codehaus.mojo</groupId>                                                                                                                                                                                                                            
            <executions>                                                                                                                                                                                                                                                    
              <execution>                                                                                                                                                                                                                                                   
                <id>Run LabComm compiler</id>                                                                                                                                                                                                                               
                <phase>generate-sources</phase>                                                                                                                                                                                                                             
                <goals>                                                                                                                                                                                                                                                     
                  <goal>exec</goal>                                                                                                                                                                                                                                         
                </goals>                                                                                                                                                                                                                                                    
                <configuration>                                                                                                                                                                                                                                             
                  <executable>                                                                                                                                                                                                                                              
                    ${basedir}/lib/run_labcomm_compiler.sh                                                                                                                                                                                                                  
                  </executable>                                                                                                                                                                                                                                             
                </configuration>                                                                                                                                                                                                                                            
              </execution>                                                                                                                                                                                                                                                  
            </executions>                                                                                                                                                                                                                                                   
          </plugin>

    and

    #!/usr/bin/env bash
    java -jar ../labcomm/compiler/labcomm2014_compiler.jar --java=target/generated-sources --javapackage=generated_sources ../labcomm-switch/metadata.lc 2>&1 1> /dev/null

    But that is a later problem. Makefiles are simpler...

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment