开发者

Exclude some classes from being deployed on OC4j using ang

开发者 https://www.devze.com 2023-01-29 00:12 出处:网络
I am using Eclipse, which uses Ant to deploy EJB to local OC4J container. I need to exclude some files from being deployed.

I am using Eclipse, which uses Ant to deploy EJB to local OC4J container.

I need to exclude some files from being deployed.

I've open the file: D:\eclipse\plugins\org.eclipse.jst.server.generic.oc4j_1.5.206.v20090812\buildfiles\oracle.10.1.3.xml

And found:

<target name="package.module.ejb">
    <jar destfile="${server.publish.dir}/${module.name}.jar"> 
        <zipfileset dir="${modul开发者_运维百科e.dir}">
            <include name="**/*.*"/>
            <exclude name="**/*.java"/>
        </zipfileset>
    </jar>
</target>

The files that I need to exclude have the following pattern:

XXXTest.class (ends with Test.class)

I've tried adding:

<exclude name="**/*Test.class"/>

Edit

I deploy the JAR within an EAR, the following is the directory structure of the deployed ear:

MyApp.ear
  - META-INF
  - MyApp.jar

But with no effect.


<exclude name="**/*Test.*"/>


Do you want to deploy the application without some classes when you are developing/debugging?

That build.xml is part of the plugin so it is not wise to change it. I guess you can just accept that the classes are there for deployment during development unless those classes give you problems.

If you are building the release version of your application you have couple of choices: - use ant/maven for that. You can control the result much better. - Do you still want to do it purely with Eclipse java builders? Then you have to post process your jars.

0

精彩评论

暂无评论...
验证码 换一张
取 消