Dude – What is up with Pluto 1.1?

Three things are messed up in pluto 1.1 right now
==== Bug in pageId lookup in trunk ======
======= Neither trunk nor beta1 will build unless maven.test.skip=true ========
===== The beta1 tag builds but will not pluto:install =======


Three things are messed up in pluto
/Chuck
==== Bug in pageId lookup in trunk ======
This worked about a week ago – so I am thinking something recent happenned.
The trunk has a bug where PageId’s end up with a prefix of a “/” and so the configuration can never find find pages – and things blow up horribly.
To reproduce – simply bring up pluto, log in as tomcat, and navigate to a page other than the default.
The fix is below:
vi pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfig.java
public PageConfig getPageConfig(String pageId) {
if (pageId == null || “”.equals(pageId)) {
if (LOG.isDebugEnabled()) {
LOG.debug(
“Requested page is null. Returning default: ” +
defaultPageId);
}
pageId = defaultPageId;
}
PageConfig retval = (PageConfig) pages.get(pageId);
// TODO: Fix Hack
if ( retval == null && pageId.startsWith(“/”) && pageId.length() > 2 ) {
System.out.println(“HACK ALert – Trimming off slash ” + pageId.substring(1));
retval = (PageConfig) pages.get(pageId.substring(1));
}
System.out.println(“retval = ” + retval);
return retval;
}
[DEBUG] PortalURLParser – Parsing URL: /pluto/portal/Pluto%20Admin
[DEBUG] PortalURLParser – Parsing request pathInfo: /Pluto Admin
[DEBUG] PortalDriverServlet – Processing render request.
[DEBUG] PortalDriverServlet – Rendering Portal: Requested Page: /Pluto Admin
HACK ALert – Trimming off slash Pluto Admin
retval = org.apache.pluto.driver.services.portal.PageConfig@f50e8d
======= Neither trunk nor beta1 will build unless maven.test.skip=true ========
[INFO] Surefire report directory: /Users/csev/dev/pluto-1.1/pluto-trunk/pluto-descriptor-impl/target/surefire-reports
org.apache.maven.surefire.booter.SurefireExecutionException: Unable to create test class ‘org.apache.pluto.descriptors.services.castor.WebAppDescriptorServiceImplTest’; nested exception is java.lang.ClassNotFoundException: org.apache.pluto.descriptors.services.castor.WebAppDescriptorServiceImplTest; nested exception is org.apache.maven.surefire.testset.TestSetFailedException: Unable to create test class ‘org.apache.pluto.descriptors.services.castor.WebAppDescriptorServiceImplTest’; nested exception is java.lang.ClassNotFoundException: org.apache.pluto.descriptors.services.castor.WebAppDescriptorServiceImplTest
org.apache.maven.surefire.testset.TestSetFailedException: Unable to create test class ‘org.apache.pluto.descriptors.services.castor.WebAppDescriptorServiceImplTest’; nested exception is java.lang.ClassNotFoundException: org.apache.pluto.descriptors.services.castor.WebAppDescriptorServiceImplTest
java.lang.ClassNotFoundException: org.apache.pluto.descriptors.services.castor.WebAppDescriptorServiceImplTest
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:100)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:84)
at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:147)
at org.apache.maven.surefire.Surefire.run(Surefire.java:108)
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:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
[INFO] —————————————————————————-
[ERROR] BUILD FAILURE
[INFO] —————————————————————————-
===== The beta1 tag builds but will not pluto:install =======
The key here is that you need to clean out your maven repo before doing install and pluto:install.
cd ~/.m2
rm -rf `find . -name ‘*SNAPSHOT*’`
If you don’t clean this up and have been building from trunk, the beta pluto:install *will* find the artifact and happily install the wrong thing (i.e. not the recently compiled beta1) code.
[INFO] —————————————————————————-
[ERROR] BUILD ERROR
[INFO] —————————————————————————-
[INFO] Failed to resolve artifact.
GroupId: org.apache.pluto
ArtifactId: pluto-portal
Version: 1.1.0-SNAPSHOT
Reason: Unable to download the artifact from any repository
org.apache.pluto:pluto-portal:1.1.0-SNAPSHOT:war
from the specified remote repositories:
central (http://repo1.maven.org/maven2)