Tab "Help" is empty

Discuss issues related to PS3 Media Server development (only for programmers)

Tab "Help" is empty

Postby smo » Sun Jan 08, 2012 3:32 pm

Hi again,

for trunk the tab "Help" is empty because documentation/index.html cannot be found. I can't even find in the target/pms-1.50.1-SNAPSHOT.jar.

Possible fix:
- Move the documentation folder from "external-resources" to "resources" (-> so it is packaged)
- Modify HelpTab to look for index.html in the proper place:
Code: Select all
diff --git a/src/main/java/net/pms/newgui/HelpTab.java b/src/main/java/net/pms/newgui/HelpTab.java
index bfd1083..fcd685c 100644
--- a/src/main/java/net/pms/newgui/HelpTab.java
+++ b/src/main/java/net/pms/newgui/HelpTab.java
@@ -26,6 +26,7 @@ import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.net.URL;
 
 import javax.swing.JComponent;
 import javax.swing.JEditorPane;
@@ -68,10 +69,10 @@ public class HelpTab {
 
                try {
                        // Read the HTML help file
-                       File file = new File("documentation/index.html");
+                       URL url = this.getClass().getResource("/resources/documentation/index.html");
 
                        // Display the HTML help file in the editor
-                       editorPane.setPage(file.toURI().toURL());
+                       editorPane.setPage(url);
                } catch (MalformedURLException e) {
                        // TODO: log error
                } catch (IOException e) {


Regards,
smo
smo
 
Posts: 46
Joined: Thu Nov 12, 2009 12:29 pm
Location: Germany

Re: Tab "Help" is empty

Postby Raptor399 » Sun Jan 08, 2012 9:26 pm

It isn't present when you run from Eclipse, true. It is properly packaged into the distribution, though.

I'll change the code to take into account the project.properties.
Thanks for reporting!
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Tab "Help" is empty

Postby smo » Tue Jan 10, 2012 10:27 pm

Raptor399 wrote:It isn't present when you run from Eclipse, true. It is properly packaged into the distribution, though.


I'm sorry, but I still don't get it. :)
After a full build without eclipse (mvn clean package), the tab is still empty for me. I tested it in Linux and Windows XP, same result.

For testing purposes I've started from scratch (Linux) and can reproduce the problem with the current trunk:

Code: Select all
smo@ding:/stuff/Entwicklung$ mkdir test
smo@ding:/stuff/Entwicklung$ cd test/
smo@ding:/stuff/Entwicklung/test$ git clone git://github.com/ps3mediaserver/ps3mediaserver.git

Cloning into 'ps3mediaserver'...
remote: Counting objects: 12312, done.
remote: Compressing objects: 100% (2514/2514), done.
remote: Total 12312 (delta 8112), reused 12133 (delta 7953)
Receiving objects: 100% (12312/12312), 21.72 MiB | 531 KiB/s, done.
Resolving deltas: 100% (8112/8112), done.

smo@ding:/stuff/Entwicklung/test$ cd ps3mediaserver
smo@ding:/stuff/Entwicklung/test/ps3mediaserver$ mvn package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building PS3 Media Server
[INFO]    task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 92 resources to resources
[INFO] Copying 25 resources
[INFO] Copying 1 resource to ..
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 193 source files to /stuff/Entwicklung/test/ps3mediaserver/target/classes
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource to resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Compiling 3 source files to /stuff/Entwicklung/test/ps3mediaserver/target/test-classes
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: /stuff/Entwicklung/test/ps3mediaserver/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running net.pms.test.TaskRunnerTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.12 sec
Running net.pms.test.RendererConfigurationTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.197 sec

Results :

Tests run: 3, Failures: 0, Errors: 0, Skipped: 0

[INFO] [git-commit-id:revision {execution: default}]
[INFO] [GitCommitIdMojo] Running on '/stuff/Entwicklung/test/ps3mediaserver/.git' repository...
[INFO] [GitCommitIdMojo] Initializing properties...
[INFO] [GitCommitIdMojo] Using maven project properties...
[INFO] [GitCommitIdMojo] Loading data from git repository...
[INFO] [GitCommitIdMojo] ------------------git properties loaded------------------
[INFO] [GitCommitIdMojo] git.build.user.email = git@xxx.xxx
[INFO] [GitCommitIdMojo] git.commit.user.email = patrick.atoon@gmail.com
[INFO] [GitCommitIdMojo] git.commit.time = 2012-01-10
[INFO] [GitCommitIdMojo] git.commit.message.full = Revert commit causing transcoding problems.
(See: http://www.ps3mediaserver.org/forum/viewtopic.php?f=11&t=12530&p=63509#p63507)

This reverts commit 6edfca169f469b4057650853ad27e76a95fef25c.

[INFO] [GitCommitIdMojo] git.commit.message.short = Revert commit causing transcoding problems. (See: http://www.ps3mediaserver.org/forum/viewtopic.php?f=11&t=12530&p=63509#p63507)
[INFO] [GitCommitIdMojo] git.commit.id.abbrev = e986194
[INFO] [GitCommitIdMojo] git.branch = master
[INFO] [GitCommitIdMojo] git.build.user.name = smo
[INFO] [GitCommitIdMojo] git.commit.id = e986194c68258befa450ed2900009d237ad21bb5
[INFO] [GitCommitIdMojo] git.build.time = 2012-01-10
[INFO] [GitCommitIdMojo] git.commit.user.name = Patrick Atoon
[INFO] [GitCommitIdMojo] ---------------------------------------------------------
[INFO] [GitCommitIdMojo] Finished running.
[INFO] [assembly:single {execution: make-jar-with-dependencies}]
[INFO] Reading assembly descriptor: /stuff/Entwicklung/test/ps3mediaserver/src/main/assembly/jar-with-dependencies.xml
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] org/apache/commons/collections/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] org/apache/commons/collections/ArrayStack.class already added, skipping
[INFO] org/apache/commons/collections/Buffer.class already added, skipping
[INFO] org/apache/commons/collections/BufferUnderflowException.class already added, skipping
[INFO] org/apache/commons/collections/FastHashMap$1.class already added, skipping
[INFO] org/apache/commons/collections/FastHashMap$CollectionView$CollectionViewIterator.class already added, skipping
[INFO] org/apache/commons/collections/FastHashMap$CollectionView.class already added, skipping
[INFO] org/apache/commons/collections/FastHashMap$EntrySet.class already added, skipping
[INFO] org/apache/commons/collections/FastHashMap$KeySet.class already added, skipping
[INFO] org/apache/commons/collections/FastHashMap$Values.class already added, skipping
[INFO] org/apache/commons/collections/FastHashMap.class already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] ch/ already added, skipping
[INFO] ch/qos/ already added, skipping
[INFO] ch/qos/logback/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/maven/ch.qos.logback/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/slf4j/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/README.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/maven/org.slf4j/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/hamcrest/ already added, skipping
[INFO] LICENSE.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/maven/org.hamcrest/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/hamcrest/ already added, skipping
[INFO] LICENSE.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/maven/org.hamcrest/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] org/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] com/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] com/ already added, skipping
[INFO] com/sun/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] com/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] com/ already added, skipping
[INFO] com/jgoodies/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] com/ already added, skipping
[INFO] com/jgoodies/ already added, skipping
[INFO] META-INF/services/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] Building jar: /stuff/Entwicklung/test/ps3mediaserver/target/pms-1.50.1-SNAPSHOT-jar-with-dependencies.jar
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] org/apache/commons/collections/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] org/apache/commons/collections/ArrayStack.class already added, skipping
[INFO] org/apache/commons/collections/Buffer.class already added, skipping
[INFO] org/apache/commons/collections/BufferUnderflowException.class already added, skipping
[INFO] org/apache/commons/collections/FastHashMap$1.class already added, skipping
[INFO] org/apache/commons/collections/FastHashMap$CollectionView$CollectionViewIterator.class already added, skipping
[INFO] org/apache/commons/collections/FastHashMap$CollectionView.class already added, skipping
[INFO] org/apache/commons/collections/FastHashMap$EntrySet.class already added, skipping
[INFO] org/apache/commons/collections/FastHashMap$KeySet.class already added, skipping
[INFO] org/apache/commons/collections/FastHashMap$Values.class already added, skipping
[INFO] org/apache/commons/collections/FastHashMap.class already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] ch/ already added, skipping
[INFO] ch/qos/ already added, skipping
[INFO] ch/qos/logback/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/maven/ch.qos.logback/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/slf4j/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/README.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/apache/ already added, skipping
[INFO] org/apache/commons/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/maven/org.slf4j/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/hamcrest/ already added, skipping
[INFO] LICENSE.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/maven/org.hamcrest/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] org/hamcrest/ already added, skipping
[INFO] LICENSE.txt already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/maven/org.hamcrest/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] org/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/NOTICE.txt already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] com/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] META-INF/LICENSE.txt already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] org/ already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] com/ already added, skipping
[INFO] com/sun/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] com/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] com/ already added, skipping
[INFO] com/jgoodies/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] com/ already added, skipping
[INFO] com/jgoodies/ already added, skipping
[INFO] META-INF/services/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/maven/ already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] META-INF/ already added, skipping
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] [jar:jar {execution: default-jar}]
[INFO] Building jar: /stuff/Entwicklung/test/ps3mediaserver/target/pms-1.50.1-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14 seconds
[INFO] Finished at: Tue Jan 10 22:04:11 CET 2012
[INFO] Final Memory: 60M/745M
[INFO] ------------------------------------------------------------------------

smo@ding:/stuff/Entwicklung/test/ps3mediaserver$ cd target/
smo@ding:/stuff/Entwicklung/test/ps3mediaserver/target$ java -jar pms-1.50.1-SNAPSHOT-jar-with-dependencies.jar

--> PMS starts


After that, the tab "Help" is still empty. In "pms-1.50.1-SNAPSHOT-jar-with-dependencies.jar" I can't find the folder "documentation".
Could you explain to me how the folder "documentation" is packaged to the jars (pms-1.50.1-SNAPSHOT.jar and/or pms-1.50.1-SNAPSHOT-jar-with-dependencies.jar)? I can't see anything about it in pom.xml.

Regards,
smo
smo
 
Posts: 46
Joined: Thu Nov 12, 2009 12:29 pm
Location: Germany

Re: Tab "Help" is empty

Postby Raptor399 » Wed Jan 11, 2012 8:59 am

smo wrote:
Raptor399 wrote:It isn't present when you run from Eclipse, true. It is properly packaged into the distribution, though.


I'm sorry, but I still don't get it. :)
After a full build without eclipse (mvn clean package), the tab is still empty for me. I tested it in Linux and Windows XP, same result.
[...]
Could you explain to me how the folder "documentation" is packaged to the jars (pms-1.50.1-SNAPSHOT.jar and/or pms-1.50.1-SNAPSHOT-jar-with-dependencies.jar)? I can't see anything about it in pom.xml.

Regards,
smo

The packaging differs per OS:

- Linux uses assembly-linux.xml
- OS X uses assembly-osx.xml
- Windows uses setup.nsi

All of these package the documentation folder.

The first two are invoked by the maven-assembly-plugin, the latter by the nsis-maven-plugin from the pom.xml.
Hope that helps.
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Tab "Help" is empty

Postby smo » Sun Jan 22, 2012 1:57 pm

Raptor399 wrote:The packaging differs per OS:

- Linux uses assembly-linux.xml
- OS X uses assembly-osx.xml
- Windows uses setup.nsi

The first two are invoked by the maven-assembly-plugin, the latter by the nsis-maven-plugin from the pom.xml.
Hope that helps.


Thanks a lot for the explanation!
I didn't realize that there's a difference between the development build (mvn package) and the release build (using the assembly plugin). But I still can't figure out how a release build is done for Linux.

1. Invoking "mvn" (without parameters) does execute <defaultGoal>assembly:assembly</defaultGoal>. Sounds good.
-> "mvn clean; mvn;"
Code: Select all
[INFO] Building jar: /stuff/Entwicklung/pms_builds/ps3mediaserver/target/pms-1.50.1-SNAPSHOT.jar
[INFO] [assembly:assembly {execution: default-cli}]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error reading assemblies: No assembly descriptors found.

I can see both *SNAPSHOT.jars in ./target after this error. So the java build is fine, just packaging using the assembly plugin fails.

2. So mvn needs an assembly descriptor (for me: assembly-linux.xml). Maybe I've to use the linux profile defined in pom.xml. If doing this, maven should use assembly-linux.xml because for the linux profile the <maven-assembly-plugin> is configured to use "assembly-linux.xml".
-> "mvn clean; mvn -P linux;"
Code: Select all
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An Ant BuildException has occured: Warning: Could not find file /stuff/Entwicklung/pms_builds/ps3mediaserver/target/pms-1.50.1-SNAPSHOT-jar-with-dependencies.jar to copy.
around Ant part ...<move file="/stuff/Entwicklung/pms_builds/ps3mediaserver/target/pms-1.50.1-SNAPSHOT-jar-with-dependencies.jar" overwrite="true" tofile="/stuff/Entwicklung/pms_builds/ps3mediaserver/target/pms.jar"/>... @ 4:201 in /stuff/Entwicklung/pms_builds/ps3mediaserver/target/antrun/build-main.xml

There are no jars in the target folder. Seems that this target only works if building the jars has been already done.

3. So maybe I have to force a "dev" build before?
-> "mvn clean; mvn package; mvn -P linux;"

Code: Select all
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building PS3 Media Server
[INFO]    task-segment: [clean]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting file set: /stuff/Entwicklung/pms_builds/ps3mediaserver/target (included: [**], excluded: [])
[INFO] [external-dependency:clean-external {execution: clean-external-dependencies}]
[INFO] starting to clean external dependency staged files
[INFO] finished cleaning external dependency staged files
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Sun Jan 22 13:00:27 CET 2012
[INFO] Final Memory: 14M/227M
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building PS3 Media Server
[INFO]    task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [git-commit-id:revision {execution: default}]
[INFO] [GitCommitIdMojo] Running on '/stuff/Entwicklung/pms_builds/ps3mediaserver/.git' repository...
[INFO] [GitCommitIdMojo] Initializing properties...
[INFO] [GitCommitIdMojo] Using maven project properties...
[INFO] [GitCommitIdMojo] Loading data from git repository...
[INFO] [GitCommitIdMojo] ------------------git properties loaded------------------
[INFO] [GitCommitIdMojo] git.build.user.email = git@xxx.xxx
[INFO] [GitCommitIdMojo] git.commit.user.email = patrick.atoon@gmail.com
[INFO] [GitCommitIdMojo] git.commit.time = 2012-01-21
[INFO] [GitCommitIdMojo] git.commit.message.full = Reporting unit tests as skipped instead of skipping silently.

[INFO] [GitCommitIdMojo] git.commit.message.short = Reporting unit tests as skipped instead of skipping silently.
[INFO] [GitCommitIdMojo] git.commit.id.abbrev = dd74c3b
[INFO] [GitCommitIdMojo] git.branch = master
[INFO] [GitCommitIdMojo] git.build.user.name = smo
[INFO] [GitCommitIdMojo] git.commit.id = dd74c3be7f81fec844f2c1557e0fe898933e98b7
[INFO] [GitCommitIdMojo] git.build.time = 2012-01-22
[INFO] [GitCommitIdMojo] git.commit.user.name = Patrick Atoon
[INFO] [GitCommitIdMojo] ---------------------------------------------------------
[INFO] [GitCommitIdMojo] Finished running.
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 91 resources to resources
[INFO] Copying 1 resource to resources
[INFO] Copying 25 resources
[INFO] Copying 1 resource to ..
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 193 source files to /stuff/Entwicklung/pms_builds/ps3mediaserver/target/classes
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource to resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Compiling 5 source files to /stuff/Entwicklung/pms_builds/ps3mediaserver/target/test-classes
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: /stuff/Entwicklung/pms_builds/ps3mediaserver/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running net.pms.test.formats.FormatTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.12 sec
Running net.pms.test.formats.FormatRecognitionTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 8, Time elapsed: 0.376 sec
Running net.pms.test.TaskRunnerTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.009 sec
Running net.pms.test.RendererConfigurationTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.042 sec

Results :

Tests run: 13, Failures: 0, Errors: 0, Skipped: 8

[INFO] [assembly:single {execution: make-jar-with-dependencies}]
[INFO] Reading assembly descriptor: /stuff/Entwicklung/pms_builds/ps3mediaserver/src/main/assembly/jar-with-dependencies.xml
[INFO] META-INF/ already added, skipping
[...]
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] Building jar: /stuff/Entwicklung/pms_builds/ps3mediaserver/target/pms-1.50.1-SNAPSHOT-jar-with-dependencies.jar
[INFO] META-INF/ already added, skipping
[...]
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] [jar:jar {execution: default-jar}]
[INFO] Building jar: /stuff/Entwicklung/pms_builds/ps3mediaserver/target/pms-1.50.1-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14 seconds
[INFO] Finished at: Sun Jan 22 13:00:42 CET 2012
[INFO] Final Memory: 60M/731M
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building PS3 Media Server
[INFO]    task-segment: [assembly:assembly] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing assembly:assembly
[INFO] ------------------------------------------------------------------------
[INFO] Building PS3 Media Server
[INFO] ------------------------------------------------------------------------
[INFO] [git-commit-id:revision {execution: default}]
[INFO] [GitCommitIdMojo] Running on '/stuff/Entwicklung/pms_builds/ps3mediaserver/.git' repository...
[INFO] [GitCommitIdMojo] Initializing properties...
[INFO] [GitCommitIdMojo] Using maven project properties...
[INFO] [GitCommitIdMojo] Loading data from git repository...
[INFO] [GitCommitIdMojo] ------------------git properties loaded------------------
[INFO] [GitCommitIdMojo] git.build.user.email = git@xxx.xxx
[INFO] [GitCommitIdMojo] git.commit.user.email = patrick.atoon@gmail.com
[INFO] [GitCommitIdMojo] git.commit.time = 2012-01-21
[INFO] [GitCommitIdMojo] git.commit.message.full = Reporting unit tests as skipped instead of skipping silently.

[INFO] [GitCommitIdMojo] git.commit.message.short = Reporting unit tests as skipped instead of skipping silently.
[INFO] [GitCommitIdMojo] git.commit.id.abbrev = dd74c3b
[INFO] [GitCommitIdMojo] git.branch = master
[INFO] [GitCommitIdMojo] git.build.user.name = smo
[INFO] [GitCommitIdMojo] git.commit.id = dd74c3be7f81fec844f2c1557e0fe898933e98b7
[INFO] [GitCommitIdMojo] git.build.time = 2012-01-22
[INFO] [GitCommitIdMojo] git.commit.user.name = Patrick Atoon
[INFO] [GitCommitIdMojo] ---------------------------------------------------------
[INFO] [GitCommitIdMojo] Finished running.
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 91 resources to resources
[INFO] Copying 1 resource to resources
[INFO] Copying 25 resources
[INFO] Copying 1 resource to ..
[WARNING] DEPRECATED [tasks]: Use target instead
[INFO] [antrun:run {execution: process-resources}]
[WARNING] Parameter tasks is deprecated, use target instead
[INFO] Executing tasks

main:
    [mkdir] Created dir: /stuff/Entwicklung/pms_builds/ps3mediaserver/target/bin
      [get] Getting: http://ps3mediaserver.googlecode.com/svn/trunk/ps3mediaserver/linux/tsMuxeR
      [get] To: /stuff/Entwicklung/pms_builds/ps3mediaserver/target/bin/tsMuxeR
[INFO] Executed tasks
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource to resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: /stuff/Entwicklung/pms_builds/ps3mediaserver/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running net.pms.test.formats.FormatTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.12 sec
Running net.pms.test.formats.FormatRecognitionTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 8, Time elapsed: 0.375 sec
Running net.pms.test.TaskRunnerTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.008 sec
Running net.pms.test.RendererConfigurationTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.042 sec

Results :

Tests run: 13, Failures: 0, Errors: 0, Skipped: 8

[WARNING] DEPRECATED [tasks]: Use target instead
[INFO] [antrun:run {execution: prepare-package}]
[WARNING] Parameter tasks is deprecated, use target instead
[INFO] Executing tasks

main:
     [move] Moving 1 file to /stuff/Entwicklung/pms_builds/ps3mediaserver/target
[INFO] Executed tasks
[INFO] [assembly:single {execution: make-jar-with-dependencies}]
[INFO] Reading assembly descriptor: /stuff/Entwicklung/pms_builds/ps3mediaserver/src/main/assembly/jar-with-dependencies.xml
[INFO] META-INF/ already added, skipping
[...]
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] Building jar: /stuff/Entwicklung/pms_builds/ps3mediaserver/target/pms-1.50.1-SNAPSHOT-jar-with-dependencies.jar
[INFO] META-INF/ already added, skipping
[...]
[INFO] META-INF/MANIFEST.MF already added, skipping
[INFO] [jar:jar {execution: default-jar}]
[INFO] Building jar: /stuff/Entwicklung/pms_builds/ps3mediaserver/target/pms-1.50.1-SNAPSHOT.jar
[INFO] [assembly:single {execution: build-pms}]
[INFO] Reading assembly descriptor: /stuff/Entwicklung/pms_builds/ps3mediaserver/src/main/assembly/assembly-linux.xml
[INFO] Building tar : /stuff/Entwicklung/pms_builds/ps3mediaserver/target/pms-1.50.1-SNAPSHOT-distribution.tar.gz
[INFO] [assembly:assembly {execution: default-cli}]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error reading assemblies: No assembly descriptors found.

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12 seconds
[INFO] Finished at: Sun Jan 22 13:00:56 CET 2012
[INFO] Final Memory: 49M/745M
[INFO] ------------------------------------------------------------------------

Despite the build error the file ./target/pms-1.50.1-SNAPSHOT-distribution.tar.gz is generated and contains a working pms snapshot for Linux. But I guess the error tells me I'm still doing it wrong. ;)

Could you explain how a release build is done? Is the behavior I've described above intended?

My guess for the correct build order:
  • 1. validate, compile, test..
  • 2. pre-package: Generating OS independent jars using: assembly/jar-with-dependencies.xml
  • 3. package: Generating OS dependent tgz/exe/dmg using: assembly/* depending on the profile used when executing mvn. By default the profile should be chosen automatically depending on the OS the user is using(?).

Thanks
smo
smo
 
Posts: 46
Joined: Thu Nov 12, 2009 12:29 pm
Location: Germany

Re: Tab "Help" is empty

Postby Raptor399 » Mon Jan 23, 2012 12:00 am

smo wrote:But I guess the error tells me I'm still doing it wrong. ;)

You're quite close, though. :-)
I would say that "mvn package" is all you need to do, no "-P linux" needed.
As far as I can tell the "target/pms-1.50.1-SNAPSHOT-distribution.tar.gz" file is a valid distribution file for Linux - I never installed PMS on Linux myself, so it's hard to tell for sure.

Could you explain how a release build is done? Is the behavior I've described above intended?

My guess for the correct build order:
  • 1. validate, compile, test..
  • 2. pre-package: Generating OS independent jars using: assembly/jar-with-dependencies.xml
  • 3. package: Generating OS dependent tgz/exe/dmg using: assembly/* depending on the profile used when executing mvn. By default the profile should be chosen automatically depending on the OS the user is using(?).

Yes, that is right.

What might be tricky is the order in which the maven-assembly-plugin and the antrun execution with id "prepare-package" are run. Both are executing in the "prepare-package" phase and it appears that for you, the antrun execution is run first.

But if it runs first there is no "pms-1.50.1-SNAPSHOT-jar-with-dependencies.jar" to move. This matches the build error you pasted.

You can try changing the phase for the antrun execution from "prepare-package" to "package".
That should make it run after the jar is assembled.
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Tab "Help" is empty

Postby smo » Wed Jan 25, 2012 12:38 am

Raptor399 wrote:I would say that "mvn package" is all you need to do, no "-P linux" needed.
[...]
What might be tricky is the order in which the maven-assembly-plugin and the antrun execution with id "prepare-package" are run. Both are executing in the "prepare-package" phase and it appears that for you, the antrun execution is run first.
[...]
You can try changing the phase for the antrun execution from "prepare-package" to "package".
That should make it run after the jar is assembled.


Thanks again! Here's the diff that fixed the build ("mvn package") for me:

Code: Select all
smo@ding:/stuff/Entwicklung/pms_builds/ps3mediaserver$ git diff
diff --git a/pom.xml b/pom.xml
index 95029fa..3a93d91 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1044,7 +1044,8 @@
                                <activeByDefault>false</activeByDefault>
                                <os>
                                        <!-- OSX is also detected as Unix, ignore the false positive -->
-                                       <family>unix,!mac</family>
+                                       <family>unix</family>
+                                       <name>!mac</name>
                                </os>
                        </activation>
                       
@@ -1077,7 +1078,7 @@
                                                                       
                                                        <execution>
                                                                <id>prepare-package</id>
-                                                               <phase>prepare-package</phase>
+                                                               <phase>package</phase>
                                                                <goals>
                                                                        <goal>run</goal>
                                                                </goals>


After changing the antrun definition it almost works.
But there's another problem: "<family>unix,!mac</family>" doesn't work for me, the linux profile is never used automatically. Could you make sure that the patch doesn't break things for mac?
I couldn't find anything about the syntax you used (<family>unix,!mac</family>) in the documentation, is it supposed to work? Maybe a maven bug?
smo
 
Posts: 46
Joined: Thu Nov 12, 2009 12:29 pm
Location: Germany

Re: Tab "Help" is empty

Postby Raptor399 » Wed Jan 25, 2012 8:32 am

smo wrote:After changing the antrun definition it almost works.
But there's another problem: "<family>unix,!mac</family>" doesn't work for me, the linux profile is never used automatically. Could you make sure that the patch doesn't break things for mac?
I couldn't find anything about the syntax you used (<family>unix,!mac</family>) in the documentation, is it supposed to work? Maybe a maven bug?

It is difficult to find because the official Maven 3 reference documentation is rather abstract. The Maven 2 reference (scroll down to "Activation") points to the maven-enforcer-plugin which finally spells out the syntax.

I have tested on OSX, and when I change the Linux profile to read:
Code: Select all
         <id>linux</id>
         <activation>
            <activeByDefault>false</activeByDefault>
            <os>
               <family>unix</family>
            </os>
         </activation>

it gets activated on OSX as well. This is not really harmful, as the OSX profile gets executed as well.
In fact, a while ago SubJunk reminded me that the Linux build used to appear alongside the Windows build automatically.

Windows can't create .dmg files and OSX can't execute NSIS, but the Linux build does not contain any platform incompatibilities. So I think I'll change it to this:
Code: Select all
         <id>linux</id>
         <activation>
            <activeByDefault>true</activeByDefault>
         </activation>

Thank you for testing! :-)
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Tab "Help" is empty

Postby smo » Wed Jan 25, 2012 1:48 pm

Raptor399 wrote:I have tested on OSX, and when I change the Linux profile to read:
Code: Select all
         <id>linux</id>
         <activation>
            <activeByDefault>false</activeByDefault>
            <os>
               <family>unix</family>
            </os>
         </activation>

it gets activated on OSX as well. This is not really harmful, as the OSX profile gets executed as well.


Have you tried the name tag as proposed in my patch?
Code: Select all
         <id>linux</id>
         <activation>
            <activeByDefault>false</activeByDefault>
            <os>
                                     <family>unix</family>
                                     <name>!mac</name>
            </os>
         </activation>


Raptor399 wrote:Windows can't create .dmg files and OSX can't execute NSIS, but the Linux build does not contain any platform incompatibilities.

The only disadvantage is, that's it is not very self-explanatory. I would prefer the solution above it it works. -> So for every OS the "correct" profile is used, I guess that would be the behavior that a maven devoloper not familiar with pms would expect. :)
Raptor399 wrote:Thank you for testing! :-)
Still so much to learn. :)
smo
 
Posts: 46
Joined: Thu Nov 12, 2009 12:29 pm
Location: Germany

Re: Tab "Help" is empty

Postby Raptor399 » Wed Jan 25, 2012 8:00 pm

Good suggestions; I have committed a fix.
Does the latest version work for you?
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Next

Return to Developers

Who is online

Users browsing this forum: No registered users and 5 guests