Compiling DSpace 6 with Mirage2 theme does not generate CSS files

1,801 views
Skip to first unread message

Ari

unread,
Oct 12, 2016, 4:04:15 AM10/12/16
to DSpace Technical Support
Hi,
I just tried to compile latest DSpace 6 version with Mirage2. Previously I had no problems with Mirage2 but now it seems that .css files are not generated. In the log (below) I can see error with compass.
Any ideas what could cause that?



urls[25] = file:/usr/share/tomcat/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.8/plexus-utils-1.5.8.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

    at org
.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:125)
   
... 23 more
Caused by: java.lang.NoClassDefFoundError: Lorg/eclipse/aether/RepositorySystemSession;
    at java
.lang.Class.getDeclaredFields0(Native Method)
    at java
.lang.Class.privateGetDeclaredFields(Class.java:2509)
    at java
.lang.Class.getDeclaredFields(Class.java:1819)
    at com
.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:661)
    at com
.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:366)
    at com
.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:165)
    at com
.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:609)
    at com
.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:565)
    at com
.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:551)
    at com
.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:865)
    at com
.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:790)
    at com
.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:278)
    at com
.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:210)
    at com
.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:986)
    at com
.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1019)
    at com
.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:982)
    at com
.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1032)
    at org
.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:45)
    at com
.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
    at com
.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
    at com
.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
    at com
.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
    at org
.sonatype.guice.plexus.lifecycles.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:138)
    at com
.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
    at com
.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
    at com
.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
    at com
.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
    at com
.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)
    at com
.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047)
    at com
.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
    at com
.google.inject.Scopes$1$1.get(Scopes.java:59)
    at org
.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:83)
    at org
.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:49)
    at org
.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:253)
    at org
.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:245)
    at org
.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:455)
    at org
.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
   
... 23 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.aether.RepositorySystemSession
    at org
.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at org
.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
    at org
.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
   
... 60 more
[INFO] ------ (Mirage2) de.saumya.mojo:gem-maven-plugin:1.0.6:exec
[WARNING] Compass can't find any Sass files to compile.
[WARNING] Is your compass configuration correct?.
[WARNING] If you'
re trying to start a new project, you have left off the directory argument.
[WARNING] Run "compass -h" to get help.
[ERROR] PluginManagerException:
org
.apache.maven.plugin.PluginExecutionException: Execution null of goal de.saumya.mojo:gem-maven-plugin:1.0.6:exec failed: Java returned: 1
    at org
.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
    at com
.soebes.maven.plugins.iterator.ExecutorMojo.executeMojo(ExecutorMojo.java:302)
    at com
.soebes.maven.plugins.iterator.ExecutorMojo.execute(ExecutorMojo.java:235)
    at org
.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org
.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    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:57)
    at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java
.lang.reflect.Method.invoke(Method.java:606)
    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:414)
    at org
.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: Java returned: 1
    at org
.apache.tools.ant.taskdefs.Java.execute(Java.java:87)
    at de
.saumya.mojo.ruby.script.AntLauncher.doExecute(AntLauncher.java:107)
    at de
.saumya.mojo.ruby.script.AntLauncher.executeIn(AntLauncher.java:141)
    at de
.saumya.mojo.ruby.script.Script.executeIn(Script.java:108)
    at de
.saumya.mojo.gem.ExecMojo.executeWithGems(ExecMojo.java:106)
    at de
.saumya.mojo.gem.AbstractGemMojo.executeJRuby(AbstractGemMojo.java:469)
    at de
.saumya.mojo.jruby.AbstractJRubyMojo.execute(AbstractJRubyMojo.java:298)
    at de
.saumya.mojo.gem.AbstractGemMojo.execute(AbstractGemMojo.java:222)
    at org
.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
   
... 23 more
[INFO]
[INFO] --- maven-war-plugin:2.6:war (default-war) @ xmlui-mirage2 ---
[INFO] Packaging webapp
[INFO] Assembling webapp [xmlui-mirage2] in [/dspace-src/dspace/modules/xmlui-mirage2/target/xmlui-mirage2-6.0-rc4-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp webResources [/dspace-src/dspace/modules/xmlui-mirage2/target/themes] to [/dspace-src/dspace/modules/xmlui-mirage2/target/xmlui-mirage2-6.0-rc4-SNAPSHOT]
[INFO] Copying webapp resources [/dspace-src/dspace/modules/xmlui-mirage2/src/main/webapp]
[INFO] Processing overlay [ id org.dspace:dspace-xmlui-mirage2]
[INFO] Webapp assembled in [183 msecs]
[INFO] Building war: /dspace-src/dspace/modules/xmlui-mirage2/target/xmlui-mirage2-6.0-rc4-SNAPSHOT.war
[INFO]                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building DSpace XML-UI (Manakin) :: Local Customizations 6.0-rc4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/dspace/dspace-xmlui-lang/maven-metadata.xml



Sidoroff, Ilja

unread,
Oct 12, 2016, 4:58:10 AM10/12/16
to Ari, DSpace Technical Support
This commit https://github.com/DSpace/DSpace/commit/4607bb90a6609f4319cc5f86abab631609d5a521 updated Mirage2 build dependencies, otherwise there shouldn’t have been any changes to Mirage2. Perhaps mvn clean might help? Or then try running Space prior to that commit to see if that had somehow caused the breakage.

br,

Ilja Sidoroff
University of Helsinki
> --
> You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
> To post to this group, send email to dspac...@googlegroups.com.
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.

Ari

unread,
Oct 13, 2016, 2:01:46 AM10/13/16
to DSpace Technical Support
Thanks Illja!
I think you spotted the problem.

git checkout master:
- compile -> there is no main.css in /dspace-installer/webapps/xmlui/themes/Mirage2/styles directory
git checkout d872f5db0373286bed50d815e2628e154bf730db
- compile -> there is main.css in /dspace-installer/webapps/xmlui/themes/Mirage2/styles and everything works

I'm compiling within Centos 7 docker image without pre-installed deps for Mirage2. This worked fine earlier with DSpace 6.

Art Lowel

unread,
Oct 13, 2016, 8:50:21 AM10/13/16
to DSpace Technical Support
Apparently this issue occurred for a lot of maven 3 plugins after maven switched from org/sonatype/aether to org/eclipse/aether in version 3.1
Is it possible that you're using a maven version lower than 3.1, and if so, could you upgrade to the latest version and try again?

Ari

unread,
Oct 14, 2016, 3:24:09 AM10/14/16
to DSpace Technical Support
Thanks for the tip. This might be the reason since Centos is using Apache Maven 3.0.5 (Red Hat 3.0.5-16)

I'll try newer maven.

Ari

Ari

unread,
Oct 14, 2016, 7:00:40 AM10/14/16
to DSpace Technical Support
It seems that upgrading to Maven 3.3.9 solved the issue. Thanks for help everyone!

Pedro Amorim

unread,
Nov 3, 2016, 11:40:17 AM11/3/16
to DSpace Technical Support
Hello Ari. Im having the exact same problem. So I installed maven 3.3.9 and rebuilt DSpace with mvn package.
However, now XMLUI only shows the error:
FileNotFoundException: dspace/webapps/xmlui/themes/Mirage2/sitemap.xmap

Did you do any other additional procedures ?

Thanks,
Pedro Amorim

Ari

unread,
Nov 4, 2016, 2:16:10 AM11/4/16
to DSpace Technical Support
Hello Pedro,
upgrading maven was enough for me. I'm quite certain that I didn't do anything else. Did you get any errors on compile?

Ari

Pedro Amorim

unread,
Nov 4, 2016, 12:30:57 PM11/4/16
to DSpace Technical Support
Hello Ari,

Thanks for coming back.
Please ignore the last post, as by mistake I ran the mvn package command without the -Dmirage2=true so that error was because the theme was indeed missing from the build process.

However, after installing DSpace with maven 3.3.9, I still have the problem (themes/Mirage2/styles/main.css and themes/Mirage2/vendor/modernizr/modernizr.js missing).

I am also using Docker and here's the whole build:

As far as I can tell, everything went smoothly, including the Mirage2 XMLUI theme section.

Häyrinen, Ari

unread,
Nov 7, 2016, 8:13:34 AM11/7/16
to Pedro Amorim, DSpace Technical Support
Hi,
my setup is little bit different. I have a separate images for compiling and running.
here is the docker file I use for compiling if that helps:

FROM centos:7
RUN yum -y install tomcat ant curl git wget which java-1.7.0-openjdk java-1.7.0-openjdk-devel 
ADD maven3/maven.sh /etc/profile.d/

RUN cd /opt/ && \
	wget http://www.nic.funet.fi/pub/mirrors/apache.org/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz && \
	tar -zxvf apache-maven-3.3.9-bin.tar.gz && \
	mv /opt/apache-maven-3.3.9 /opt/maven && \
	ln -s /opt/maven/bin/mvn /usr/bin/mvn && \

	chmod +x /etc/profile.d/maven.sh && \
	source /etc/profile.d/maven.sh && \

mvn -version 

ADD DSpace /dspace-src/

RUN chown -R tomcat /dspace-src
USER tomcat
WORKDIR /dspace-src

RUN mvn package -Dmirage2.on=true -P !dspace-jspui
WORKDIR /dspace-src/dspace/target/dspace-installer




Lähettäjä: dspac...@googlegroups.com [dspac...@googlegroups.com] käyttäjän Pedro Amorim [pjamo...@gmail.com] puolesta
Lähetetty: 4. marraskuuta 2016 18:30
Vastaanottaja: DSpace Technical Support
Aihe: [dspace-tech] Re: Compiling DSpace 6 with Mirage2 theme does not generate CSS files

--
You received this message because you are subscribed to a topic in the Google Groups "DSpace Technical Support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dspace-tech/2qQvNL2KOB8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dspace-tech...@googlegroups.com.

Pedro Amorim

unread,
Nov 7, 2016, 8:48:18 AM11/7/16
to DSpace Technical Support, pjamo...@gmail.com
Hello Ari,

I'm using maven 3.3.9 through environment variable and it also outputs 3.3.9 from the 'mvn --version' command.

However, I think I made some progress (in finding the cause of the problem at least).

Upon closer inspection on that build, I noticed an error on the Mirage2 component:

[ERROR] npm ERR! Linux 4.4.0-45-generic [ERROR] npm ERR! argv "/usr/src/DSpace-dspace-6.0/dspace/modules/xmlui-mirage2/target/themes/Mirage2/node/node" "/usr/src/DSpace-dspace-6.0/dspace/modules/xmlui-mirage2/target/themes/Mirage2/node/node_modules/npm/bin/npm-cli.js" "install" [ERROR] npm ERR! node v6.5.0 [ERROR] npm ERR! npm v3.10.8 [ERROR] npm ERR! path /root/.npm/grunt-contrib-compass/1.1.1/package [ERROR] npm ERR! code EACCES [ERROR] npm ERR! errno -13 [ERROR] npm ERR! syscall mkdir

User DSpace cannot write in directory /root (didn't have this problem before). After manually rebuilding as user DSpace (using gosu), the same problem occurs.
However, running the mvn package command as the 'root' user, it builds sucessfully (now the fun part), all files are there (themes/Mirage2/styles/main.css and themes/Mirage2/vendor/modernizr/modernizr.js) but now there's a new error:

Syntax error: File to import not found or unreadable: ../vendor/bootstrap-sass-official/assets/stylesheets/bootstrap.


So,
I wonder why that permission problem is happening in the first place and if I find and solve it's root cause I hope it'll resolve all my issues.

Also, some additional info.
I went back to my previous build (with maven 3.0.5) and it seems there really was a problem:

WARNING: Error injecting: com.github.eirslett.maven.plugins.frontend.mojo.InstallNodeAndNpmMojo java.lang.NoClassDefFoundError: Lorg/eclipse/aether/RepositorySystemSession;

Which doesn't show anymore, leading me to believe and confirm that 3.3.9 maven is indeed the solution for the initial problem, and now my problem lies elsewhere (as described above).

Thanks for the help Ari.

Regards,

Pedro Amorim

Pedro Amorim

unread,
Nov 7, 2016, 1:36:29 PM11/7/16
to DSpace Technical Support, pjamo...@gmail.com
Hello again,

After realizing my problem had to do with npm and bower folder permissions, I solved them manually, prior to 'mvn package':

RUN cd /root && mkdir .cache .config .local .npm
RUN chown -R dspace:dspace /root

This solved my problem.
Mirage2 was built successfully and everything is working fine.
However, I'm not very happy with this solution as it's clumsly and shouldn't be necessary to manually create these dirs.

This bug thread seems to accept this workaround as a final solution:

If anyone has successfully built 6.0 with Mirage2 on Debian Jessie without this, please do let me know and share how they done it.

Thanks all.

Regards,

Pedro Amorim

muaz awed

unread,
Mar 4, 2019, 5:24:05 PM3/4/19
to DSpace Technical Support
hi can you give me the full steps of installing mirag2 on ubuntu 18.04 with dspace 6
Reply all
Reply to author
Forward
0 new messages