1

I started programming in Java using Eclipse a few years ago, but then I had the opportunity to work with Intellij and I'm happier with it, because it's more performant, even though it has less plugins.

My problem is that now I'm working with wro4j in a SpringBoot application. When I run the spring boot app from the IDE, the resources managed by wro4j do not seem to be downloaded, so I guess this is because I need to enable something for Intellij to work with wro4j, since, I know, there's a plugin for Eclipse to work with wro4j. Is there such a thing for Intellij?

Currently, to make my project work as expected, i.e. resources are downloaded, etc, I need to install and run it from the terminal with the following commands:

  1. mvn clean install

  2. mvn spring-boot:run

Also my wro.xml file looks like this:

<groups xmlns="http://www.isdc.ro/wro">
    <group name="angular-bootstrap">
        <css>webjar:bootstrap/3.3.7-1/less/bootstrap.less</css>
        <css>file:@project.basedir@/src/main/wro/main.less</css>
        <js>webjar:jquery/2.2.4/jquery.min.js</js>
        <js>webjar:angularjs/1.4.9/angular.min.js</js>
        <js>webjar:angularjs/1.4.9/angular-route.min.js</js>
        <js>webjar:angularjs/1.4.9/angular-cookies.min.js</js>
    </group>
</groups>

and the http://www.isdc.ro/wro is colored red with the warning:

URI is not registered

but this is because, I think, I've not wro4j as a dependency but as a plugin. In fact, if I also add it as a dependency, the warning disappears, but I still have the problem that dependencies are not downloaded.

nbro
  • 15,395
  • 32
  • 113
  • 196

2 Answers2

1

I managed to solve this issue by providing the location of the XML Schema (XSD).

<groups xmlns="http://www.isdc.ro/wro"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.isdc.ro/wro https://raw.githubusercontent.com/wro4j/wro4j/1.8.x/wro4j-core/src/main/resources/ro/isdc/wro/wro.xsd">

In this case, I pointed to the XSD located in the project's GitHub page in raw format.

After fetching the external resource you should have everything working fine.

Gerardo Cauich
  • 559
  • 5
  • 20
0

I'm testing Intellij with wro4j and SpringBoot and I got the same issue. The only step to stop this error is go to:

File -> Settings -> Project Settings -> Schemas and DTDs

Press the green cross in the "Ignored Schemas and DTDs" section and add: http://www.isdc.ro/wro

I hope this help you.