[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-5878) Archives .packages configuration cannot be used without modifications to build archive with ant inside eclipse

Rob Stryker (JIRA) jira-events at lists.jboss.org
Tue Feb 23 04:38:10 EST 2010


    [ https://jira.jboss.org/jira/browse/JBIDE-5878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12515918#action_12515918 ] 

Rob Stryker commented on JBIDE-5878:
------------------------------------

I was unable to replicate this. The damn thing just worked right out of the box. 

I created a java project "SomeJ", turned off autobuilder, added a .packages file which looked as follows:

   <package name="SomeJ.jar" type="jar" todir="/SomeJ" exploded="false" inWorkspace="true">
      <fileset dir="" includes="**" excludes="blahblahblah, **jar" inWorkspace="true" flatten="false">
         <properties></properties>
      </fileset>
   </package>

All of these values were the defaults (except i added **jar to the excludes).  Then I made the following build.xml:

<project name="Name" default="run-packaging">
	<property name="studio.home" location="/home/rob/tmp/tmp999/jbdevstudio/studio/eclipse" />
	<property name="eclipse.home" location="/home/rob/tmp/tmp999/jbdevstudio/eclipse" />

	<path id="generate-archives-classpath">
		<fileset dir="${eclipse.home}/plugins">
			<include name="org.eclipse.equinox.common_*.jar" />
		</fileset>
		<fileset dir="${studio.home}">
			<include name="plugins/org.jboss.ide.eclipse.archives.core**/archivescore.jar" />
			<include name="plugins/org.jboss.ide.eclipse.archives.core**/lib/*.jar" />
		</fileset>
	</path>

	<taskdef name="generate-archives" classpathref="generate-archives-classpath" classname="org.jboss.ide.eclipse.archives.core.ant.GenerateArchivesTask" />

	<target name="run-packaging">
		<!-- each project needs to have their root dir defined when running outside eclipse -->
		<property name="SomeJ.dir" value="/home/rob/apps/eclipse/workspaces/deleteme5/SomeJ" />
		<generate-archives projectPath="/home/rob/apps/eclipse/workspaces/deleteme5/SomeJ" />
	</target>
</project>


After that, it just WORKED. I got no exceptions and no errors. Not sure what you guys are doing wrong? 

> Archives .packages configuration cannot be used without modifications to build archive with ant inside eclipse
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-5878
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-5878
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Archives
>    Affects Versions: 3.1.0.CR2
>            Reporter: Denis Golovin
>            Assignee: Denis Golovin
>             Fix For: 3.1.1
>
>
> By default packages/package at todir attribute is set to /${project-name} and that works only when archive is built by using context menu on Archives View. If you create build.xml and run it by eclipse ant launcher it fails with error like
> Error adding child node jarName.jar
> [GenerateArchives] org.jboss.ide.eclipse.archives.core.model.ArchivesModelException: Error adding child node myJar.jar
> [GenerateArchives]      at org.jboss.ide.eclipse.archives.core.model.internal.ArchiveNodeImpl.addChild(ArchiveNodeImpl.java:273)
> [GenerateArchives]      at org.jboss.ide.eclipse.archives.core.util.ModelUtil.fillArchiveModel(ModelUtil.java:216)
> [GenerateArchives]      at org.jboss.ide.eclipse.archives.core.model.ArchivesModel.registerProject(ArchivesModel.java:194)
> [GenerateArchives]      at org.jboss.ide.eclipse.archives.core.model.ArchivesModel.registerProject(ArchivesModel.java:170)
> [GenerateArchives]      at org.jboss.ide.eclipse.archives.core.ant.GenerateArchivesTask.execute(GenerateArchivesTask.java:63)
> [GenerateArchives]      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> [GenerateArchives]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [GenerateArchives]      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> [GenerateArchives]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> [GenerateArchives]      at java.lang.reflect.Method.invoke(Unknown Source)
> [GenerateArchives]      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
> [GenerateArchives]      at org.apache.tools.ant.Task.perform(Task.java:348)
> [GenerateArchives]      at org.apache.tools.ant.Target.execute(Target.java:357)
> [GenerateArchives]      at org.apache.tools.ant.Target.performTasks(Target.java:385)
> [GenerateArchives]      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
> [GenerateArchives]      at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
> [GenerateArchives]      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> [GenerateArchives]      at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
> [GenerateArchives]      at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
> [GenerateArchives]      at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
> [GenerateArchives]      at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list