You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "David Durham, Jr." <da...@gmail.com> on 2007/05/26 04:54:40 UTC

eclipse struts2 projects "missing java project struts2-core"

Hi,

I checked out the struts2 trunk from svn and imported the struts
projects via import projects.  I see a list of projects: api, core,
struts2-codebehind-plugin, ...  I have an M2_REPO variable setup.
core and api build without errors, but all of the plugin projects fail
to build because they're missing the dependency project struts2-core.
What's the recommended procedure for setting up the plugin projects,
and the core and api for that matter.  I'm trying to follow these
documents:

http://struts.apache.org/2.x/docs/building-the-framework-from-source.html
http://struts.apache.org/2.x/docs/building-with-maven.html

Thanks,

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: eclipse struts2 projects "missing java project struts2-core"

Posted by James Mitchell <jm...@gmail.com>.
Sorry, I am jumping in late here.

Here's what I do:
  $mvn eclipse:eclipse -Pall,xwork -Dwtpversion=1.0 - 
DdownloadSources=true

This generates all the necessary eclipse configuration needed to  
bring in the projects into Eclipse.  Now, there Eclipse doesn't run  
the apt tool, so you'll have to build all of struts 2 with maven  
first (unless you like seeing errors all over the place for missing  
resources)

  $mvn clean install -Pall


Sometimes this fails if s2 depends on an XWork snapshot that hasn't  
been pushed out to the public repo.  In those cases, I just cd to  
xwork, and mvn clean install, then cd back to s2 and do it over

Let me know if this dosn't work for you.





Here's my run:


[jmitchell@MBP17 ~/svn/struts/struts2]$ mvn clean install -Pall
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   Struts 2
[INFO]   Struts 2 Core
[INFO]   Struts 2 API
[INFO]   Struts Plugins
[INFO]   Struts 2 Codebehind Plugin
[INFO]   Struts 2 Configuration Browser Plugin
[INFO]   Struts 2 Jasper Reports Plugin
[INFO]   Struts 2 JFreeChart Plugin
[INFO]   Struts 2 JSF Plugin
[INFO]   Struts 2 Pell Multipart Plugin
[INFO]   Struts 2 Plexus Plugin
[INFO]   Struts 2 Sitegraph Plugin
[INFO]   Struts 2 Sitemesh Plugin
[INFO]   Struts 2 Spring Plugin
[INFO]   Struts 2 Struts 1 Plugin
[INFO]   Struts 2 Tiles Plugin
[INFO]   Struts2 Dojo Plugin
[INFO]   Webapps
[INFO]   Blank Webapp
[INFO]   Starter Webapp
[INFO]   Portlet Webapp
[INFO]   Showcase Webapp
[INFO]  
------------------------------------------------------------------------ 
----
[INFO] Building Struts 2
[INFO]    task-segment: [clean, install]
[INFO]  
------------------------------------------------------------------------ 
----
[INFO] [clean:clean]
[INFO] Deleting directory /Users/jmitchell/svn/struts/struts2/target
[INFO] Deleting directory /Users/jmitchell/svn/struts/struts2/target/ 
classes

...
...
<big-ass-snip/>
...
...

[INFO] Compiling 109 source files to /Users/jmitchell/svn/struts/ 
struts2/apps/showcase/target/classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Exploding webapp...
[INFO] Assembling webapp struts2-showcase in /Users/jmitchell/svn/ 
struts/struts2/apps/showcase/target/struts2-showcase
[INFO] Copy webapp webResources to /Users/jmitchell/svn/struts/ 
struts2/apps/showcase/target/struts2-showcase
[INFO] Generating war /Users/jmitchell/svn/struts/struts2/apps/ 
showcase/target/struts2-showcase.war
[INFO] Building war: /Users/jmitchell/svn/struts/struts2/apps/ 
showcase/target/struts2-showcase.war
[INFO] [install:install]
[INFO] Installing /Users/jmitchell/svn/struts/struts2/apps/showcase/ 
target/struts2-showcase.war to /Users/jmitchell/.m2/repository/org/ 
apache/struts/struts2-showcase/2.1.0-SNAPSHOT/struts2-showcase-2.1.0- 
SNAPSHOT.war
[INFO]
[INFO]
[INFO]  
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]  
------------------------------------------------------------------------
[INFO] Struts 2 ..............................................  
SUCCESS [2.511s]
[INFO] Struts 2 Core .........................................  
SUCCESS [1:25.632s]
[INFO] Struts 2 API ..........................................  
SUCCESS [3.357s]
[INFO] Struts Plugins ........................................  
SUCCESS [0.044s]
[INFO] Struts 2 Codebehind Plugin ............................  
SUCCESS [4.051s]
[INFO] Struts 2 Configuration Browser Plugin .................  
SUCCESS [1.104s]
[INFO] Struts 2 Jasper Reports Plugin ........................  
SUCCESS [3.964s]
[INFO] Struts 2 JFreeChart Plugin ............................  
SUCCESS [4.902s]
[INFO] Struts 2 JSF Plugin ...................................  
SUCCESS [0.445s]
[INFO] Struts 2 Pell Multipart Plugin ........................  
SUCCESS [0.339s]
[INFO] Struts 2 Plexus Plugin ................................  
SUCCESS [5.872s]
[INFO] Struts 2 Sitegraph Plugin .............................  
SUCCESS [2.223s]
[INFO] Struts 2 Sitemesh Plugin ..............................  
SUCCESS [0.497s]
[INFO] Struts 2 Spring Plugin ................................  
SUCCESS [1.662s]
[INFO] Struts 2 Struts 1 Plugin ..............................  
SUCCESS [2.103s]
[INFO] Struts 2 Tiles Plugin .................................  
SUCCESS [0.805s]
[INFO] Struts2 Dojo Plugin ...................................  
SUCCESS [18.838s]
[INFO] Webapps ...............................................  
SUCCESS [0.523s]
[INFO] Blank Webapp ..........................................  
SUCCESS [3.535s]
[INFO] Starter Webapp ........................................  
SUCCESS [1.726s]
[INFO] Portlet Webapp ........................................  
SUCCESS [1.955s]
[INFO] Showcase Webapp .......................................  
SUCCESS [9.593s]
[INFO]  
------------------------------------------------------------------------
[INFO]  
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]  
------------------------------------------------------------------------
[INFO] Total time: 2 minutes 37 seconds
[INFO] Finished at: Sat May 26 19:40:43 EDT 2007
[INFO] Final Memory: 18M/42M
[INFO]  
------------------------------------------------------------------------
[jmitchell@MBP17 ~/svn/struts/struts2]$



--
James Mitchell



On May 26, 2007, at 1:58 PM, David Durham, Jr. wrote:

> On 5/26/07, Musachy Barroso <mu...@gmail.com> wrote:
>> There's probably an easier way, but I just create the elipse  
>> project for the
>> project I want to use, like let's say, core and showcase, doing:
>>
>> core/
>> mvn eclipse:eclipse
>>
>> apps/showcase/
>> mvn eclipse:eclipse -Dwtpversion=1.0
>>
>> and then import the projects, if you do it like that, you need to  
>> compile
>> core with maven because the reference in the showcase project will be
>> pointing to the M2_REPO folder. To compile core(configure it to  
>> run as an
>> external tool):
>
> That works for the showcase app.  Wondering why the mvn
> eclipse:eclipse goal will build the plugin projects' eclipse metadata
> with a project dependency of struts2-core instead of core?  Does this
> have something to do with an assumption that you would have
> struts1-core in the same workspace?
>
> Sounds like reasonable fixes are: 1) change project dependency from
> struts2-core to core or 2) change to M2_REPO dependency instead of
> project dependency and use mvn build.
>
> 1) Worked for me.
>
> 2) M2_REPO dependency is implied, at this point.
>
> https://issues.apache.org/struts/browse/WW-1947
>
>> core/
>> mvn -Dmaven.test.skip=true install
>>
>> I think there is a way to have maven generate the projects with the
>> references between them for eclipse, but I'm not sure how, we can  
>> put it on
>> the wiki if someone replies :)
>
> Would like to have some more info about how you setup the maven build.
> I couldn't get this plugin <url: http://m2eclipse.codehaus.org/> to
> play nice.  Nor was I successfully able to add a "Program" builder to
> my project.
>
> -Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: eclipse struts2 projects "missing java project struts2-core"

Posted by "David Durham, Jr." <da...@gmail.com>.
On 5/26/07, Musachy Barroso <mu...@gmail.com> wrote:
> There's probably an easier way, but I just create the elipse project for the
> project I want to use, like let's say, core and showcase, doing:
>
> core/
> mvn eclipse:eclipse
>
> apps/showcase/
> mvn eclipse:eclipse -Dwtpversion=1.0
>
> and then import the projects, if you do it like that, you need to compile
> core with maven because the reference in the showcase project will be
> pointing to the M2_REPO folder. To compile core(configure it to run as an
> external tool):

That works for the showcase app.  Wondering why the mvn
eclipse:eclipse goal will build the plugin projects' eclipse metadata
with a project dependency of struts2-core instead of core?  Does this
have something to do with an assumption that you would have
struts1-core in the same workspace?

Sounds like reasonable fixes are: 1) change project dependency from
struts2-core to core or 2) change to M2_REPO dependency instead of
project dependency and use mvn build.

1) Worked for me.

2) M2_REPO dependency is implied, at this point.

https://issues.apache.org/struts/browse/WW-1947

> core/
> mvn -Dmaven.test.skip=true install
>
> I think there is a way to have maven generate the projects with the
> references between them for eclipse, but I'm not sure how, we can put it on
> the wiki if someone replies :)

Would like to have some more info about how you setup the maven build.
 I couldn't get this plugin <url: http://m2eclipse.codehaus.org/> to
play nice.  Nor was I successfully able to add a "Program" builder to
my project.

-Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: eclipse struts2 projects "missing java project struts2-core"

Posted by Musachy Barroso <mu...@gmail.com>.
There's probably an easier way, but I just create the elipse project for the
project I want to use, like let's say, core and showcase, doing:

core/
mvn eclipse:eclipse

apps/showcase/
mvn eclipse:eclipse -Dwtpversion=1.0

and then import the projects, if you do it like that, you need to compile
core with maven because the reference in the showcase project will be
pointing to the M2_REPO folder. To compile core(configure it to run as an
external tool):

core/
mvn -Dmaven.test.skip=true install

I think there is a way to have maven generate the projects with the
references between them for eclipse, but I'm not sure how, we can put it on
the wiki if someone replies :)

musachy

On 5/25/07, David Durham, Jr. <da...@gmail.com> wrote:
>
> Hi,
>
> I checked out the struts2 trunk from svn and imported the struts
> projects via import projects.  I see a list of projects: api, core,
> struts2-codebehind-plugin, ...  I have an M2_REPO variable setup.
> core and api build without errors, but all of the plugin projects fail
> to build because they're missing the dependency project struts2-core.
> What's the recommended procedure for setting up the plugin projects,
> and the core and api for that matter.  I'm trying to follow these
> documents:
>
> http://struts.apache.org/2.x/docs/building-the-framework-from-source.html
> http://struts.apache.org/2.x/docs/building-with-maven.html
>
> Thanks,
>
> Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd