Posts mit dem Label Maven werden angezeigt. Alle Posts anzeigen
Posts mit dem Label Maven werden angezeigt. Alle Posts anzeigen

Dienstag, 3. April 2012

Best practice for maven site generation in a multi module environment

One example how to decrease the time for creating the site of a maven multi module project
whizbang
|-- pom.xml
|-- core
|   `-- pom.xml
|-- gui
|   `-- pom.xml
|-- jmx
|   `-- pom.xml
`-- src
in the pom.xml from whizbang you normally have something like this:
            
                core
                gui
                jmx
            
this config would always generate the sites for all sub modules when you call mvn site in the folder of whizbang. depending on the size of the project and configured plugins this can be very time consuming. so we decided to work only on profiles. We removed the module section completely and defined 2 profiles.
    
        
            default
            
                true
            
            
                core
                gui
                jmx
            
        
        
            writeDoc
            
                false
            
            
                
                    
                        org.apache.maven.plugins
                        maven-site-plugin
                        3.0
                        
                            ${site.output.directory}
                            
                                
                                    org.apache.maven.plugins
                                    maven-project-info-reports-plugin
                                    2.4
                                    
                                        false
                                        false
                                    
                                    
                                        index
                                    
                                
                            
                        
                    
                            
            
        
    
mvn clean install has the default behaviour. And when you want to write doc and test the site locally you can easily use this command mvn -P writeDoc site this generates only the site for whizbang project and not for sub projects.

Montag, 26. März 2012

Apache Maven Fluido Skin

In the apache announce list they developers from maven announced that the maven skin Fluido has a new version. So I tried this skin out again. It looks some one more fancy then other skins but still version 1.2 has a bug in the breadcrumb section of generated html files.

To enable the new skin open your site.xml file.

After the body section you add these tag’s

    org.apache.maven.skins
    maven-fluido-skin
    1.2
  

For more information what you can do check out the skin page Maven Fluido Skin
Now to come again to my problem: When you do not define a breadcrumb in the site.xml the layout is destroyed.
how it should look like:
how it is without breadcrumbs:

To have it nice we decided in our team to use the main items from the menu as bread crumbs.

The javascript which shows the current place [path] of your folder is still missing by default.

Montag, 28. März 2011

Debugging Tests runned by maven

For debugging tests which are executed by maven you can use the following option:
mvn -Dmaven.surefire.debug test

Then maven will starts and is waiting for a remote debug connection on port 5005.

This works at least with Maven2 and Maven3. I have not test it with maven1.