1 package org.codehaus.mojo.webstart; 2 3 /* 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 */ 21 22 import org.apache.maven.plugins.annotations.Execute; 23 import org.apache.maven.plugins.annotations.LifecyclePhase; 24 import org.apache.maven.plugins.annotations.Mojo; 25 import org.apache.maven.plugins.annotations.Parameter; 26 import org.apache.maven.plugins.annotations.ResolutionScope; 27 import org.apache.maven.project.MavenProject; 28 29 /** 30 * Packages a jnlp application. 31 * <p/> 32 * The plugin tries to not re-sign/re-pack if the dependent jar hasn't changed. 33 * As a consequence, if one modifies the pom jnlp config or a keystore, one should clean before rebuilding. 34 * <p/>This mojo forks a build lifecycle and won't install the zip packages in your local repository. 35 * You probably want to use the jnlp-inline instead. 36 * <p/> 37 * For more informations about how to choose the matching mojo see http://mojo.codehaus.org/webstart/webstart-maven-plugin/usage.html#Choices 38 * 39 * @author <a href="jerome@coffeebreaks.org">Jerome Lacoste</a> 40 * @version $Id$ 41 */ 42 @Mojo( name = "jnlp", defaultPhase = LifecyclePhase.PACKAGE, requiresProject = true, inheritByDefault = true, 43 requiresDependencyResolution = ResolutionScope.RUNTIME, aggregator = true ) 44 @Execute( phase = LifecyclePhase.PACKAGE ) 45 public class JnlpMojo 46 extends AbstractJnlpMojo 47 { 48 // ---------------------------------------------------------------------- 49 // Mojo Parameters 50 // ---------------------------------------------------------------------- 51 52 /** 53 * Get the executed project from the forked lifecycle. 54 */ 55 @Parameter( defaultValue = "${executedProject}", required = true, readonly = true ) 56 private MavenProject executedProject; 57 58 // ---------------------------------------------------------------------- 59 // AbstractBaseJnlpMojo implementatio 60 // ---------------------------------------------------------------------- 61 62 /** 63 * {@inheritDoc} 64 */ 65 public MavenProject getProject() 66 { 67 return executedProject; 68 } 69 } 70