Sample Configuration

From mvn-pkg-plugin (inactive) Wiki
Jump to: navigation, search

Generations

This pages is about the 4th generation of the packaging plugin. Example for the 3rd and 2nd generations look at: Sample_Configuration_3_x and Sample_Configuration_2_x respectively.

Plugin repository

To use the plugin, you have to configure the evolvis maven plugin repository in your ~/.m2/settings.xml, or in the pom.xml of your project.

 <pluginRepositories>
    <pluginRepository>
        <id>evolvis-release-repository</id>
        <name>evolvis.org release repository</name>
        <url>http://maven-repo.evolvis.org/releases</url>
        <snapshots>
          <enabled>false</enabled>
         </snapshots>
    </pluginRepository>
 </pluginRepositories>

Example 1

[...]
<plugins>
	[...]
	<plugin>
		<groupId>de.tarent.maven.plugins</groupId>
		<artifactId>maven-pkg-plugin</artifactId>
		<version>4.0</version>
 
		<configuration>
 
			<defaultTarget>desktop_deb</defaultTarget>
 
			<defaults>
				<distros>
					<distro>ubuntu_lucid</distro>
				</distros>
				<section>misc</section>
				<mainClass>org.test.project.MainClass</mainClass>
				<maintainer>Maintainer Name Jr.</maintainer>
			</defaults>
 
			<targetConfigurations>
				<targetConfiguration>
					<target>desktop_deb</target>
					<defaultDistro>ubuntu_lucid</defaultDistro> <!-- Not needed if distros.size() == 1 -->
					<distros>
						<distro>ubuntu_lucid</distro>
						<distro>ubuntu_karmic</distro>
					</distros>
					<release>Release Number XX</release>
					<architecture>x86_64</architecture>
 
					<!-- Following sections are not mandatory -->
 
					<revision>r0</revision>
 
					<manualDependencies>
						<!-- List of dependencies that will be set to the package, that may 
							not be maven dependencies, but needed anyway. -->
						<string>kdm</string>
						[...]
					</manualDependencies>
 
					<sysconfFiles>
						<!-- Denotes system configuration files to be included in the package. 
							Similar sections are auxFiles, dataFiles, jniFiles, etc. -->
						<sysconfFile>
							<from>dummy.properties</from>
							<to>dummyProject/dummy.properties</to>
							<rename>true</rename>
						</sysconfFile>
						[...]
					</sysconfFiles>
 
					<uploadParameters>
						<!-- Stores upload parameters for the pkg:upload goal. Tested URI schemes
						 are file:// scpexe:// and debapt:// (for other untested URI schemes, prease
						refer to the codehaus wagon-maven-plugin documentation -->
						<urls>
							<url>scpexe://targetuploadserver/targetdir</url>
							<url>file:///home/%USERNAME%</url>
							[...]
						</urls>
						<!-- Although not recommended, the values of the placeholders %USERNAME% and
						%PASSWORD% can be used to include these parameters in the destination urls,
						in combination with the elements below -->
						<username>localuser</username>
						<password>supersecret</password>
					</uploadParameters>
				</targetConfiguration>
				[...]
			</targetConfigurations>
		</configuration>
	</plugin>
	[...]
</plugins>
[...]