Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpm generation fails #25

Closed
fvarrui opened this issue Mar 30, 2020 · 8 comments
Closed

rpm generation fails #25

fvarrui opened this issue Mar 30, 2020 · 8 comments

Comments

@fvarrui
Copy link
Owner

fvarrui commented Mar 30, 2020

rpm package generation fails sometimes. In addition, alien command requires root privileges to convert the deb package to rpm, and also it has to generate deb package first. Try alternative method: rpm-maven-plugin.

@fvarrui
Copy link
Owner Author

fvarrui commented Apr 17, 2020

Fixed on v0.9.5

@fvarrui fvarrui closed this as completed Apr 17, 2020
@jthoward64
Copy link

I'm still having trouble with this on 0.9.7

[ERROR] Failed to execute goal io.github.fvarrui:javapackager:0.9.7:package (default) on project DebateApp: Unable to execute mojo: The parameters 'sourceEncoding' for goal org.codehaus.mojo:rpm-maven-plugin:2.2.0:rpm are missing or invalid -> [Help 1]

@fvarrui
Copy link
Owner Author

fvarrui commented Jun 5, 2020

Please, try to specify source encoding in your pom.xml:

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

@fvarrui fvarrui reopened this Jun 5, 2020
@jthoward64
Copy link

Nope, same issue. I'm running under Ubuntu 18.04 WSL if that makes a difference, but I haven't had any other issues with Maven so I doubt it would.

@fvarrui
Copy link
Owner Author

fvarrui commented Jun 5, 2020

Ok, I'll try to repoduce your issue. Could you share your plugin configuration and mvn -v output?
Thanks!

@jthoward64
Copy link

jthoward64 commented Jun 6, 2020

Full pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <properties>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.source>11</maven.compiler.source>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <build>
        <sourceDirectory>src</sourceDirectory>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>io.github.fvarrui</groupId>
                <artifactId>javapackager</artifactId>
                <version>0.9.7</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>package</goal>
                        </goals>
                        <configuration>
                            <!-- mandatory -->
                            <mainClass>main.java.DebateAppMain</mainClass>
                            <!-- optional -->
                            <bundleJre>true</bundleJre>
                            <generateInstaller>true</generateInstaller>
                            <administratorRequired>false</administratorRequired>
                            <platform>auto</platform>
                            <organizationUrl>https://github.com/tajetaje</organizationUrl>
                            <url>https://github.com/tajetaje/DebateApp</url>
                            <!-- Must provide JRE for macOS: -->
                            <jrePath>${basedir}/../Libraries/Java/jdk-11.0.7-full.jdk</jrePath>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <groupId>tajetaje</groupId>
    <artifactId>DebateApp</artifactId>
    <version>2.0.0</version>
    <dependencies>
        <dependency>
            <groupId>org.jfxtras</groupId>
            <artifactId>jmetro</artifactId>
            <version>11.6.12</version>
        </dependency>
        <dependency>
            <groupId>org.controlsfx</groupId>
            <artifactId>controlsfx</artifactId>
            <version>11.0.1</version>
        </dependency>
    </dependencies>
</project>

mvn -v

Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.7, vendor: BellSoft, runtime: /usr/lib/jvm/bellsoft-java11-full-amd6
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-19635-microsoft", arch: "amd64", family: "unix" 

@fvarrui
Copy link
Owner Author

fvarrui commented Jun 6, 2020

I hope you don't mind but I forked your app and adapted a bit your pom.xml.

Testing on Ubuntu 18.04 WSL

When I try to build your app on Ubuntu 18.04 WSL, rpmbuild throws a segmentation fault (return code 139):
image
Environment:
image
Why? I don't know.

Testing on Ubuntu 18.04 in a virtual machine:

RPM file is built without problems:
image

Sorry, but I'm not sure where the problem is! I've not been able to reproduce your issue. I don't know if it's related to JavaPackager, rpm-maven-plugin or rpmbuild.

Use profiles if you only need jrePath property on MacOS:

<!-- Must provide JRE for macOS: -->
<profiles>
	<profile>
		<activation>
			<os>
				<name>mac</name>
			</os>
		</activation>
		<properties>
                        <jrePath>${basedir}/../Libraries/Java/jdk-11.0.7-full.jdk</jrePath>
		</properties>
	</profile>
</profiles>

@jthoward64
Copy link

Well, the RPM thing is annoying but thanks for the tip about profiles!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants