[
https://issues.jboss.org/browse/JBIDE-12918?page=com.atlassian.jira.plugi...
]
Rob Stryker commented on JBIDE-12918:
-------------------------------------
jaroslav:
Given the project you are providing, you are 100% that this is replicatable, but my
question is, how did you get such a project? The code that generates these id's is as
follows:
{code}
protected static String getStamp(IArchive pack, boolean create) {
String propVal = pack.getProperty(MODULE_ID_PROPERTY_KEY);
if( propVal == null && create ) {
propVal = "" + new Date().getTime();//$NON-NLS-1$
}
return propVal;
}
{code}
The id is set to new Date().getTime(), which returns number of milliseconds since epoch.
Even if this project was somehow generated programatically, it seems almost impossible
that the id's would be the same.
In fact, if I run this by hand, creating a java project, then adding one archive, then a
second, I am unable to get duplicate id's. I even tried it programatically and cannot
get duplicate id's.
Is this project created before JBIDE-12813 was fixed? JBIDE-12813 was creating an error
where projects were persisted with no id's at all. However I've even tested that.
I've just modified the project you gave, and removed all such id's, and I still
got different auto-generated id's upon the project import, differing by up to 10 ms.
For example, if I import a project like:
{code}
<packages version="1.3">
<package exploded="false" inWorkspace="true"
name="jp11a.jar" todir="outs" type="jar">
<properties/>
</package>
<package exploded="false" inWorkspace="true"
name="jp11b.jar" todir="outs" type="jar">
<properties/>
</package>
</packages>
{code}
then after the import, the .packages file looks like this:
{code}
<packages version="1.3">
<package exploded="false" inWorkspace="true"
name="jp11a.jar" todir="outs" type="jar">
<properties>
<property
name="org.jboss.ide.eclipse.as.core.packages.ModuleIDPropertyKey"
value="1351665877040"/>
</properties>
</package>
<package exploded="false" inWorkspace="true"
name="jp11b.jar" todir="outs" type="jar">
<properties>
<property
name="org.jboss.ide.eclipse.as.core.packages.ModuleIDPropertyKey"
value="1351665877050"/>
</properties>
</package>
<properties/>
</packages>
{code}
As you can see, the two id's are 1351665877040 and 1351665877050 in this case.
So the real question here is, how did you get a single project that has two identical
id's?
Cannot deploy archive on the server
-----------------------------------
Key: JBIDE-12918
URL:
https://issues.jboss.org/browse/JBIDE-12918
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: Archives
Affects Versions: 3.3.0.Final, 3.3.1, 4.0.0.Beta1
Environment: Fedora 17 x64, java version "1.7.0_05", AS 7.1.1
Reporter: Jaroslav Jankovič
Assignee: Rob Stryker
Priority: Blocker
Labels: respin-c
Fix For: 4.0.0.CR1
Attachments: JBIDE-12918.ogv, pr3.zip
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira