Git Product home page Git Product logo

Comments (7)

aldrinleal avatar aldrinleal commented on August 14, 2024

looks possible. I'll go take a look

-- Aldrin Leal, [email protected] / http://about.me/aldrinleal

On Thu, Mar 17, 2016 at 8:56 AM, Romain Manni-Bucau <
[email protected]> wrote:

idea would be to add dependencies and target/classes to be able to use in
gsp some utility developped in src/main/java or a dependency (these ones
can be added to the plugin but when using some utility from src/main/java
in a dedicated module it is a big copy/paste we can avoid).


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#16

from jbake-maven-plugin.

aldrinleal avatar aldrinleal commented on August 14, 2024

Romain,

I've made two things:

  1. Adding it to phase process-classes (post-compile, thus)
  2. Set it effectively into runtime scope, thus able to share the classloading of whatever is kept under src/main/java

give it a try

from jbake-maven-plugin.

rmannibucau avatar rmannibucau commented on August 14, 2024

Hi Aldrin,

get an exception trying to build:

[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project br.com.ingenieux:jbake-maven-plugin:0.3.0-SNAPSHOT (C:\Users\romain\.babun\cygwin\tmp\jbake-maven-plugin\pom.xml) has 1 error
[ERROR]     Non-parseable POM C:\Users\romain\.babun\cygwin\tmp\pom.xml: only whitespace content allowed before start tag and not \u1b (position: START_DOCUMENT seen \u1b... @1:1)  @ C:\Users\romain\.babun\cygwin\tmp\pom.xml, line 1, column 1 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException

Didn't dig but seems like a "hidden" char at the beginning of the pom. I didn't see how to add target/classes or another location to the build in the diff. Normally maven doesn't do it by default and the plugin needs IIRC. That said even if it does I would miss the project dependencies I think no?

from jbake-maven-plugin.

aldrinleal avatar aldrinleal commented on August 14, 2024

target/classes is added because of this:

@mojo(name = "generate", requiresProject = true,
requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME)

https://maven.apache.org/developers/mojo-api-specification.html

"Flags this Mojo as requiring the dependencies in the specified class path
to be resolved before it can execute. The matrix below illustrates which
values for__ (first column) are supported and which
dependency scopes (first row) they will request to resolve:"

-- Aldrin Leal, [email protected] / http://about.me/aldrinleal

On Sun, Apr 10, 2016 at 12:39 PM, Romain Manni-Bucau <
[email protected]> wrote:

Hi Aldrin,

get an exception trying to build:

[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project br.com.ingenieux:jbake-maven-plugin:0.3.0-SNAPSHOT (C:\Users\romain.babun\cygwin\tmp\jbake-maven-plugin\pom.xml) has 1 error
[ERROR] Non-parseable POM C:\Users\romain.babun\cygwin\tmp\pom.xml: only whitespace content allowed before start tag and not \u1b (position: START_DOCUMENT seen \u1b... @1:1) @ C:\Users\romain.babun\cygwin\tmp\pom.xml, line 1, column 1 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException

Didn't dig but seems like a "hidden" char at the beginning of the pom. I
didn't see how to add target/classes or another location to the build in
the diff. Normally maven doesn't do it by default and the plugin needs
IIRC. That said even if it does I would miss the project dependencies I
think no?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#16 (comment)

from jbake-maven-plugin.

rmannibucau avatar rmannibucau commented on August 14, 2024

hmm, maybe I'm wrong but it resolves the dependencies but doesn't add them to the plugin classloader which is still under the mojo responsability like this https://github.com/apache/tomee/blob/master/maven/tomee-embedded-maven-plugin/src/main/java/org/apache/openejb/maven/plugins/TomEEEmbeddedMojo.java#L410

from jbake-maven-plugin.

aldrinleal avatar aldrinleal commented on August 14, 2024

Then we need to be creative and come with a proof of concept then :)

from jbake-maven-plugin.

rmannibucau avatar rmannibucau commented on August 14, 2024

Don't have much time this month but idea was to use the plugin to generate new tomee website proposal: https://github.com/rmannibucau/site-tomee-ng. Temporarly I wrote my main https://github.com/rmannibucau/site-tomee-ng/blob/master/src/main/java/org/apache/tomee/website/JBake.java (and used tomee as http server ;)) but would be great to not have this code and I think it is doable.

from jbake-maven-plugin.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.