Giter Site home page Giter Site logo

rockfireredmoon / getdown-maven-plugin Goto Github PK

View Code? Open in Web Editor NEW
7.0 6.0 21.0 267 KB

Creates Getdown update directory, manifest, stubs and more.

License: Apache License 2.0

Java 100.00%
getdown java maven-plugin installer-tools update-checker

getdown-maven-plugin's Introduction

Getdown Maven Plugin

A Maven plugin for the brilliant Getdown. Parts of it were loosely based on Webstart Maven Plugin,

Features

  • Gathers dependencies
  • Generates your manifest
  • Generates your update directory
  • Generates your stubs
  • Generates your applet directory (not yet complete)
  • Signs stub for applets
  • Custom Java Installation
  • Tracking Configuration
  • Copy resources, native resources, unpackable resource and executable resources based on patterns.

Limitations

  • Doesn't yet handle Versioning.
  • Doesn't yet handle Auxiliary Resources
  • Doesn't yet handle Platform-specific Configuration
  • Doesn't yet handle Alternative Entry Points

Changes

  • 0.0.1-SNAPSHOT - Initial release
  • 0.0.2-SNAPSHOT - Updated Getdown version. Fixes digest file signing (thaks alapierre). Initial stub icon.
  • 0.0.3-SNAPSHOT - Fixes problem with classified artifacts. Added Java and Tracking configuration.
  • 0.0.4-SNAPSHOT - Fixes problem when Java configuration is only added to getdown.txt of stub directory. Adds Java configuration to getdown.txt of update directory.
  • 0.9.0 - Released to Maven Central. New artifact group ID of io.github.rockfireredmoon. Now binds to package phase by default. Update to Getdown 1.8.x and other pull requests. Thanks to all contributors.
  • 0.9.1 - Completed implementation of resource sets.

Goals

  • updates Generates update directory. By default bound to package phase.
  • stubs Generates stubs directory for building installers. Must bind to phase yourself.
  • applet Generates applet template directory (with signed getdown jar). Must bind to phase yourself.

Usage

This plugin is available on Maven Central, so simply add the required plugin configuration for the appbase and mainClass.

	<plugin>
		<groupId>org.icestuff</groupId>
		<artifactId>getdown-maven-plugin</artifactId>
		<version>0.9.1</version>
		<executions>
			<execution>
				<configuration>
					<!-- This is the minimum required configuration, see below for more -->
					<appbase>http://myserver.com/myapp/getdown</appbase>	
					<mainClass>org.icestuff.getdown.maven.examples.MyApp</mainClass>			
				</configuration>
			</execution>
		</executions>
	</plugin>

Then run the package phase :-

mvn package

This will produce your updates directory in target/getdown.

Configuration

See https://github.com/threerings/getdown/wiki/Getdown-Dot-Text for the Getdown documentation itself. Most of this configuration maps to entries in the getdown.txt file as described there.

Basic

Key Default Descriptions
appbase Required The HTTP URL of the update directory.
libPath Root of appbase The subdirectory under appbase under which the jar files will be stored.
mainClass Required The Java class name that contains the main(String[] args) method.
outputJarVersions false Whether to include version numbers in the file names created.
verbose false Be verbose about the build.
appargs None List of apparg elements, each one an argument to pass to the mainClass when launched
jvmargs None List of jvmarg elements, each one an argument to pass to the JVM when launched
ignoreMissingMain false If the plugin is added to a project of type pom, it may fail to find the mainClass, although this won't necessarily prevent your app from running. Set this to true to ignore this error.
workDirectory ${project.build.directory}/getdown Location where update/applet files end up.
stubWorkDirectory ${project.build.directory}/getdown-stub Location where stub files end up.
excludeTransitive false Whether to exclude transitive dependencies.
allowOffline false Whether the getdown launcher will allow offline usage.
resources None List of resource elements, each one a path to an additional resource to include.
uresources None List of uresource elements, each one a path to an additional resource to include that should be unpacked.
xresources None List of xresource elements, each one a path to an additional resource to include that should be marked as executable.
nresources None List of nresource elements, each one a path to an additional native resource (.dll, .so, etc.) that should be unpacked and added to the system defined java.library.path.

Resource

The tags <resources>, <xresources>, <uresources>, and <uresources> all act in the same manner. They can contain specific or ant-style wildcard paths that will be copied in as resources and added to the manifest with the appropriate key. All tags may also copy resources to different paths to which they are stored in the source tree using the <destination> and <prefix> tags. Native resources (<nresources> also supports the addtional <platform> and <platforms> tags)

...

	<resources>
		<!-- Plain files -->
		<resource>
			<!-- Path to a single file -->
			<path>image1.png</path>
		</resource>
		<resource>
			<!-- Path to a directory -->
			<path>images</path>
		</resource>
		<resource>
			<!-- Path to a directory, excluding some files -->
			<path>documentation</path>
			<excludes>
				<exclude>**/*.doc</exclude>
			</excludes>
		</resource>
		<resource>
			<!-- Path to a directory, all matched files in a single target directory -->
			<path>game-data</path>
			<destination>data</destination>
		</resource>
		<resource>
			<!-- Path to a directory, all matched files in a single target directory matching the source heirarchy -->
			<path>other-data</path>
			<prefix>data</prefix>
		</resource>
	</resources>
	
	<xresources>
		<!-- Executable files -->
		<xresource>
			<path>nativeprog.exe</path>
		</xresource>
	</xresources>
	
	<nresources>
		<!-- Native files -->
		<nresource>
			<!-- Path to a single file, for multiple archs -->
			<platforms>
				<platform>windows-amd64</platform>
				<platform>windows-x86</platform>
			</platforms>
			<path>app.dll</path>
		</nresource>
		
		<nresource>
			<!-- Path to a directory, for a single arch -->
			<path>deps-64</path>
			<includes>
				<include>**/*.dll</include>
			</includes>
			<platform>windows-amd64</platform>
		</nresource>
	</nresources>

	
	<uresources>
		<!-- Unpackable files -->
		<uresource>
			<path>archive.zip</path>
		</uresource>
	</uresources>
	
...

UI

Configuration of the download / launch UI.

Key Default Descriptions
name ${project.name} The name displayed.
icons None List of icon elements that each contain a path to an icon file.
progressImage None Path to the progress bar image.
backgroundImage None Path to the background image.
progress None Bounding box of progress.
progressText None Progress text color.
status None Bounding box of status.
statusText None Status text color.
textShadow None Shadow color.
errorBackground None Path to image for error background.
macDockIcon None Path to image for Mac dock icon.
installError None Install error URL.
hideDecorations false Whether to hide the window decorations.
minShowSeconds 5 Minimum number of seconds to show UI for.

Java

Configuration of the Java requirements.

Key Default Descriptions
minVersion None Minimum required Java version.
maxVersion None Maximum required Java version.
version None Exact required Java version.
versionProperty java.version The system property to extract version from.
versionRegex Regular expression used to extract the version.
downloads None List of download arguments, each made up of a path element, and optional os and arch elements

Tracking

Configuration of the tracking.

Key Default Descriptions
url None URL of tracking service.
urlSuffix None URL suffix of tracking service.
percents None List of percent elements, each containing a %age value on which to trigger tracking.
cookieName None Name of cookie to add to request.
cookieProperty None Property to send as cookie value.

Examples

Here are some complete example projects. You can find the full source for these at getdown-maven-example1 and getdown-maven-example2

Example 1

<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">
	<modelVersion>4.0.0</modelVersion>
	<artifactId>getdown-maven-example1</artifactId>
	<name>Getdown Maven Example 1</name>
	<description>Simples Example POM, builds update directory and manifest</description>
	<groupId>io.github.rockfireredmoon</groupId>
	<version>0.9.0</version>
	<build>
		<plugins>
			<plugin>			
				<groupId>io.github.rockfireredmoon</groupId>
				<artifactId>getdown-maven-plugin</artifactId>
				<version>0.9.0</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>updates</goal>
						</goals>
						<configuration>
							<appbase>http://myserver.com/myapp/getdown</appbase>
							<libPath>lib</libPath>
							<mainClass>org.icestuff.getdown.maven.examples.MyApp</mainClass>
							<outputJarVersions>false</outputJarVersions>
							<verbose>true</verbose>
							<appargs>
								<apparg>Some Argument</apparg>
							</appargs>
							<ui>
								<name>My App</name>
								<icons>
									<icon>${basedir}/src/main/images/myapp.png</icon>
								</icons>
								<progressImage>${basedir}/src/main/images/progress.png</progressImage>
								<backgroundImage>${basedir}/src/main/images/splash.png</backgroundImage>
								<progress>80, 244, 196, 11</progress>
								<progressText>FFFFFF</progressText>
								<statusText>FFFFFF</statusText>
								<status>20, 170, 316, 64</status>
								<textShadow>111111</textShadow>
							</ui>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>

Example 2

The following example uses some other Maven plugins to spit out stub installers for Linux, Mac OSX and Windows along with the update directory.

<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">
	<modelVersion>4.0.0</modelVersion>
	<artifactId>getdown-maven-example2</artifactId>
	<name>Getdown Maven Example 2</name>
	<description>Advanced Example POM that builds update directory and native installers for Linux, Mac OS X and Windows</description>
	<groupId>io.github.rockfireredmoon</groupId>
	<version>0.9.0</version>
	<build>

		<plugins>
			<!-- Create the update directory, stubs etc -->
			<plugin>
				<groupId>io.github.rockfireredmoon</groupId>
				<artifactId>getdown-maven-plugin</artifactId>
				<version>0.9.0</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>updates</goal>
							<goal>stub</goal>
							<goal>applet</goal>
						</goals>
						<configuration>
							<appbase>http://www.myserver.com/myapp/getdown/</appbase>
							<libPath>lib</libPath>
							<mainClass>org.icestuff.getdown.maven.examples.MyApp</mainClass>
							<outputJarVersions>false</outputJarVersions>
							<verbose>true</verbose>
							<appargs>
								<apparg>Some Argument</apparg>
							</appargs>
							<ui>
								<name>My App</name>
								<icons>
									<icon>${basedir}/src/main/images/myapp.png</icon>
								</icons>
								<progressImage>${basedir}/src/main/images/progress.png</progressImage>
								<backgroundImage>${basedir}/src/main/images/splash.png</backgroundImage>
								<progress>80, 244, 196, 11</progress>
								<progressText>FFFFFF</progressText>
								<statusText>FFFFFF</statusText>
								<status>20, 170, 316, 64</status>
								<textShadow>111111</textShadow>
							</ui>
						</configuration>
					</execution>
				</executions>
			</plugin>


			<!-- Now from the stub we create some platform specific installers to 
				give the user shortcuts etc. For Linux, because apps will be installed in 
				root paths, the launch script actually links getdown to the users home directory 
				and runs it from there. This lets all users share the shortcut, but have 
				their own cache.. -->

			<!-- First a Deb for Debian and based systems such as Ubuntu, Mint -->

			<plugin>
				<artifactId>jdeb</artifactId>
				<groupId>org.vafer</groupId>
				<version>1.7</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>jdeb</goal>
						</goals>
						<configuration>
						</configuration>
					</execution>
				</executions>
				<dependencies>
				</dependencies>
				<configuration>
					<controlDir>src/main/deb/control</controlDir>
					<skipPOMs>false</skipPOMs>
					<installDir>/usr/lib/myapp</installDir>
					<deb>${project.basedir}/target/myapp.deb</deb>
					<dataSet>
						<data>
							<type>directory</type>
							<src>target/getdown-stub</src>
							<includes>*.*</includes>
							<mapper>
								<type>perm</type>
								<strip>1</strip>
								<prefix>/usr/lib/myapp</prefix>
								<user>root</user>
								<group>root</group>
								<filemode>755</filemode>
							</mapper>
						</data>
						<data>
							<type>directory</type>
							<src>${basedir}/src/main/scripts</src>
							<includes>*</includes>
							<mapper>
								<type>perm</type>
								<strip>1</strip>
								<prefix>/usr/bin</prefix>
								<user>root</user>
								<group>root</group>
								<filemode>755</filemode>
							</mapper>
						</data>
						<data>
							<type>directory</type>
							<src>${basedir}/src/main/images</src>
							<includes>myapp.png</includes>
							<mapper>
								<type>perm</type>
								<strip>1</strip>
								<prefix>/usr/share/pixmaps</prefix>
								<user>root</user>
								<group>root</group>
								<filemode>755</filemode>
							</mapper>
						</data>
						<data>
							<type>directory</type>
							<src>${basedir}/src/main/applications</src>
							<includes>*</includes>
							<mapper>
								<type>perm</type>
								<strip>1</strip>
								<prefix>/usr/share/applications</prefix>
								<user>root</user>
								<group>root</group>
								<filemode>755</filemode>
							</mapper>
						</data>
					</dataSet>
				</configuration>
			</plugin>

			<!-- Now an RPM -->

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>rpm-maven-plugin</artifactId>
				<version>2.2.0</version>
				<extensions>true</extensions>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>attached-rpm</goal>
						</goals>
						<configuration>
						</configuration>
					</execution>
				</executions>
				<configuration>
					<sourceEncoding>UTF-8</sourceEncoding>
					<name>myapp</name>
					<group>Application/Internet</group>
					<packager>Some Person</packager>
					<copyright>2014 Some Person</copyright><!-- <projVersion></projVersion> --><!-- <release>0</release> -->
					<prefix>/usr</prefix>
					<defineStatements>
						<defineStatement>_unpackaged_files_terminate_build 0</defineStatement>
					</defineStatements>

					<requires>
						<require>java &gt;= 1.7.0</require>
					</requires>
					<mappings>
						<mapping>
							<directory>/usr/bin</directory>
							<filemode>755</filemode>
							<username>root</username>
							<groupname>root</groupname>
							<directoryIncluded>false</directoryIncluded>
							<sources>
								<source>
									<location>${basedir}/src/main/scripts/myapp</location>
								</source>
							</sources>
						</mapping>
						<mapping>
							<directoryIncluded>false</directoryIncluded>
							<directory>/usr/share/applications</directory>
							<filemode>755</filemode>
							<username>root</username>
							<groupname>root</groupname>
							<sources>
								<source>
									<location>${basedir}/src/main/applications/myapp.desktop</location>
								</source>
							</sources>
						</mapping>
						<mapping>
							<directoryIncluded>false</directoryIncluded>
							<directory>/usr/share/pixmaps</directory>
							<filemode>755</filemode>
							<username>root</username>
							<groupname>root</groupname>
							<sources>
								<source>
									<location>${basedir}/src/main/images/myapp.png</location>
								</source>
							</sources>
						</mapping>

						<mapping>
							<directory>/usr/lib/myapp</directory>
							<filemode>755</filemode>
							<username>root</username>
							<groupname>root</groupname>
							<sources>
								<source>
									<location>${basedir}/target/getdown-stub</location>
									<includes>
										<include>**/*</include>
									</includes>
								</source>
							</sources>
						</mapping>
					</mappings>
				</configuration>

			</plugin>

			<!-- The RPM is output in the rpm build tree. We want it at the root with 
				the other built files, and renamed slightly. As the RPM plugin has no way 
				of setting this (that I can see), we move it using Ant -->
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.8</version>
				<executions>
					<execution>
						<phase>package</phase>
						<configuration>
							<target>
								<copy todir="target">
									<fileset dir="target/rpm/myapp/RPMS/noarch">
										<include name="*.rpm" />
									</fileset>
									<mapper type="regexp" from="^([\w]*)-.*$$" to="\1.noarch.rpm" />
								</copy>
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Now for Windows -->

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>nsis-maven-plugin</artifactId>
				<version>1.0-alpha-1</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>generate-headerfile</goal>
							<goal>make</goal>
						</goals>
						<configuration>
							<outputFile>SetupMyApp.exe</outputFile>
							<scriptFile>src/main/nsis/myapp.nsi</scriptFile>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- And now OS X -->

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>osxappbundle-maven-plugin</artifactId>
				<version>1.0.1</version>
				<configuration>
					<buildDirectory>target/MyApp</buildDirectory>
					<bundleName>MyApp</bundleName>
					<zipFile>${basedir}/target/myapp-app.zip</zipFile>
					<excludeArtifacts>true</excludeArtifacts>
					<javaApplicationStub>${basedir}/src/main/stubs/osx-stub</javaApplicationStub>
					<mainClass>com.threerings.getdown.launcher.GetdownApp</mainClass>
					<additionalClasspath>
						<path>getdown.jar</path>
					</additionalClasspath>
					<additionalResources>
						<fileSet>
							<directory>${basedir}/target/getdown-stub</directory>
							<includes>
								<include>**/*</include>
							</includes>
						</fileSet>
					</additionalResources>
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>bundle</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<repositories>
		<repository>
			<id>codehaus-snapshots</id>
			<url>http://nexus.codehaus.org/snapshots/</url>
			<snapshots />
			<releases>
				<enabled>false</enabled>
			</releases>
		</repository>
	</repositories>
</project>

getdown-maven-plugin's People

Contributors

gieza avatar rockfireredmoon avatar turekbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

getdown-maven-plugin's Issues

Resources Tag Not Working

Hi There,

I am trying to use the plugin to generate the configuration. Most of it is working fine apart from the tags.
I tried using this:
<nresources> <nresource>[linux-amd64] native/liblwjgl64.so</nresource> </nresources>
and
<resources> <resource>mytest.jar</resource> </resources>

It doesn't write in getdown.txt. I was expecting it to add to getdown.txt like:
resource = mytest.jar
resource = [linux-amd64] native/liblwjgl64.so

Can you let me know please what is wrong.

Example1 and Example2 doesn't WORK

we tried to build both examples but it doesn't work !
raw.github is no longer supported !
so the project can't build !
in a secod run we tired to update the plugin, add a gh-pages repository and build it.
but when we try to build the examples we always get the error:

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT:updates (default) on project getdown-maven-example2: Execution default of goal org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT:updates failed: Unable to load the mojo 'updates' (or one of its required components) from the plugin 'org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT': com.google.inject.ProvisionException: Guice provision errors:
[ERROR]
[ERROR] 1) No implementation for org.icestuff.getdown.maven.SignTool was bound.
[ERROR] while locating org.icestuff.getdown.maven.MakeUpdatesMojo
[ERROR] at ClassRealm[plugin>org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT, parent: sun.misc.Launcher$AppClassLoader@33909752]
[ERROR] while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value=org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT:updates)
[ERROR]
[ERROR] 1 error
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT:updates
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT:updates (default) on project getdown-maven-example2: Execution default of goal org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT:updates failed: Unable to load the mojo 'updates' (or one of its required components) from the plugin 'org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT'
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT:updates failed: Unable to load the mojo 'updates' (or one of its required components) from the plugin 'org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT'
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.plugin.PluginContainerException: Unable to load the mojo 'updates' (or one of its required components) from the plugin 'org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT'
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:488)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
... 20 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com.google.inject.ProvisionException: Guice provision errors:

  1. No implementation for org.icestuff.getdown.maven.SignTool was bound.
    while locating org.icestuff.getdown.maven.MakeUpdatesMojo
    at ClassRealm[plugin>org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT, parent: sun.misc.Launcher$AppClassLoader@33909752]
    while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value=org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT:updates)

1 error
role: org.apache.maven.plugin.Mojo
roleHint: org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT:updates
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:257)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:245)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:455)
... 21 more
Caused by: com.google.inject.ProvisionException: Guice provision errors:

  1. No implementation for org.icestuff.getdown.maven.SignTool was bound.
    while locating org.icestuff.getdown.maven.MakeUpdatesMojo
    at ClassRealm[plugin>org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT, parent: sun.misc.Launcher$AppClassLoader@33909752]
    while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value=org.icestuff:getdown-maven-plugin:0.0.10-SNAPSHOT:updates)

1 error
at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:974)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:83)
at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:49)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:253)
... 23 more

Updating to Getdown v1.8+

In Getdown's most recent version they've re-factored things into more modular jars instead of a single getdown jar.

Getdown's wiki explains:

Migrating from 1.7 to 1.8

Prior to Getdown 1.8, everything needed to use Getdown was published as a single jar file. This was
convenient, but required playing a bit fast and loose with dependencies as the single jar file
contained both the runtime Getdown code and the code needed for build tools when generating an app
distribution.

Starting with Getdown 1.8, the project was split into multiple Maven modules, each with minimal and
appropriate dependencies.

  • core - contains the main logic for reading app manifests (the getdown.txt file) and
    updating and verifying an apps code and resources, as well as logic for generating digest.txt
    files and JarDiff patch files
  • launcher - contains the Getdown launcher "application", which handles downloading, updating
    and running the target application
  • ant - contains the code to integrate with the [Ant] build tool to generate digest.txt files
    as part of an automated build

(Note that the Maven integration lives in separate projects maintained by a third parties.)

Build integration changes

The three main changes needed to update your build to use the new multimodule Getdown are:

  • The old Maven artifact for the launcher was com.threerings:getdown, the new artifact is
    com.threerings.getdown:getdown-launcher.
  • The old Maven artifact for Ant integration (which some Maven builds used in conjunction with
    the maven-antrun-plugin) was com.threerings:getdown, the new artifact is
    com.threerings.getdown:getdown-ant.
  • The old Maven artifact on which to depend if you used Getdown code in your app (for example to
    use LaunchUtil.updateVersionAndRelaunch) was com.threerings:getdown, the new artifact is
    com.threerings.getdown:getdown-core.

The changes seem relatively simple, so I've gone ahead and made a pull request.

Implement Custom Java Installation

A minimum Java version may be specified in getdown.txt along with resource locations for alternative Java runtimes that may be downloaded (OS specific) to satisfy that requirement.

The Maven plugin should accept a minimum version configuration option (java_min_version) and location of runtime bundles and inject these into getdown.txt. The runtime bundles must be in JAR format, so in order to add value to using the Maven plugin, it should be capable of accepting of generating these jars from :-

  • The current Maven Java runtime. This would obviously only be for the current platform
  • File locations. Either an expanded runtime, a zip of a runtime, a jar of a runtime or a tgz of a runtime.
  • HTTP locations. A zip of a runtime, a jar of a runtime or a tgz of a runtime.

Other configuration options that should be exposed include :-

  • java_max_version
  • java_exact_version_required

See https://github.com/threerings/getdown/wiki/Getdown-Dot-Text for full details

No icon on first install

Hi,

I love your plugin. It's ... enriched my life.

I brought this issue up on the getdown repository: No corner icon on first install

samskivert said it could be fixed by putting some config in the stub getdown.txt.

Is this something that could be fixed in the plugin?

Build in Windows Produces Invalid Digest for Download

I believe there is an issue with nested resources. I have a section like:

                    <resource>
                       <path>src/main/resources</path>
                       <includes>
                          <include>com/**/*</include>
                          <include>icons/**/*</include>
                       </includes>
                    </resource>

The plugin builds the correct directory structure, but the digest and getdown.txt include entries like:

icons\UDI.png = ..MD5..

Note the backslash, instead of a forward slash like the jar entries:

lib/commons-logging.jar = ..MD5..

When running the stub, all of the elements with the backslash indicate they are missing (because address https://server/getdown-location/icons%5CUDI.png is missing, while icons/UDI.png is there).

Am I missing a flag that will force Linux [web] path separators or is this a result of building on Windows and deploying on a Linux web-server?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.