Author: scabanovich
Date: 2010-12-22 06:29:49 -0500 (Wed, 22 Dec 2010)
New Revision: 27658
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.classpath
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.project
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.settings/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.settings/org.eclipse.jdt.core.prefs
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.settings/org.jboss.tools.seam.core.prefs
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/bin/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/lib/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/lib/jboss-seam.1
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/src/
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ComponentsFromLibTest.java
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java
Log:
JBIDE-7931
https://issues.jboss.org/browse/JBIDE-7931
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.classpath
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.classpath
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.classpath 2010-12-22
11:29:49 UTC (rev 27658)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="lib" path="lib/jboss-seam.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.project
(rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.project 2010-12-22
11:29:49 UTC (rev 27658)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>SeamJava</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.seam.core.seambuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.jboss.tools.seam.core.seamnature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.settings/org.eclipse.jdt.core.prefs 2010-12-22
11:29:49 UTC (rev 27658)
@@ -0,0 +1,12 @@
+#Wed Dec 22 11:57:22 MSK 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.settings/org.jboss.tools.seam.core.prefs
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.settings/org.jboss.tools.seam.core.prefs
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.settings/org.jboss.tools.seam.core.prefs 2010-12-22
11:29:49 UTC (rev 27658)
@@ -0,0 +1,16 @@
+#Wed Dec 22 12:36:37 MSK 2010
+action.package=org.domain.seamjava.session
+action.sources=/SeamJava/src
+eclipse.preferences.version=1
+model.package=org.domain.seamjava.entity
+model.sources=/SeamJava/src
+seam.ejb.project=SeamJava
+seam.project.deployment.type=war
+seam.project.settings.version=1.1
+seam.project.web.root.folder=/SeamJava
+seam.runtime.name=
+seam.settings.changed.by.user=true
+seam.test.creating=false
+seam.test.project=SeamJava
+test.package=org.domain.seamjava.test
+test.sources=/SeamJava/src
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.settings/org.jboss.tools.seam.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/lib/jboss-seam.1
===================================================================
(Binary files differ)
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/lib/jboss-seam.1
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ComponentsFromLibTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ComponentsFromLibTest.java
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ComponentsFromLibTest.java 2010-12-22
11:29:49 UTC (rev 27658)
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.core.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.seam.core.ISeamProject;
+import org.jboss.tools.seam.internal.core.SeamProject;
+import org.jboss.tools.test.util.JUnitUtils;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
+
+/**
+ * Test that Seam builder works for projects that set cyclic dependency in build paths.
+
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class ComponentsFromLibTest extends TestCase {
+ static String BUNDLE = "org.jboss.tools.seam.core.test";
+ IProject project1;
+ TestProjectProvider provider1;
+
+ protected void setUp() throws Exception {
+ provider1 = new TestProjectProvider(BUNDLE,"/projects/SeamJava" ,
"SeamJava", true);
+ project1 = provider1.getProject();
+
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ JobUtils.waitForIdle();
+
+ IFile source = project1.getFile(new Path("lib/jboss-seam.1"));
+ IFile target = project1.getFile(new Path("lib/jboss-seam.jar"));
+
+ target.create(source.getContents(), IResource.FORCE, new NullProgressMonitor());
+
+ //To ensure that the project is built.
+ project1.build(IncrementalProjectBuilder.CLEAN_BUILD, new NullProgressMonitor());
+ JobUtils.waitForIdle();
+
+ project1.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ JobUtils.waitForIdle();
+
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+ }
+
+ public void testComponentsFromLib() {
+ ISeamProject sp1 = getSeamProject1();
+
+ String component = "org.jboss.seam.core.conversation";
+ assertNotNull("Bean " + component + " is not found in project
CycleTest1", sp1.getComponent(component));
+
+ }
+
+
+ private ISeamProject getSeamProject1() {
+ ISeamProject seamProject = null;
+ try {
+ seamProject = (ISeamProject)project1.getNature(SeamProject.NATURE_ID);
+ } catch (Exception e) {
+ JUnitUtils.fail("Cannot get seam nature.",e);
+ }
+ assertNotNull("Seam project is null", seamProject);
+ return seamProject;
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ ISeamProject sp1 = getSeamProject1();
+ SeamProject impl1 = (SeamProject)sp1;
+ if(impl1 != null) impl1.clearStorage();
+
+ JobUtils.waitForIdle();
+ provider1.dispose();
+ }
+
+}
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ComponentsFromLibTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java 2010-12-22
11:25:11 UTC (rev 27657)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java 2010-12-22
11:29:49 UTC (rev 27658)
@@ -42,6 +42,7 @@
suite.addTestSuite(SeamRuntimeListConverterTest.class);
suite.addTestSuite(SeamRuntimeManagerTest.class);
suite.addTestSuite(CyclicDependingProjectsTest.class);
+ suite.addTestSuite(ComponentsFromLibTest.class);
return suite;
}
}
\ No newline at end of file