[forge-dev] error in forge-shell-api

Lincoln Baxter, III lincolnbaxter at gmail.com
Tue Aug 28 11:17:20 EDT 2012


Yeah :( We definitely need to improve our test harness and environment.
With your suggestion of adding the maven-enforcer-plugin, I think that will
be a good step.

Also with separating out all plugins into separate plugins/modules, that
will make the build go MUCH faster.

~Lincoln

On Mon, Aug 27, 2012 at 5:16 PM, JFlower <fiorenzino at gmail.com> wrote:

> Hi George,
>
> i solved my problems!
> If i launch mvn out of eclipse (in a shell), all works correctly, in
> eclipse not.
>
> The time taken to solve the problems of compilation, however, served to
> know a little more about the architecture of forge.
> I still believe it is possible to improve the test suite to make the test
> easier (as I suggested in a previous email).
>
> Tomorrow I can go back to writing code ..
>
> Fiorenzo
>
> 2012/8/27 <ggastald at redhat.com>
>
>  Fiorenzio,
>>
>> I also had these test errors, however, when I cleaned my maven repo and
>> started the build all over again, these errors were misteriously gone. I
>> believe that maybe the keyboard is still being listened, so, try run all
>> these tests in an isolated machine, I mean, don't type anything on it and
>> see if that works.
>>
>> Best Regards,
>>
>> George Gastaldi
>>
>> PS: I have already created an issue about this:
>> https://issues.jboss.org/browse/FORGE-658, however I closed because I
>> couldn't reproduce it anymore.
>>
>> I'd say: follow these procedures with the master branch and see if that
>> works for you.
>>
>>
>> On 08/26/2012 05:45 PM, JFlower wrote:
>>
>> Hi,
>>
>>  to solve my problems compiling the forge project, i started a big
>> fighting with forge code ( 1.0.7-SNAPSHOT)...
>>
>>  1) i created a new VirtualBox machine with:
>> - 8 giga ram
>> - ubuntu 12.04,
>> - java version "1.6.0_34"- Java(TM) SE Runtime Environment (build
>> 1.6.0_34-b04) - Java HotSpot(TM) 64-Bit Server VM (build 20.9-b04, mixed
>> mode)
>> - Apache Maven 3.0.4
>> - Default locale: it_IT, platform encoding: UTF-8 - OS name: "linux",
>> version: "3.2.0-29-generic", arch: "amd64", family: "unix"
>> 2) i removed my nexus proxy, i used jboss/maven repository.
>>
>>  In this neutral situation, the forge source code compiles correctly,
>> but some test classes don't work well.
>> But not for jvm, or dependencies questions,i think we have some misuse of
>> queueInputLines method with getShell().execute(...) .
>>
>>  The runtime error is always the same, in org.jboss.forge.test.*
>> QueuedInputStream*, in the method requireCurrent():
>> *throw new EndOfStreamException("End of stream: No more queued input.");*
>> --------------------------------------------------------------
>> *For example in the mdule forge-scaffold-faces, *in the class
>> org.jboss.forge.scaffold.faces.*FacesScaffoldTest, *we need to modify
>> the code as shown below:
>>
>>  *- in AbstractFacesScaffoldTest i added this method, **that **i copied
>> from jpa plugin tests:*
>>  @Before
>>  @Override
>>  public void beforeTest() throws Exception {
>>  super.beforeTest();
>>  initializeJavaProject();
>>  if ((getProject() != null)
>>  && !getProject().hasFacet(PersistenceFacet.class)) {
>>  queueInputLines("");
>>  *getShell().execute("project install-facet forge.spec.jpa");*
>>  }
>>  }
>>
>>  *and i changed setupScaffoldProject: *
>>  protected Project setupScaffoldProject() throws Exception {
>>  // Project project = initializeJavaProject();
>>  // queueInputLines("HIBERNATE", "JBOSS_AS7", "", "");
>>  // getShell().execute("persistence setup");
>>  *queueInputLines("");*
>> * getShell().execute(*
>> * "persistence setup --provider HIBERNATE --container JBOSS_AS7");*
>>  queueInputLines("", "", "", "");
>>  getShell().execute("scaffold setup");
>>  // return project;
>>  return getShell().getCurrentProject();
>>  }
>> * also i changed setupScaffoldProject*t*(String targetDir) : *
>>  protected Project setupScaffoldProject(String targetDir) throws
>> Exception {
>> // Project project = initializeJavaProject();
>>  // queueInputLines("HIBERNATE", "JBOSS_AS7", "", "");
>>  // getShell().execute("persistence setup");
>>  queueInputLines("");
>>  getShell().execute(
>>  "persistence setup --provider HIBERNATE --container JBOSS_AS7");
>>  queueInputLines("", "", "");
>>  getShell().execute("scaffold setup --targetDir " + targetDir);
>> // return project;
>>  return getShell().getCurrentProject();
>>  }
>>
>>  Tomorrow I will open some jira bugs divided by projects, and i will
>> sent some pull request.
>>
>>  bye
>>
>>  Fiorenzo
>>
>>  PS my final maven result:
>>
>>  [INFO] Executed tasks
>> [INFO]
>> [INFO] --- maven-assembly-plugin:2.2-beta-5:single (distribution) @
>> forge-distribution ---
>> [INFO] Reading assembly descriptor: src/main/assembly/assembly.xml
>> [INFO] Building zip:
>> /home/fiorenzo/git/core/dist/target/forge-distribution-1.0.7-SNAPSHOT.zip
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Reactor Summary:
>> [INFO]
>> [INFO] Forge - Parent .................................... SUCCESS
>> [0.911s]
>> [INFO] Forge - Targeted Event Bus ........................ SUCCESS
>> [10.226s]
>> [INFO] Forge - Parser/Java API ........................... SUCCESS
>> [6.250s]
>> [INFO] Forge - Parser/XML ................................ SUCCESS
>> [6.214s]
>> [INFO] Forge - Shell API ................................. SUCCESS
>> [5.173s]
>> [INFO] Forge - Maven Integration APIs .................... SUCCESS
>> [4.477s]
>> [INFO] Forge - Git Integration ........................... SUCCESS
>> [3.130s]
>> [INFO] Forge - Test Harness .............................. SUCCESS
>> [3.348s]
>> [INFO] Forge - Maven Project Model ....................... SUCCESS
>> [3.189s]
>> [INFO] Forge - Parser/Java ............................... SUCCESS
>> [9.231s]
>> [INFO] Forge - Shell ..................................... SUCCESS
>> [2:17.367s]
>> [INFO] Forge - Git Integration Tests ..................... SUCCESS
>> [1:31.125s]
>> [INFO] Forge - Project Model Maven Tests ................. SUCCESS
>> [9:48.275s]
>> [INFO] Forge - Test Harness (Web) ........................ SUCCESS
>> [2.627s]
>> [INFO] Forge - Java EE APIs .............................. SUCCESS
>> [3.304s]
>> [INFO] Forge - Java EE Integration Impl & Plugins ........ SUCCESS
>> [5:18.033s]
>> [INFO] Forge - Scaffolding APIs .......................... SUCCESS
>> [3.828s]
>> [INFO] Forge - Scaffolding Plugins ....................... SUCCESS
>> [55.593s]
>> [INFO] Forge - Dev Plugins ............................... SUCCESS
>> [3:59.455s]
>> [INFO] Forge - Scaffold Provider for Java Server Faces ... SUCCESS
>> [2:08.892s]
>> [INFO] Forge - Modular Plugin Loader ..................... SUCCESS
>> [6.214s]
>> [INFO] JBoss Forge - Distribution Build .................. SUCCESS
>> [9.518s]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESS
>> [INFO]
>> ------------------------------------------------------------------------
>> *[INFO] Total time: 14:19.018s (Wall Clock)*
>> [INFO] Finished at: Sun Aug 26 21:15:28 CEST 2012
>> [INFO] Final Memory: 90M/755M
>>
>>
>>
>>
>> 2012/8/25 George Gastaldi <ggastald at redhat.com>
>>
>>>  Wonderful idea. I am filling a jira for it
>>>
>>> Em 24/08/2012, às 20:46, Dan Allen <dan.j.allen at gmail.com> escreveu:
>>>
>>>   George and others,
>>>
>>>  It sounds like the Forge build could use some validations to ensure
>>> the person building the project has an environment that matches the minimum
>>> requirements. Obviously, you want as few validations as possible (to make
>>> it more portable) but you can work to eliminate them once you know what
>>> they are.
>>>
>>>  http://maven.apache.org/plugins/maven-enforcer-plugin/
>>>
>>>  Also, newer versions of Maven are suppose to be able to differentiate
>>> between origins of dependencies in the local repository, so we should
>>> probably be looking closer at the cases when we tell users to clean it out.
>>>
>>>  Just some suggestions.
>>>
>>>  -Dan
>>>
>>> On Fri, Aug 24, 2012 at 8:58 AM, George Gastaldi <ggastald at redhat.com>wrote:
>>>
>>>>  Try upgrading your JDK 6 to the latest build
>>>>
>>>> Em 24/08/2012, às 09:43, JFlower <fiorenzino at gmail.com> escreveu:
>>>>
>>>>   Hi,
>>>>
>>>>  i have this error with mvn clean package
>>>>
>>>>  [ERROR] Failed to execute goal
>>>> org.apache.maven.plugins:maven-compiler-plugin:2.3.1:compile
>>>> (default-compile) on project forge-shell-api: Compilation failure
>>>> *[ERROR]
>>>> /home/fiorenzo/git/core/shell-api/src/main/java/org/jboss/forge/shell/util/ResourceUtil.java:[111,23]
>>>> invalid inferred types for R; inferred type does not conform to declared
>>>> bound(s)*
>>>> *[ERROR] inferred: java.util.Collection<E>*
>>>> *[ERROR] bound(s):
>>>> java.util.Collection<org.jboss.forge.resources.Resource<?>>*
>>>> *[ERROR] -> [Help 1]*
>>>> [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/MojoFailureException
>>>> [ERROR]
>>>> [ERROR] After correcting the problems, you can resume the build with
>>>> the command
>>>> [ERROR]   mvn <goals> -rf :forge-shell-api
>>>>
>>>>
>>>>  [ubuntu 12.04 - Apache Maven 3.0.4 - Java version: 1.6.0_24, vendor:
>>>> Sun Microsystems Inc. Java home:
>>>> /usr/lib/jvm/java-6-openjdk-amd64/jre Default locale: it_IT, platform
>>>> encoding: UTF-8 OS name: "linux", version: "3.2.0-29-generic", arch:
>>>> "amd64", family: "unix"]
>>>>
>>>>  Any help on this?
>>>>
>>>>  Fiorenzo
>>>>
>>>>   _______________________________________________
>>>> forge-dev mailing list
>>>> forge-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>>>
>>>>
>>>> _______________________________________________
>>>> forge-dev mailing list
>>>> forge-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>>>
>>>>
>>>
>>>
>>>  --
>>> Dan Allen
>>> Principal Software Engineer, Red Hat | Author of Seam in Action
>>> Registered Linux User #231597
>>>
>>> http://google.com/profiles/dan.j.allen
>>> http://mojavelinux.com
>>> http://mojavelinux.com/seaminaction
>>>
>>>   _______________________________________________
>>> forge-dev mailing list
>>> forge-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>>
>>>
>>> _______________________________________________
>>> forge-dev mailing list
>>> forge-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>>
>>>
>>
>>
>> _______________________________________________
>> forge-dev mailing listforge-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/forge-dev
>>
>>
>> --
>> *George Gastaldi* | *Senior Software Engineer*
>> JBoss Forge Team
>> Red Hat
>>
>> _______________________________________________
>> forge-dev mailing list
>> forge-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/forge-dev
>>
>>
>
> _______________________________________________
> forge-dev mailing list
> forge-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/forge-dev
>
>


-- 
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20120828/fd5464d8/attachment-0001.html 


More information about the forge-dev mailing list