Hi there,
I'm trying to make an RPM package for junixsocket [1] but am hitting a wall with xmvn-install (build log trimmed for brevity):
[INFO] ----------------------------------------------- [INFO] TARGET ARTIFACT: [INFO] groupId: JPP/junixsocket [INFO] artifactId: junixsocket-native-common [INFO] extension: jar [INFO] classifier: [INFO] version: SYSTEM [INFO] stereotype: native [INFO] namespace: [INFO] file: usr/lib/java/junixsocket/junixsocket-native-common.jar [INFO] =============================================== [WARNING] Failed to resolve artifact: com.kohlschutter.junixsocket:junixsocket-native:nar:2.0.4 [WARNING] Unable to resolve dependency artifact com.kohlschutter.junixsocket:junixsocket-native:nar:2.0.4, generating dependencies with unknown version and n amespace. [WARNING] Failed to resolve artifact: com.kohlschutter.junixsocket:junixsocket-native:nar:amd64-Linux-gpp-jni:2.0.4 [WARNING] Unable to resolve dependency artifact com.kohlschutter.junixsocket:junixsocket-native:nar:amd64-Linux-gpp-jni:2.0.4, generating dependencies with u nknown version and namespace. + jdir=target/site/apidocs + '[' -d target/site/apidocs ']'
[DEBUG] Effective packaging rule for com.kohlschutter.junixsocket:junixsocket-native:nar:2.0.4: <?xml version="1.0" encoding="UTF-8"?> <configuration xmlns="http://fedorahosted.org/xmvn/CONFIG/1.0.0"> <artifactManagement> <rule> <artifactGlob> <groupId>com.kohlschutter.junixsocket</groupId> <artifactId>junixsocket-native</artifactId> <version>2.0.4</version> <extension>nar</extension> </artifactGlob> <optional>false</optional> </rule> </artifactManagement> </configuration>
[WARNING] Skipping installation of artifact com.kohlschutter.junixsocket:junixsocket-native:nar:2.0.4: No suitable repository found to store the artifact in. [DEBUG] Effective packaging rule for com.kohlschutter.junixsocket:junixsocket-native:nar:amd64-Linux-gpp-jni:2.0.4: <?xml version="1.0" encoding="UTF-8"?> <configuration xmlns="http://fedorahosted.org/xmvn/CONFIG/1.0.0"> <artifactManagement> <rule> <artifactGlob> <groupId>com.kohlschutter.junixsocket</groupId> <artifactId>junixsocket-native</artifactId> <version>2.0.4</version> <classifier>amd64-Linux-gpp-jni</classifier> <stereotype>native</stereotype> <extension>nar</extension> </artifactGlob> <targetPackage>__noinstall</targetPackage> <optional>false</optional> </rule> </artifactManagement> </configuration>
As far as I understand this is not a bug [2] because nar is not a standard artifact. How do I tell xmvn how to do that? I tried adding
<?xml version="1.0" encoding="US-ASCII"?> <configuration xmlns="http://fedorahosted.org/xmvn/CONFIG/2.0.0"> <repositories> <repository> <id>install-nar</id> <type>SimpleRepository</type> <stereotypes> <stereotype> <type>native</type> <extension>nar</extension> <classifier/> </stereotype> </stereotypes> <configuration> <repositories/> </configuration> </repository> </repositories> </configuration>
to the configuration, but it didn't solved the issue. Honestly I'm just wild guessing here, I can't find any example to follow.
I'm also ok to install it manually, but have no clue how to do that either. I can copy the archives (not only the nar, also the corresponding jar is skipped, since it depends on the nar I guess) into the %{buildroot}, but what about the pom files?
Also note I'm using trying to do this on CentOS 7, not Fedora, so quite an older version of xmvn (1.3.0).
Thank you for the help. Best regards
Enrico Tagliavini
[1] https://github.com/kohlschutter/junixsocket [2] https://bugzilla.redhat.com/show_bug.cgi?id=1034732
Il 17/03/2016 14:10, Enrico Tagliavini ha scritto:
Hi there,
I'm trying to make an RPM package for junixsocket [1] but am hitting a wall with xmvn-install (build log trimmed for brevity):
[INFO] ----------------------------------------------- [INFO] TARGET ARTIFACT: [INFO] groupId: JPP/junixsocket [INFO] artifactId: junixsocket-native-common [INFO] extension: jar [INFO] classifier: [INFO] version: SYSTEM [INFO] stereotype: native [INFO] namespace: [INFO] file: usr/lib/java/junixsocket/junixsocket-native-common.jar [INFO] =============================================== [WARNING] Failed to resolve artifact: com.kohlschutter.junixsocket:junixsocket-native:nar:2.0.4 [WARNING] Unable to resolve dependency artifact com.kohlschutter.junixsocket:junixsocket-native:nar:2.0.4, generating dependencies with unknown version and n amespace. [WARNING] Failed to resolve artifact: com.kohlschutter.junixsocket:junixsocket-native:nar:amd64-Linux-gpp-jni:2.0.4 [WARNING] Unable to resolve dependency artifact com.kohlschutter.junixsocket:junixsocket-native:nar:amd64-Linux-gpp-jni:2.0.4, generating dependencies with u nknown version and namespace.
- jdir=target/site/apidocs
- '[' -d target/site/apidocs ']'
[DEBUG] Effective packaging rule for com.kohlschutter.junixsocket:junixsocket-native:nar:2.0.4:
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://fedorahosted.org/xmvn/CONFIG/1.0.0">
<artifactManagement> <rule> <artifactGlob> <groupId>com.kohlschutter.junixsocket</groupId> <artifactId>junixsocket-native</artifactId> <version>2.0.4</version> <extension>nar</extension> </artifactGlob> <optional>false</optional> </rule> </artifactManagement> </configuration>
[WARNING] Skipping installation of artifact com.kohlschutter.junixsocket:junixsocket-native:nar:2.0.4: No suitable repository found to store the artifact in. [DEBUG] Effective packaging rule for com.kohlschutter.junixsocket:junixsocket-native:nar:amd64-Linux-gpp-jni:2.0.4:
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://fedorahosted.org/xmvn/CONFIG/1.0.0">
<artifactManagement> <rule> <artifactGlob> <groupId>com.kohlschutter.junixsocket</groupId> <artifactId>junixsocket-native</artifactId> <version>2.0.4</version> <classifier>amd64-Linux-gpp-jni</classifier> <stereotype>native</stereotype> <extension>nar</extension> </artifactGlob> <targetPackage>__noinstall</targetPackage> <optional>false</optional> </rule> </artifactManagement> </configuration>
As far as I understand this is not a bug [2] because nar is not a standard artifact. How do I tell xmvn how to do that? I tried adding
<?xml version="1.0" encoding="US-ASCII"?>
<configuration xmlns="http://fedorahosted.org/xmvn/CONFIG/2.0.0"> <repositories> <repository> <id>install-nar</id> <type>SimpleRepository</type> <stereotypes> <stereotype> <type>native</type> <extension>nar</extension> <classifier/> </stereotype> </stereotypes> <configuration> <repositories/> </configuration> </repository> </repositories> </configuration>
to the configuration, but it didn't solved the issue. Honestly I'm just wild guessing here, I can't find any example to follow.
I'm also ok to install it manually, but have no clue how to do that either. I can copy the archives (not only the nar, also the corresponding jar is skipped, since it depends on the nar I guess) into the %{buildroot}, but what about the pom files?
Also note I'm using trying to do this on CentOS 7, not Fedora, so quite an older version of xmvn (1.3.0).
Thank you for the help. Best regards
Enrico Tagliavini
[1] https://github.com/kohlschutter/junixsocket [2] https://bugzilla.redhat.com/show_bug.cgi?id=1034732 -- java-devel mailing list java-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/java-devel
Hi, nar extension is not supported by xmvn a workaround could be changing the extension name (e.g. jar) regards .g
On 03/17/2016 02:10 PM, Enrico Tagliavini wrote:
Hi there,
I'm trying to make an RPM package for junixsocket [1] but am hitting a wall with xmvn-install (build log trimmed for brevity):
[...]
[WARNING] Skipping installation of artifact com.kohlschutter.junixsocket:junixsocket-native:nar:2.0.4: No suitable repository found to store the artifact in.
[...]
Most likely this artifact should be installed as plain JAR. This can be done using %mvn_artifact macro.
As far as I understand this is not a bug [2] because nar is not a standard artifact. How do I tell xmvn how to do that? I tried adding
<?xml version="1.0" encoding="US-ASCII"?>
<configuration xmlns="http://fedorahosted.org/xmvn/CONFIG/2.0.0"> <repositories> <repository> <id>install-nar</id> <type>SimpleRepository</type> <stereotypes> <stereotype> <type>native</type> <extension>nar</extension> <classifier/> </stereotype> </stereotypes> <configuration> <repositories/> </configuration> </repository> </repositories> </configuration>
to the configuration, but it didn't solved the issue. Honestly I'm just wild guessing here, I can't find any example to follow.
If you really want to keep "nar" extension, then you can use the following custom XMvn configuration which should make XMvn recognize that extension:
<configuration> <repositories> <!-- Custom repo capable of holding nar artifacts. --> <repository> <id>custom-nar</id> <type>jpp</type> <properties> <root>path/where/nar/files/should/be/installed</root> </properties> <stereotypes> <stereotype> <extension>nar</extension> </stereotype> </stereotypes> </repository> <!-- Overrides default installation repository defined in /usr/share/xmvn/configuration.xml by prepending custom repo. --> <repository> <id>install</id> <type>compound</type> <configuration> <repositories> <repository>custom-nar</repository> <repository>base-install</repository> </repositories> </configuration> </repository> </repositories> </configuration>
This config file should be placed appropriate place (either "Reactor configuration directory" or "Reactor configuration file" as defined at https://mizdebsk.fedorapeople.org/xmvn/site/configuration.html)
Hi Mikolaj,
I'm not sure if renaming the nar archives to jar is going to help, the native-lib-loader might be upset and unable to find them anymore.... but I have no idea still have to try. Moreover I'm not really sure how to do them. I'm quite new to this stuff. If I recall correctly this is the first time I try to package stuff done with maven.
Thank you very much for the example configuration to actually package them, might come very handy in the future. About junixsocket... on Friday I discovered the existence of jnr-unixsocket. Seems more alive and doesn't require dynamic loading custom shared objects.... simply loads the socket syscall from the C library.
Best regards
Enrico
On 21 March 2016 at 08:07, Mikolaj Izdebski mizdebsk@redhat.com wrote:
On 03/17/2016 02:10 PM, Enrico Tagliavini wrote:
Hi there,
I'm trying to make an RPM package for junixsocket [1] but am hitting a wall with xmvn-install (build log trimmed for brevity):
[...]
[WARNING] Skipping installation of artifact com.kohlschutter.junixsocket:junixsocket-native:nar:2.0.4: No suitable repository found to store the artifact in.
[...]
Most likely this artifact should be installed as plain JAR. This can be done using %mvn_artifact macro.
As far as I understand this is not a bug [2] because nar is not a standard artifact. How do I tell xmvn how to do that? I tried adding
<?xml version="1.0" encoding="US-ASCII"?>
<configuration xmlns="http://fedorahosted.org/xmvn/CONFIG/2.0.0"> <repositories> <repository> <id>install-nar</id> <type>SimpleRepository</type> <stereotypes> <stereotype> <type>native</type> <extension>nar</extension> <classifier/> </stereotype> </stereotypes> <configuration> <repositories/> </configuration> </repository> </repositories> </configuration>
to the configuration, but it didn't solved the issue. Honestly I'm just wild guessing here, I can't find any example to follow.
If you really want to keep "nar" extension, then you can use the following custom XMvn configuration which should make XMvn recognize that extension:
<configuration> <repositories> <!-- Custom repo capable of holding nar artifacts. --> <repository> <id>custom-nar</id> <type>jpp</type> <properties> <root>path/where/nar/files/should/be/installed</root> </properties> <stereotypes> <stereotype> <extension>nar</extension> </stereotype> </stereotypes> </repository> <!-- Overrides default installation repository defined in /usr/share/xmvn/configuration.xml by prepending custom repo. --> <repository> <id>install</id> <type>compound</type> <configuration> <repositories> <repository>custom-nar</repository> <repository>base-install</repository> </repositories> </configuration> </repository> </repositories> </configuration>
This config file should be placed appropriate place (either "Reactor configuration directory" or "Reactor configuration file" as defined at https://mizdebsk.fedorapeople.org/xmvn/site/configuration.html)
-- Mikolaj Izdebski Software Engineer, Red Hat IRC: mizdebsk -- java-devel mailing list java-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/java-devel
java-devel@lists.fedoraproject.org