Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Commit

Permalink
JBSEAM-5108 refactored seam-gen required runtime libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
mareknovotny committed May 28, 2013
1 parent e29af5c commit 8029196
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 80 deletions.
2 changes: 1 addition & 1 deletion distribution/pom.xml
Expand Up @@ -262,6 +262,6 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-components-ui</artifactId>
</dependency>
</dependency>
</dependencies>
</project>
44 changes: 3 additions & 41 deletions distribution/src/main/assembly/dist.xml
Expand Up @@ -5,7 +5,6 @@

<id>dist</id>
<formats>
<!-- <format>dir</format> -->
<format>zip</format>
<format>tar.gz</format>
</formats>
Expand Down Expand Up @@ -104,10 +103,7 @@
<useStrictFiltering>true</useStrictFiltering>
<includes>
<include>org.jboss.seam:*:*:sources</include>
</includes>
<excludes>
<exclude>org.jboss.seam:jboss-seam-gen:*:sources</exclude>
</excludes>
</includes>
<outputFileNameMapping>${artifact.artifactId}-sources.${artifact.extension}</outputFileNameMapping>
</dependencySet>

Expand All @@ -119,6 +115,7 @@
<includes>
<include>org.jboss.seam:jboss-seam:ejb</include>
<include>org.jboss.seam:jboss-seam-debug:jar</include>
<include>org.jboss.seam:jboss-seam-gen:jar</include>
<include>org.jboss.seam:jboss-seam-ui:jar</include>
<include>org.jboss.seam:jboss-seam-excel:jar</include>
<include>org.jboss.seam:jboss-seam-pdf:jar</include>
Expand Down Expand Up @@ -153,41 +150,6 @@
</includes>
<outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
</dependencySet>

<!-- Seam gen -->
<dependencySet>
<outputDirectory>lib/gen</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
<useStrictFiltering>true</useStrictFiltering>
<useTransitiveDependencies>true</useTransitiveDependencies>
<includes>
<include>org.jboss.seam:jboss-seam-gen:jar</include>
<include>org.hibernate:hibernate-tools:jar</include>
<include>org.beanshell:bsh:jar</include>
<include>org.hibernate:jtidy:jar</include>
<include>freemarker:freemarker:jar</include>
<include>org.eclipse.jdt:core:jar</include>
<include>org.eclipse.core:runtime:jar</include>
<include>org.eclipse.equinox:common:jar</include>
<include>org.eclipse:text:jar</include>
<include>org.apache.ant:ant:jar</include>
<include>org.apache.ant:ant-launcher:jar</include>
<include>org.apache.ant:ant-nodeps:jar</include>
</includes>
<excludes>
<exclude>org.jboss.seam:jboss-seam-gen:jar:sources</exclude>
</excludes>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
</dependencySet>

<dependencySet>
<outputDirectory>lib/gen/src</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
<includes>
<include>org.jboss.seam:jboss-seam-gen:*:sources</include>
</includes>
<outputFileNameMapping>${artifact.artifactId}-${artifact.classifier}.${artifact.extension}</outputFileNameMapping>
</dependencySet>

<dependencySet>
<outputDirectory>./seam-gen</outputDirectory>
Expand Down Expand Up @@ -257,4 +219,4 @@
</dependencySet>

</dependencySets>
</assembly>
</assembly>
4 changes: 2 additions & 2 deletions distribution/src/main/assembly/seam
Expand Up @@ -55,7 +55,7 @@ elif $cygwin; then
SEAM_HOME_WINPATH=`cygpath -aw "$SEAM_HOME"`
SEAM_GEN_DIR_WINPATH=`cygpath -aw "$SEAM_GEN_DIR"`
WORKING_DIR_WINPATH=`cygpath -aw "$WORKING_DIR"`
"$JAVA_HOME/bin/java" -cp "$JAVA_HOME_WINPATH\lib\tools.jar;$SEAM_HOME_WINPATH\lib\gen\ant-launcher.jar;$SEAM_HOME_WINPATH\lib\gen\ant-nodeps.jar;$SEAM_HOME_WINPATH\lib\gen\ant.jar" -Dant.home="$SEAM_HOME_WINPATH\lib" org.apache.tools.ant.launch.Launcher -buildfile "$SEAM_GEN_DIR_WINPATH\build.xml" -Dworking.dir="$WORKING_DIR_WINPATH" "$@"
"$JAVA_HOME/bin/java" -cp "$JAVA_HOME_WINPATH\lib\tools.jar;$SEAM_HOME_WINPATH\seam-gen\lib\ant-launcher.jar;$SEAM_HOME_WINPATH\lib\gen\ant-nodeps.jar;$SEAM_HOME_WINPATH\lib\gen\ant.jar" -Dant.home="$SEAM_HOME_WINPATH\lib" org.apache.tools.ant.launch.Launcher -buildfile "$SEAM_GEN_DIR_WINPATH\build.xml" -Dworking.dir="$WORKING_DIR_WINPATH" "$@"
else
"$JAVA_HOME/bin/java" -cp "$JAVA_HOME/lib/tools.jar:$SEAM_HOME/lib/gen/ant-launcher.jar:$SEAM_HOME/lib/gen/ant-nodeps.jar:$SEAM_HOME/lib/gen/ant.jar" -Dant.home="$SEAM_HOME/lib" org.apache.tools.ant.launch.Launcher -buildfile "$SEAM_GEN_DIR/build.xml" -Dworking.dir="$WORKING_DIR" "$@"
"$JAVA_HOME/bin/java" -cp "$JAVA_HOME/lib/tools.jar:$SEAM_HOME/seam-gen/lib/ant-launcher.jar:$SEAM_HOME/seam-gen/lib/ant-nodeps.jar:$SEAM_HOME/seam-gen/lib/ant.jar" -Dant.home="$SEAM_HOME/lib" org.apache.tools.ant.launch.Launcher -buildfile "$SEAM_GEN_DIR/build.xml" -Dworking.dir="$WORKING_DIR" "$@"
fi
8 changes: 0 additions & 8 deletions jboss-seam-gen/dist/README
Expand Up @@ -148,12 +148,4 @@ SEAM CODE GENERATION COMMANDS

Example: seam add-identity-management

add-ivy
Alters an existing project to use Ivy to manage the dependencies. The
command adds Ivy configuration files and a corresponding Ant build file.
The Ant tasks invoke Ivy to download the dependency sets required to
build, test and deploy the application. The step of downloading the
dependencies is kept separate from the build life cycle.

Example: seam add-ivy

2 changes: 1 addition & 1 deletion jboss-seam-gen/dist/build-scripts/build-war.xml
Expand Up @@ -57,7 +57,7 @@

<taskdef name="groovyc"
classname ="org.codehaus.groovy.ant.Groovyc"
classpathref="build.classpath"/> <!-- really only the groovy jar is necessary -->
classpath="${lib.dir}/groovy-all.jar"/>

<mkdir dir="${classes.model.dir}" />
<mkdir dir="${classes.action.dir}" />
Expand Down
6 changes: 3 additions & 3 deletions jboss-seam-gen/dist/build-scripts/build.xml
Expand Up @@ -54,10 +54,10 @@
<import file="${basedir}/glassfish-build.xml"/>

<target name="init" description="Initialize the build">
<taskdef name="groovyc"
<taskdef name="groovyc"
classname ="org.codehaus.groovy.ant.Groovyc"
classpathref="build.classpath"/>
<!-- really only the groovy jar is necessary -->
classpath="${lib.dir}/groovy-all.jar"/>

<mkdir dir="${jar.dir}"/>
<mkdir dir="${ear.dir}"/>
<mkdir dir="${war.dir}"/>
Expand Down
38 changes: 17 additions & 21 deletions jboss-seam-gen/dist/build.xml
Expand Up @@ -41,7 +41,7 @@
<import file="${seam.dir}/build/common.build.xml"/>

<target name="init">
<path id="seam-gen.lib.path" path="${seam.dir}/lib/gen/jboss-seam-gen.jar"/>
<path id="seam-gen.lib.path" path="${seam.dir}/lib/jboss-seam-gen.jar"/>

<taskdef name="normalizeProjectName"
classname="org.jboss.seam.tool.NormalizeProjectNameTask"
Expand Down Expand Up @@ -1519,7 +1519,7 @@
<echo message="Type '${seam.cmd} restart' and go to http://localhost:8080/${project.name}/${masterPage.name}.seam"/>
</target>

<!-- Do not remove generate-entities, netbeans depends on it -->
<!-- Do not remove generate-entities, netbeans depends o n it -->
<target name="generate-entities" depends="generate"/>
<target name="generate" depends="validate-project,generate-model,generate-ui"
description="Reverse engineer entities from the database">
Expand All @@ -1528,37 +1528,33 @@
<target name="init-generate">
<path id="htools.classpath">
<pathelement path="${seam.dir}/lib/ant.jar"/>
<pathelement path="${seam.dir}/lib/gen/hibernate-tools.jar"/>
<pathelement path="${seam.dir}/lib/gen/freemarker.jar"/>
<pathelement path="${seam.dir}/lib/jboss-seam.jar"/>
<pathelement path="${seam.dir}/lib/gen/runtime.jar"/>
<pathelement path="${seam.dir}/lib/gen/common.jar"/>
<pathelement path="${seam.dir}/lib/gen/text.jar"/>
<pathelement path="${seam.dir}/seam-gen/lib/ant-launcher.jar"/>
<pathelement path="${seam.dir}/seam-gen/lib/hibernate-core.jar"/>
<pathelement path="${seam.dir}/seam-gen/lib/hibernate-entitymanager.jar"/>
<pathelement path="${seam.dir}/seam-gen/lib/hibernate-tools.jar"/>
<pathelement path="${seam.dir}/seam-gen/lib/freemarker.jar"/>
<pathelement path="${seam.dir}/seam-gen/lib/core.jar"/>
<pathelement path="${seam.dir}/seam-gen/lib/commons-collections.jar"/>
<pathelement path="${seam.dir}/seam-gen/lib/commons-logging.jar"/>
<pathelement path="${seam.dir}/seam-gen/lib/runtime.jar"/>
<pathelement path="${seam.dir}/seam-gen/lib/common.jar"/>
<pathelement path="${seam.dir}/seam-gen/lib/text.jar"/>
<pathelement path="${seam.dir}/lib/dom4j.jar"/>
<pathelement path="${seam.dir}/lib/persistence-api.jar"/>
<pathelement path="${seam.dir}/lib/hibernate-core.jar"/>
<pathelement path="${seam.dir}/lib/hibernate-commons-annotations.jar"/>
<pathelement path="${seam.dir}/lib/hibernate-annotations.jar"/>
<pathelement path="${seam.dir}/lib/hibernate-entitymanager.jar"/>
<pathelement path="${seam.dir}/lib/hibernate-validator.jar"/>
<pathelement path="${seam.dir}/lib/jboss-logging.jar"/>
<pathelement path="${seam.dir}/lib/jboss-transaction-api_1.1_spec.jar"/>
<pathelement path="${seam.dir}/lib/hibernate-jpa-2.0-api.jar"/>
<pathelement path="${seam.dir}/lib/gen/core.jar"/>
<pathelement path="${seam.dir}/lib/slf4j-api.jar"/>
<pathelement path="${seam.dir}/lib/slf4j-log4j12.jar"/>
<pathelement path="${seam.dir}/lib/hibernate-jpa-2.0-api.jar"/>
<pathelement path="${seam.dir}/lib/slf4j-api.jar"/>
<pathelement path="${seam.dir}/lib/log4j.jar"/>
<pathelement path="${seam.dir}/lib/commons-collections.jar"/>
<pathelement path="${seam.dir}/lib/commons-logging.jar"/>
<pathelement path="${seam.dir}/lib/javassist.jar"/>
<pathelement path="${seam.dir}/lib/cglib-nodep.jar"/>
<pathelement path="${seam.dir}/lib/asm.jar"/>
<pathelement path="${seam.dir}/lib/core.jar"/>
<pathelement path="${seam.dir}/lib/jboss-common-core.jar"/>
<pathelement path="${seam.dir}/lib/concurrent.jar"/>
<pathelement path="${driver.jar}"/>
<pathelement path="${driver.license.jar}"/>
<pathelement path="${seam.dir}/lib/gen/jboss-seam-gen.jar"/>
<pathelement path="${seam.dir}/lib/jboss-seam.jar"/>
<pathelement path="${seam.dir}/lib/jboss-seam-gen.jar"/>
</path>
<taskdef name="hibernate" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="htools.classpath"/>
</target>
Expand Down
35 changes: 33 additions & 2 deletions jboss-seam-gen/pom.xml
Expand Up @@ -65,6 +65,11 @@
</plugin>
</plugins>
</build>

<properties>
<hibernateversion>4.0.0.Final</hibernateversion>
</properties>

<dependencies>

<!-- version runtime dependencies are managed only here instead in parent -->
Expand All @@ -74,6 +79,34 @@
<version>4.0.0-CR1</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernateversion}</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernateversion}</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.0.Final</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>freemarker</groupId>
Expand Down Expand Up @@ -168,8 +201,6 @@
<scope>runtime</scope>
</dependency>
</dependencies>
<modules>
</modules>

<profiles>
<profile>
Expand Down
28 changes: 27 additions & 1 deletion jboss-seam-gen/src/main/assembly/assembly.xml
Expand Up @@ -20,5 +20,31 @@
</excludes>
</fileSet>
</fileSets>

<dependencySets>
<dependencySet>
<outputDirectory>lib</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
<useStrictFiltering>true</useStrictFiltering>
<useTransitiveDependencies>true</useTransitiveDependencies>
<includes>
<include>org.hibernate:hibernate-tools:jar</include>
<include>org.hibernate:hibernate-core:jar</include>
<include>org.hibernate:hibernate-entitymanager:jar</include>
<include>commons-collections:commons-collections:jar</include>
<include>commons-logging:commons-logging:jar</include>
<include>org.hibernate:jtidy:jar</include>
<include>freemarker:freemarker:jar</include>
<include>org.eclipse.jdt:core:jar</include>
<include>org.eclipse.core:runtime:jar</include>
<include>org.eclipse.equinox:common:jar</include>
<include>org.eclipse:text:jar</include>
<include>antlr:antlr:jar</include>
<include>org.apache.ant:ant:jar</include>
<include>org.apache.ant:ant-nodeps:jar</include>
<include>org.apache.ant:ant-launcher:jar</include>
</includes>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}
</outputFileNameMapping>
</dependencySet>
</dependencySets>
</assembly>

0 comments on commit 8029196

Please sign in to comment.