riotgamesminions / riot-redline-plugin Goto Github PK
View Code? Open in Web Editor NEWAn operating system agnostic Maven plugin for creating RPMs.
License: Apache License 2.0
An operating system agnostic Maven plugin for creating RPMs.
License: Apache License 2.0
I have a script which is executable in my git repo, and during the build, but ends up not executable on the target system. I'd like to specify the mode of this file, presumably within the mapping?
For the version field and the output artifact name, you map X.Y.Z-SNAPSHOT to X.Y.ZSNAPSHOT, another similar plugin that I use maps the hyphen to a plus, as does the alien tool when converting from deb to rpm.
I could be wrong, but I can't seem to find it in http://search.maven.org - If I'm wrong, please advise. If I'm not please publish to central through Sonatype's OSS nexus instance and make it easy and reliable for people to use your work. Thanks in advance.
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
You can have another chance on #10. Let me know if it works now.
Currently it is not possible to set file permissions on the files that are installed by an RPM built with riot-redline-plugin.
Before we are able to implement this change, redline must be updated. The changes have been made and a pull request reated for version 1.1.17, but this has not yet been released. When this is done we can create a pull request and add the new functionality.
In an RPM file, some files which are contained may be tagged as %config or %noreplace.
These options are important when updating (as well as uninstalling) RPMs. Especially if you install an updated version of an RPM onto a machine where an earlier version has already been installed you want to be sure you don't overwrite any configuraion files which come with the RPM package for initial installation but may have been changed by the administrator or user since installation.
There are some more directives, check http://www.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html for details.
I'd like to do two things:
These seem to be available in redline, but it's not obvious how to use them and they don't appear to be documented. Excuse me if I'm suffering domestic blindness again.
Suppose you're using in your POM something like:
<mapping>
<directory>/usr/share/whatever</directory>
<sources>
<source>${project.basedir}/whatever</source>
</sources>
</mapping>
In case there is a structure like
whatever/fileA
whatever/foo/fileB
whatever/foo/deeper/fileC
it will get mapped to
whatever/fileA
whatever/foo/fileB
whatever/foo/fileC
i.e. any tree like structure will be flattened to only one level deep.
I had a quick look, but couldn't make sense of this at all. Any clues from anyone?
[ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.3:compile (default) on project riot-redline-plugin: startup failed, /home/fred/repos/java/riot-redline-plugin/src/main/groovy/com/riotgames/maven/redline/RedlineMojo.groovy: -1: The return type of org.redline_rpm.payload.Directive getDirective() in com.riotgames.maven.redline.RedlineMojo$_parseMapping_closure4_closure6 is incompatible with int getDirective() in groovy.lang.Closure.
[ERROR] Node: org.codehaus.groovy.ast.MethodNode. At [-1:-1] @ line -1, column -1.
It should complain and fail gracefully. I didn't try others, but I presume others are also not null checked?
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.riotgames.maven:riot-redline-plugin:1.2.0-SNAPSHOT:rpm (default) on project OpenLogViewer: Execution default of goal com.riotgames.maven:riot-redline-plugin:1.2.0-SNAPSHOT:rpm failed.
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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 com.riotgames.maven:riot-redline-plugin:1.2.0-SNAPSHOT:rpm failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.NullPointerException
at org.freecompany.redline.header.AbstractHeader.createEntry(AbstractHeader.java:202)
at org.freecompany.redline.Builder.setPackage(Builder.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:781)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:772)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:164)
at com.riotgames.maven.redline.RedlineMojo.execute(RedlineMojo.groovy:137)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more
The Redline library provides the capability to sign RPM files, which is a requirement to get them uploaded to many repositories.
I am thinking of adding that capability to the riot-redline-plugin, introducing an extension to the plugin configuration like this:
<configuration>
[...]
<signature>
<keyring>secring.gpg</keyring>
<privateKeyId>foo</privateKeyId>
<privateKeyPassphrase>redline</privateKeyPassphrase>
</signature>
[...]
</configuration>
It would be a bit cleaner actually to do it this way:
<configuration>
[...]
<signature>
<keyring privateKeyId="foo" privateKeyPassphrase="bar">secring.gpg</keyring>
</signature>
[...]
</configuration>
Just it would breach with the "way of doing things" in the rest of the plugin, so I'd do the first option.
Comments please ...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.