New module and other maven issues

View: New views
2 Messages — Rating Filter:   Alert me  

New module and other maven issues

by Francesco Vivoli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

All

I'm about to commit a major project refactoring.
Basically I've splitted the module atalaya-web in two:

-atalaya-web now only contains the web application
-atalaya-core contains the business logic

Even though the atalaya-core will be subject to further
segmentation, at least this allows to keep the web
tier separated from the business one.

There are a couple of things that need to be solved,
and they relate mostly with maven.

1)atalaya-web test suite relies on a class,
org.atalaya.isec.dashb.ObjectMother, that is now
defined in atalaya-core. Generally speaking it
would be good to define an atalaya-core-mocks
artifact, packaged from atalaya-core test files
and add it as a dependency to atalaya-web.

2)After having added jasper reports (and its maven plugin)
when doing
mvn clean package
from the parent directory, produces this error

----------

[INFO] ------------------------------------------------------------------------
[INFO] Building atalaya-web
[INFO]    task-segment: [clean, package]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory
/Users/villo/Documents/projects/atalaya/trunk/atalaya-web/target
[INFO] Deleting directory
/Users/villo/Documents/projects/atalaya/trunk/atalaya-web/target/classes
[INFO] Deleting directory
/Users/villo/Documents/projects/atalaya/trunk/atalaya-web/target/test-classes
[INFO] Deleting directory
/Users/villo/Documents/projects/atalaya/trunk/atalaya-web/target/site
[INFO] [buildnumber:create {execution: default}]
[INFO] Checking for local modifications: skipped.
[INFO] Updating project files from SCM: skipped.
[INFO] Storing buildNumber: 851 at timestamp: 1205425779126
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
Compiling 72 source files to
/Users/villo/Documents/projects/atalaya/trunk/atalaya-web/target/classes
[INFO] [jasperreports:compile-reports {execution: default}]
[INFO] Compiling 3 report design files.
[INFO] Compiling report file: ApplianceHeader.jrxml
[INFO] Compiling report file: HostPerAppliance.jrxml
[INFO] Compiling report file: ScanReport.jrxml
[INFO] Compiled 3 report design files.
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Not compiling test sources
[INFO] [surefire:test]
[INFO] Tests are skipped.
[INFO] [war:war]
[INFO] Exploding webapp...
[INFO] Assembling webapp atalaya-web in
/Users/villo/Documents/projects/atalaya/trunk/atalaya-web/target/atalaya-web-0.8-SNAPSHOT
[INFO] Copy webapp webResources to
/Users/villo/Documents/projects/atalaya/trunk/atalaya-web/target/atalaya-web-0.8-SNAPSHOT
[INFO] Copy webapp webResources to
/Users/villo/Documents/projects/atalaya/trunk/atalaya-web/target/atalaya-web-0.8-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] basedir src/main/reports does not exist
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.IllegalStateException: basedir src/main/reports does not exist
        at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:542)
        at org.apache.maven.plugin.war.AbstractWarMojo.getWarFiles(AbstractWarMojo.java:824)
        at org.apache.maven.plugin.war.AbstractWarMojo.copyResources(AbstractWarMojo.java:408)
        at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:518)
        at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:347)
        at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:164)
        at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:130)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27 seconds
[INFO] Finished at: Thu Mar 13 17:29:47 CET 2008
[INFO] Final Memory: 19M/36M
[INFO] ------------------------------------------------------------------------

-----

the same command from atalaya-web instead completes succesfully.

3)Regarding the jasper reports plugin also, it is currently not possible to
use them when running the webapp from jetty:run. I've posted to the
jetty mailing list here
http://www.nabble.com/Using-jetty%3Arun-with-multiple-webapp-directories--td16012007.html

beside this it seems that the new structure works, let me know if something
has screwed up that I didn't notice.

cheers
F

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Atalaya-developer mailing list
Atalaya-developer@...
https://lists.sourceforge.net/lists/listinfo/atalaya-developer

Re: New module and other maven issues

by Roman Kalyakin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,


On Thu, Mar 13, 2008 at 5:33 PM, Francesco Vivoli <f.vivoli@...> wrote:
All

I'm about to commit a major project refactoring.
Basically I've splitted the module atalaya-web in two:

-atalaya-web now only contains the web application
-atalaya-core contains the business logic

Cool!
 

1)atalaya-web test suite relies on a class,
org.atalaya.isec.dashb.ObjectMother, that is now
defined in atalaya-core. Generally speaking it
would be good to define an atalaya-core-mocks
artifact, packaged from atalaya-core test files
and add it as a dependency to atalaya-web.

Yes. I think having an atalaya-mock  package is a good idea. We could also think about simplifying of objects construction there. For example using spring IoC...


2)After having added jasper reports (and its maven plugin)
when doing
mvn clean package
from the parent directory, produces this error

I'll try to look into it ASAP.


Cheers,
Roman

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Atalaya-developer mailing list
Atalaya-developer@...
https://lists.sourceforge.net/lists/listinfo/atalaya-developer