What about Maven ?

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: What about Maven ?

utgarda
Oops, I forgot one more requirement: jarred sources and javadocs for the main artifact. Which, I believe, is gluegen-rt, so I should collect only the sources/javadocs for classes in that jar... Maybe that's already done somewhere in the ant build?
Reply | Threaded
Open this post in threaded view
|

Re: What about Maven ?

Michael Bien
In reply to this post by utgarda
On 09/13/2010 03:10 AM, utgarda [via jogamp] wrote:
Michael Bien wrote:
gluegen.jar is just build-time infrastructure... not needed at runtime.
So, do you think I should even deploy gluegen.jar? Would anyone want it as dependency, or it's just for the ant build?
i would do it only on request or so. I don't think there are many projects out there using the gluegen generator right now.



Now deploying gluegen with valid POMs, so, when the next version arrives, it will be able to go to sonatype's staging repo or even further to maven central. I didn't dig commit histories really hard, so just put in the 2 latest most active people as developers. Maybe you want to put there some of the people who did all the coding before you, as developers or committers, to give them some credit: http://github.com/utgarda/gluegen/commit/d7eb33b02604133f2593e468393f7d56c4c50f8f#diff-2
Maybe the file requires some other editing too, so please have a look.

Sorry guys, I put your emails openly, hope those files never get indexed by nasty spammers.

... should be ok.


Elijah Menifee wrote:
The upsides of using a maven project pom is it provides a cross-ide project that can be used by Eclipse, Netbeans, and I believe IntelliJ.
Yep, IntelliJ Idea does that allright.
Elijah Menifee wrote:
Also instead of relying on published artifact versions for a specific platform, a maven project could depenend on another maven source/snapshot project, and descend and build the dependancy first for the local platform.
Yep, that's cool. But with properly deployed pre-built artifacts their dependencies are recoursively resolved too, so the effect is pretty much the same, and in a way even better - you have the benefit of pre-built stuff.
Elijah Menifee wrote:
Of course all the work to make the existing project maven compatable may not be worth the effort for the additional benefits.
Totally. Of course, we don't know until we try it, but I'm scared even to think of doing what it takes - seems such a load of work to me.

"scared" is exactly the right way to describe the situation :)

I fear that we would gain not much if we would move to maven. Maven is all about conventions to get rid of... configuration. But if you look at the build of jogl, its far from a standard java project. I fear that the final maven xml might be even harder to maintain as the current ant files.


(btw ANT is IDE independent also :) )

best regards,
michael
-- 
- - - -
http://michael-bien.com
Reply | Threaded
Open this post in threaded view
|

Re: What about Maven ?

Michael Bien
In reply to this post by utgarda
  well, we zip all the crap at the end :)
should be easy to split it into jars.

I will take a look at it this evening.

On 09/13/2010 03:19 AM, utgarda [via jogamp] wrote:
> Oops, I forgot one more requirement: jarred sources and javadocs for
> the main artifact. Which, I believe, is gluegen-rt, so I should
> collect only the sources/javadocs for classes in that jar... Maybe
> that's already done somewhere in the ant build?
>
--
- - - -
http://michael-bien.com

Reply | Threaded
Open this post in threaded view
|

Building JOGAMP with pre-built GlueGen

utgarda
In reply to this post by Michael Bien
To check if putting GlueGen to maven repo can be of any use to anyone, trying to build JOGL only with pre-built artifacts from repo, having troubles:

1) JOGL buildfiles refer to gluegen-cpptasks.xml and otherwise relies rather heavily on ../../gluegen/ , which is not-so-cool, so I'm trying to add an option to rely only on artifacts fetched by maven, for this I pack gluegen-cpptasks*.xml into another jar. The problem is those files refer to ${gluegen.root}/make/ , which makes it difficult to import them though <import> <javaresource>, so I have to unpack them to ../../gluegen/make and ../../gluegen/build after fetching with maven, which is totally not cool. Yep, maybe I can fix that myself, but maybe you guys can do that faster.

2) cpptasks.jar is present in repos, so copying it to some lib directory should work fine. The problem is that gluegen-cpptasks.xml gets it though ${gluegen.root}/make/lib/ , not some variable that means library folder.

Please review the changes to buildfiles: GlueGen, JOGL

3) Seems like gluegen-rt.jar still doesn't contain everything required to run those cpp tasks, here's an attempt to build JOGL with only gluegen-rt:
java.generate.composable.pipeline.custom.check.glfixfunc:

java.generate.composable.pipeline.custom.glfixfunc:
     [java] Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/gluegen/opengl/BuildComposablePipeline
     [java] Caused by: java.lang.ClassNotFoundException: com.sun.gluegen.opengl.BuildComposablePipeline
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
     [java]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
     [java] Could not find the main class: com.sun.gluegen.opengl.BuildComposablePipeline. Program will exit.

BUILD FAILED
/home/etsvigun/devenv/jogamp/jogl/make/build.xml:37: The following error occurred while executing this line:
/home/etsvigun/devenv/jogamp/jogl/make/build-jogl.xml:980: Java returned: 1
Reply | Threaded
Open this post in threaded view
|

Re: Building JOGAMP with pre-built GlueGen

Michael Bien
On 09/19/2010 07:08 PM, utgarda [via jogamp] wrote:
To check if putting GlueGen to maven repo can be of any use to anyone, trying to build JOGL only with pre-built artifacts from repo, having troubles:

1) JOGL buildfiles refer to gluegen-cpptasks.xml and otherwise relies rather heavily on ../../gluegen/ , which is not-so-cool, so I'm trying to add an option to rely only on artifacts fetched by maven, for this I pack gluegen-cpptasks*.xml into another jar. The problem is those files refer to ${gluegen.root}/make/ , which makes it difficult to import them though <import> <javaresource>, so I have to unpack them to ../../gluegen/make and ../../gluegen/build after fetching with maven, which is totally not cool. Yep, maybe I can fix that myself, but maybe you guys can do that faster.

all projects depend on gluegen (_the_project) at buildtime. The inter-project dependencies are ugly but the only way to share build scripts.

gluegen.jar contains the code generator (Ant tasks). Ant however doesn't support loading of ant scripts directly from jar files (include statement).. so we can't just put it into it.

So I don't see how this could work via maven. :/

I would recommend to concentrate at the actual artefacts (gluegen-rt.jar). Thats what most people want... just be able to add the dependency and start coding.



2) cpptasks.jar is present in repos, so copying it to some lib directory should work fine. The problem is that gluegen-cpptasks.xml gets it though ${gluegen.root}/make/lib/ , not some variable that means library folder.
i believe the cpptasks.jar we use is patched.. so not the original file



Please review the changes to buildfiles: GlueGen, JOGL

3) Seems like gluegen-rt.jar still doesn't contain everything required to run those cpp tasks, here's an attempt to build JOGL with only gluegen-rt:
rt == runtime. Its not for build. Its just a common set of classes and native libs.
gluegen.jar != gluegen-rt.jar

regards,
michael


-- 
- - - -
http://michael-bien.com
Reply | Threaded
Open this post in threaded view
|

Re: Building JOGAMP with pre-built GlueGen

utgarda
Sorry I didn't completely get the meaning of gluegen(-rt).jar , the first time I thought that running ant tasks with GlueGen is sorta it's "runtime". Now it's ok, I finally got it.

Good news - a really cool new feature is available in Ant since 1.8.0 - includes are possible directly from jarfiles, prooflink: http://ant.apache.org/manual/Tasks/include.html

Is cpptasks.jar used while building JOGL? If yes, can I have sources of the patched version? If no, then it was just a mistake of mine, no need to pull it from anywhere :)

Michael Bien wrote
I would recommend to concentrate at the actual artefacts
(gluegen-rt.jar). Thats what most people want... just be able to add the
dependency and start coding.
Yep, gluegen-rt.jar is already deployed ( see above ), it's available at oss.sonatype.org. As soon as put in those jarred javadocs and sources for the main artifact and some stable version ( non-beta ) becomes available, it can go to central maven repo.

Now I'm working on JOGL deployment.
12