Build Spring Roo / Export maven project with Eclipse Export -> Runnable JAR file -


i have maven project created spring roo in sts 2.5.1.release (it eclipse 3.6.1 + spring tools + m2eclipse). have second simple java project on build path. working ok within eclipse.

now problem build. cannot maven, because requires referenced project maven project. referenced project use eclipse export -> runnable jar file export , generate ant file next build.

doing first project, runtime error, though meta-inf/spring/applicationcontext.xml both .jar , in folder next .jar

2011-02-19 13:58:39,135-org.springframework.beans.factory.xml.xmlbeandefinitionreader - loading xml bean definitions class path resource [meta-inf/spring/applicationcontext.xml] 2011-02-19 13:58:39,405-org.springframework.core.io.support.pathmatchingresourcepatternresolver - cannot search matching files underneath url [rsrc:com/company/test/] because not correspond directory in file system java.io.filenotfoundexception: url [rsrc:com/company/test/] cannot resolved absolute file path because not reside in file system: rsrc:com/company/test/     @ org.springframework.util.resourceutils.getfile(resourceutils.java:204) 

referenced project under heavy development, , cannot move, refactor or change nature. maven project spring roo parallel version developed.

how build maven project included eclipse project?

example. project /rooinheritancemaven has project /rooinheritancejava on (eclipse) build path.

.classpath

<?xml version="1.0" encoding="utf-8"?> <classpath>     <classpathentry kind="src" output="target/classes" path="src/main/java"/>     <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>     <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>     <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>     <classpathentry kind="con" path="org.eclipse.jdt.launching.jre_container/org.eclipse.jdt.internal.debug.ui.launcher.standardvmtype/javase-1.6"/>     <classpathentry kind="con" path="org.maven.ide.eclipse.maven2_classpath_container"/>     <classpathentry combineaccessrules="false" kind="src" path="/rooinheritancejava"/>     <classpathentry kind="output" path="target/classes"/> </classpath> 

it incompatibility between eclipse export executable jar , spring. more exact

org.springframework.core.io.support.pathmatchingresourcepatternresolver 

similar provlem before. see

#spr-3815 classloader problem - spring projects issue tracker

try

jar -tf personapp.jar >personapp.jar.txt 

the solution extract .classes , stuff jar folder

jar xf personapp.jar 

and run as

set classpath=d:\temp\kdf.mssql\antlr-2.7.6.jar;d:\temp\kdf.mssql\aopalliance-1.0.jar; <... jar dependecies listed> java com/company/personapp 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -